summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2019-07-04 17:30:44 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2019-07-04 17:32:59 +0200
commitacbd0fea9751cb49eccff0d08f94ed8217fca263 (patch)
treec5c3d59abc85e94c44f3384b5d69387acef7b6d4
parent550f436f8fbea86984a845c821270fba78189143 (diff)
Use CheckBoxes in the editor instead of CheckButtons when applicable
CheckButtons should only be used if toggling them has an immediate effect. Otherwise, CheckBoxes should be used.
-rw-r--r--editor/animation_track_editor.cpp6
-rw-r--r--editor/animation_track_editor.h6
-rw-r--r--editor/editor_node.cpp2
-rw-r--r--editor/editor_node.h2
-rw-r--r--editor/rename_dialog.cpp6
-rw-r--r--editor/rename_dialog.h7
-rw-r--r--editor/script_create_dialog.cpp4
-rw-r--r--editor/script_create_dialog.h4
8 files changed, 18 insertions, 19 deletions
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp
index c835dda1b9..f5b5cfa848 100644
--- a/editor/animation_track_editor.cpp
+++ b/editor/animation_track_editor.cpp
@@ -5273,17 +5273,17 @@ AnimationTrackEditor::AnimationTrackEditor() {
VBoxContainer *cleanup_vb = memnew(VBoxContainer);
cleanup_dialog->add_child(cleanup_vb);
- cleanup_keys = memnew(CheckButton);
+ cleanup_keys = memnew(CheckBox);
cleanup_keys->set_text(TTR("Remove invalid keys"));
cleanup_keys->set_pressed(true);
cleanup_vb->add_child(cleanup_keys);
- cleanup_tracks = memnew(CheckButton);
+ cleanup_tracks = memnew(CheckBox);
cleanup_tracks->set_text(TTR("Remove unresolved and empty tracks"));
cleanup_tracks->set_pressed(true);
cleanup_vb->add_child(cleanup_tracks);
- cleanup_all = memnew(CheckButton);
+ cleanup_all = memnew(CheckBox);
cleanup_all->set_text(TTR("Clean-up all animations"));
cleanup_vb->add_child(cleanup_all);
diff --git a/editor/animation_track_editor.h b/editor/animation_track_editor.h
index 0d5a621e07..8dc2304a95 100644
--- a/editor/animation_track_editor.h
+++ b/editor/animation_track_editor.h
@@ -439,9 +439,9 @@ class AnimationTrackEditor : public VBoxContainer {
SpinBox *optimize_max_angle;
ConfirmationDialog *cleanup_dialog;
- CheckButton *cleanup_keys;
- CheckButton *cleanup_tracks;
- CheckButton *cleanup_all;
+ CheckBox *cleanup_keys;
+ CheckBox *cleanup_tracks;
+ CheckBox *cleanup_all;
ConfirmationDialog *scale_dialog;
SpinBox *scale;
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index d9600172d7..8d2d760e51 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -6258,7 +6258,7 @@ EditorNode::EditorNode() {
file_export_lib->set_title(TTR("Export Library"));
file_export_lib->set_mode(EditorFileDialog::MODE_SAVE_FILE);
file_export_lib->connect("file_selected", this, "_dialog_action");
- file_export_lib_merge = memnew(CheckButton);
+ file_export_lib_merge = memnew(CheckBox);
file_export_lib_merge->set_text(TTR("Merge With Existing"));
file_export_lib_merge->set_pressed(true);
file_export_lib->get_vbox()->add_child(file_export_lib_merge);
diff --git a/editor/editor_node.h b/editor/editor_node.h
index ca64126c60..733f29c8ff 100644
--- a/editor/editor_node.h
+++ b/editor/editor_node.h
@@ -330,7 +330,7 @@ private:
EditorFileDialog *file_export;
EditorFileDialog *file_export_lib;
EditorFileDialog *file_script;
- CheckButton *file_export_lib_merge;
+ CheckBox *file_export_lib_merge;
LineEdit *file_export_password;
String current_path;
MenuButton *update_spinner;
diff --git a/editor/rename_dialog.cpp b/editor/rename_dialog.cpp
index 40343cf908..cc9e14975f 100644
--- a/editor/rename_dialog.cpp
+++ b/editor/rename_dialog.cpp
@@ -131,7 +131,7 @@ RenameDialog::RenameDialog(SceneTreeEditor *p_scene_tree_editor, UndoRedo *p_und
vbc_substitute->set_name(TTR("Substitute"));
tabc_features->add_child(vbc_substitute);
- cbut_substitute = memnew(CheckButton);
+ cbut_substitute = memnew(CheckBox);
cbut_substitute->set_text(TTR("Substitute"));
vbc_substitute->add_child(cbut_substitute);
@@ -246,7 +246,7 @@ RenameDialog::RenameDialog(SceneTreeEditor *p_scene_tree_editor, UndoRedo *p_und
vbc_regex->set_custom_minimum_size(Size2(0, feature_min_height));
tabc_features->add_child(vbc_regex);
- cbut_regex = memnew(CheckButton);
+ cbut_regex = memnew(CheckBox);
cbut_regex->set_text(TTR("Regular Expressions"));
vbc_regex->add_child(cbut_regex);
@@ -258,7 +258,7 @@ RenameDialog::RenameDialog(SceneTreeEditor *p_scene_tree_editor, UndoRedo *p_und
vbc_process->set_custom_minimum_size(Size2(0, feature_min_height));
tabc_features->add_child(vbc_process);
- cbut_process = memnew(CheckButton);
+ cbut_process = memnew(CheckBox);
cbut_process->set_text(TTR("Post-Process"));
vbc_process->add_child(cbut_process);
diff --git a/editor/rename_dialog.h b/editor/rename_dialog.h
index 4e0fab6a9f..9f0fbf66a1 100644
--- a/editor/rename_dialog.h
+++ b/editor/rename_dialog.h
@@ -32,7 +32,6 @@
#define RENAME_DIALOG_H
#include "scene/gui/check_box.h"
-#include "scene/gui/check_button.h"
#include "scene/gui/dialogs.h"
#include "scene/gui/option_button.h"
#include "scene/gui/spin_box.h"
@@ -75,9 +74,9 @@ class RenameDialog : public ConfirmationDialog {
TabContainer *tabc_features;
- CheckButton *cbut_substitute;
- CheckButton *cbut_regex;
- CheckButton *cbut_process;
+ CheckBox *cbut_substitute;
+ CheckBox *cbut_regex;
+ CheckBox *cbut_process;
CheckBox *chk_per_level_counter;
Button *but_insert_name;
diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp
index 8916f4d8c4..bebfe6d3a1 100644
--- a/editor/script_create_dialog.cpp
+++ b/editor/script_create_dialog.cpp
@@ -742,8 +742,8 @@ ScriptCreateDialog::ScriptCreateDialog() {
/* Built-in Script */
- internal = memnew(CheckButton);
- internal->set_h_size_flags(0);
+ internal = memnew(CheckBox);
+ internal->set_text(TTR("On"));
internal->connect("pressed", this, "_built_in_pressed");
internal_label = memnew(Label(TTR("Built-in Script")));
internal_label->set_align(Label::ALIGN_RIGHT);
diff --git a/editor/script_create_dialog.h b/editor/script_create_dialog.h
index 61f87f5732..288b8f604b 100644
--- a/editor/script_create_dialog.h
+++ b/editor/script_create_dialog.h
@@ -33,7 +33,7 @@
#include "editor/editor_file_dialog.h"
#include "editor/editor_settings.h"
-#include "scene/gui/check_button.h"
+#include "scene/gui/check_box.h"
#include "scene/gui/dialogs.h"
#include "scene/gui/grid_container.h"
#include "scene/gui/line_edit.h"
@@ -57,7 +57,7 @@ class ScriptCreateDialog : public ConfirmationDialog {
LineEdit *file_path;
Button *path_button;
EditorFileDialog *file_browse;
- CheckButton *internal;
+ CheckBox *internal;
Label *internal_label;
VBoxContainer *path_vb;
AcceptDialog *alert;