This commit is contained in:
Lucas3H 2021-11-11 00:57:13 -07:00 committed by GitHub
commit 834bfa0cba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 76 additions and 76 deletions

View file

@ -49,16 +49,16 @@ class AnimationBezierTrackEdit : public Control {
}; };
HandleMode handle_mode; HandleMode handle_mode;
OptionButton *handle_mode_option; OptionButton *handle_mode_option = nullptr;
AnimationTimelineEdit *timeline; AnimationTimelineEdit *timeline = nullptr;
UndoRedo *undo_redo; UndoRedo *undo_redo = nullptr;
Node *root; Node *root = nullptr;
Control *play_position; //separate control used to draw so updates for only position changed are much faster Control *play_position = nullptr; //separate control used to draw so updates for only position changed are much faster
float play_position_pos; float play_position_pos = 0.0;
Ref<Animation> animation; Ref<Animation> animation;
int track; int track = 0;
Vector<Rect2> view_rects; Vector<Rect2> view_rects;
@ -70,37 +70,37 @@ class AnimationBezierTrackEdit : public Control {
Map<int, Rect2> subtracks; Map<int, Rect2> subtracks;
float v_scroll; float v_scroll = 0.0;
float v_zoom; float v_zoom = 0.0;
PopupMenu *menu; PopupMenu *menu = nullptr;
void _zoom_changed(); void _zoom_changed();
void _gui_input(const Ref<InputEvent> &p_event); void _gui_input(const Ref<InputEvent> &p_event);
void _menu_selected(int p_index); void _menu_selected(int p_index);
bool *block_animation_update_ptr; //used to block all tracks re-gen (speed up) bool *block_animation_update_ptr = nullptr; //used to block all tracks re-gen (speed up)
void _play_position_draw(); void _play_position_draw();
Vector2 insert_at_pos; Vector2 insert_at_pos;
bool moving_selection_attempt; bool moving_selection_attempt = false;
int select_single_attempt; int select_single_attempt = 0;
bool moving_selection; bool moving_selection = false;
int moving_selection_from_key; int moving_selection_from_key = 0;
Vector2 moving_selection_offset; Vector2 moving_selection_offset;
bool box_selecting_attempt; bool box_selecting_attempt = false;
bool box_selecting; bool box_selecting = false;
bool box_selecting_add; bool box_selecting_add = false;
Vector2 box_selection_from; Vector2 box_selection_from;
Vector2 box_selection_to; Vector2 box_selection_to;
int moving_handle; //0 no move -1 or +1 out int moving_handle = 0; //0 no move -1 or +1 out
int moving_handle_key; int moving_handle_key = 0;
Vector2 moving_handle_left; Vector2 moving_handle_left;
Vector2 moving_handle_right; Vector2 moving_handle_right;
@ -111,13 +111,13 @@ class AnimationBezierTrackEdit : public Control {
Vector2 menu_insert_key; Vector2 menu_insert_key;
struct AnimMoveRestore { struct AnimMoveRestore {
int track; int track = 0;
float time; float time = 0.0;
Variant key; Variant key;
float transition; float transition = 0.0;
}; };
AnimationTrackEditor *editor; AnimationTrackEditor *editor = nullptr;
struct EditPoint { struct EditPoint {
Rect2 point_rect; Rect2 point_rect;
@ -129,9 +129,9 @@ class AnimationBezierTrackEdit : public Control {
Set<int> selection; Set<int> selection;
bool panning_timeline; bool panning_timeline = false;
float panning_timeline_from; float panning_timeline_from = 0.0;
float panning_timeline_at; float panning_timeline_at = 0.0;
void _draw_line_clipped(const Vector2 &p_from, const Vector2 &p_to, const Color &p_color, int p_clip_left, int p_clip_right); void _draw_line_clipped(const Vector2 &p_from, const Vector2 &p_to, const Color &p_color, int p_clip_left, int p_clip_right);
void _draw_track(int p_track, const Color &p_color); void _draw_track(int p_track, const Color &p_color);

View file

@ -81,7 +81,7 @@ class AnimationTrackEditSpriteFrame : public AnimationTrackEdit {
GDCLASS(AnimationTrackEditSpriteFrame, AnimationTrackEdit); GDCLASS(AnimationTrackEditSpriteFrame, AnimationTrackEdit);
ObjectID id; ObjectID id;
bool is_coords; bool is_coords = false;
public: public:
virtual int get_key_height() const; virtual int get_key_height() const;
@ -114,11 +114,11 @@ class AnimationTrackEditTypeAudio : public AnimationTrackEdit {
void _preview_changed(ObjectID p_which); void _preview_changed(ObjectID p_which);
bool len_resizing; bool len_resizing = false;
bool len_resizing_start; bool len_resizing_start = false;
int len_resizing_index; int len_resizing_index = 0;
float len_resizing_from_px; float len_resizing_from_px = 0.0;
float len_resizing_rel; float len_resizing_rel = 0.0;
protected: protected:
static void _bind_methods(); static void _bind_methods();

View file

@ -36,7 +36,7 @@
class ArrayPropertyEdit : public Reference { class ArrayPropertyEdit : public Reference {
GDCLASS(ArrayPropertyEdit, Reference); GDCLASS(ArrayPropertyEdit, Reference);
int page; int page = 0;
ObjectID obj; ObjectID obj;
StringName property; StringName property;
String vtypes; String vtypes;

View file

@ -40,7 +40,7 @@ class AudioStreamPreview : public Reference {
GDCLASS(AudioStreamPreview, Reference); GDCLASS(AudioStreamPreview, Reference);
friend class AudioStream; friend class AudioStream;
Vector<uint8_t> preview; Vector<uint8_t> preview;
float length; float length = 0.0;
friend class AudioStreamPreviewGenerator; friend class AudioStreamPreviewGenerator;
@ -63,7 +63,7 @@ class AudioStreamPreviewGenerator : public Node {
Ref<AudioStreamPlayback> playback; Ref<AudioStreamPlayback> playback;
SafeFlag generating; SafeFlag generating;
ObjectID id; ObjectID id;
Thread *thread; Thread *thread = nullptr;
// Needed for the bookkeeping of the Map // Needed for the bookkeeping of the Map
Preview &operator=(const Preview &p_rhs) { Preview &operator=(const Preview &p_rhs) {

View file

@ -43,10 +43,10 @@
class GotoLineDialog : public ConfirmationDialog { class GotoLineDialog : public ConfirmationDialog {
GDCLASS(GotoLineDialog, ConfirmationDialog); GDCLASS(GotoLineDialog, ConfirmationDialog);
Label *line_label; Label *line_label = nullptr;
LineEdit *line; LineEdit *line = nullptr;
TextEdit *text_editor; TextEdit *text_editor = nullptr;
virtual void ok_pressed(); virtual void ok_pressed();
@ -61,31 +61,31 @@ public:
class FindReplaceBar : public HBoxContainer { class FindReplaceBar : public HBoxContainer {
GDCLASS(FindReplaceBar, HBoxContainer); GDCLASS(FindReplaceBar, HBoxContainer);
LineEdit *search_text; LineEdit *search_text = nullptr;
Label *matches_label; Label *matches_label = nullptr;
ToolButton *find_prev; ToolButton *find_prev = nullptr;
ToolButton *find_next; ToolButton *find_next = nullptr;
CheckBox *case_sensitive; CheckBox *case_sensitive = nullptr;
CheckBox *whole_words; CheckBox *whole_words = nullptr;
TextureButton *hide_button; TextureButton *hide_button = nullptr;
LineEdit *replace_text; LineEdit *replace_text = nullptr;
Button *replace; Button *replace = nullptr;
Button *replace_all; Button *replace_all = nullptr;
CheckBox *selection_only; CheckBox *selection_only = nullptr;
VBoxContainer *vbc_lineedit; VBoxContainer *vbc_lineedit = nullptr;
HBoxContainer *hbc_button_replace; HBoxContainer *hbc_button_replace = nullptr;
HBoxContainer *hbc_option_replace; HBoxContainer *hbc_option_replace = nullptr;
TextEdit *text_edit; TextEdit *text_edit = nullptr;
int result_line; int result_line = 0;
int result_col; int result_col = 0;
int results_count; int results_count = 0;
bool replace_all_mode; bool replace_all_mode = false;
bool preserve_cursor; bool preserve_cursor = false;
void _get_search_from(int &r_line, int &r_col); void _get_search_from(int &r_line, int &r_col);
void _update_results_count(); void _update_results_count();
@ -138,27 +138,27 @@ typedef void (*CodeTextEditorCodeCompleteFunc)(void *p_ud, const String &p_code,
class CodeTextEditor : public VBoxContainer { class CodeTextEditor : public VBoxContainer {
GDCLASS(CodeTextEditor, VBoxContainer); GDCLASS(CodeTextEditor, VBoxContainer);
TextEdit *text_editor; TextEdit *text_editor = nullptr;
FindReplaceBar *find_replace_bar; FindReplaceBar *find_replace_bar = nullptr;
HBoxContainer *status_bar; HBoxContainer *status_bar = nullptr;
ToolButton *toggle_scripts_button; ToolButton *toggle_scripts_button = nullptr;
ToolButton *warning_button; ToolButton *warning_button = nullptr;
Label *warning_count_label; Label *warning_count_label = nullptr;
Label *line_and_col_txt; Label *line_and_col_txt = nullptr;
Label *info; Label *info = nullptr;
Timer *idle; Timer *idle = nullptr;
Timer *code_complete_timer; Timer *code_complete_timer = nullptr;
Timer *font_resize_timer; Timer *font_resize_timer = nullptr;
int font_resize_val; int font_resize_val = 0;
real_t font_size; real_t font_size;
Label *error; Label *error = nullptr;
int error_line; int error_line = 0;
int error_column; int error_column = 0;
void _on_settings_change(); void _on_settings_change();
@ -176,7 +176,7 @@ class CodeTextEditor : public VBoxContainer {
void _reset_zoom(); void _reset_zoom();
CodeTextEditorCodeCompleteFunc code_complete_func; CodeTextEditorCodeCompleteFunc code_complete_func;
void *code_complete_ud; void *code_complete_ud = nullptr;
void _warning_label_gui_input(const Ref<InputEvent> &p_event); void _warning_label_gui_input(const Ref<InputEvent> &p_event);
void _warning_button_pressed(); void _warning_button_pressed();
@ -198,7 +198,7 @@ protected:
void _notification(int); void _notification(int);
static void _bind_methods(); static void _bind_methods();
bool is_warnings_panel_opened; bool is_warnings_panel_opened = false;
public: public:
void trim_trailing_whitespace(); void trim_trailing_whitespace();