summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-07-05 09:42:25 +0200
committerGitHub <noreply@github.com>2019-07-05 09:42:25 +0200
commitbe3d6c8b337053b1aba104fceba6f5d3e7335c62 (patch)
tree91010a44134554b0916badf9a205b9a6bee0c64e
parent916c5c1e4bc7fed1ee6277366f89b31e13bb9691 (diff)
parentacbd0fea9751cb49eccff0d08f94ed8217fca263 (diff)
Merge pull request #30319 from Calinou/editor-use-checkboxes
Use CheckBoxes in the editor instead of CheckButtons when applicable
-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;