diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-03-22 14:55:36 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-03-22 14:55:36 -0300 |
commit | 6d813c81b814da2a0cfaf6a6f879020e66e90bb9 (patch) | |
tree | a65634fa6b0ba219654532c76c890d35755bb49e /tools/editor | |
parent | a8f55d11d33c6cd17d798d511767a4f1b26f30f3 (diff) | |
parent | 0bc7eb1d91212e5fcc799d1b790430a4c2468751 (diff) |
Merge pull request #1460 from MarianoGnu/master
Create Checkbox class with support for Radio Buttons
Diffstat (limited to 'tools/editor')
-rw-r--r-- | tools/editor/icons/icon_check_box.png | bin | 0 -> 344 bytes | |||
-rw-r--r-- | tools/editor/plugins/theme_editor_plugin.cpp | 20 | ||||
-rw-r--r-- | tools/editor/plugins/theme_editor_plugin.h | 2 |
3 files changed, 22 insertions, 0 deletions
diff --git a/tools/editor/icons/icon_check_box.png b/tools/editor/icons/icon_check_box.png Binary files differnew file mode 100644 index 0000000000..8a2b56cc3e --- /dev/null +++ b/tools/editor/icons/icon_check_box.png diff --git a/tools/editor/plugins/theme_editor_plugin.cpp b/tools/editor/plugins/theme_editor_plugin.cpp index ccbd923118..bd6fb37b29 100644 --- a/tools/editor/plugins/theme_editor_plugin.cpp +++ b/tools/editor/plugins/theme_editor_plugin.cpp @@ -568,6 +568,26 @@ ThemeEditor::ThemeEditor() { CheckButton *cb = memnew( CheckButton ); cb->set_text("CheckButton"); first_vb->add_child(cb ); + CheckBox *cbx = memnew( CheckBox ); + cbx->set_text("CheckBox"); + first_vb->add_child(cbx ); + + /* TODO: This is not working properly, controls are overlapping*/ + /* + ButtonGroup *bg = memnew( ButtonGroup ); + bg->set_v_size_flags(SIZE_EXPAND_FILL); + VBoxContainer *gbvb = memnew( VBoxContainer ); + gbvb->set_v_size_flags(SIZE_EXPAND_FILL); + CheckBox *rbx1 = memnew( CheckBox ); + rbx1->set_text("CheckBox Radio1"); + rbx1->set_pressed(true); + gbvb->add_child(rbx1); + CheckBox *rbx2 = memnew( CheckBox ); + rbx2->set_text("CheckBox Radio2"); + gbvb->add_child(rbx2); + bg->add_child(gbvb); + first_vb->add_child(bg); + */ MenuButton* test_menu_button = memnew( MenuButton ); test_menu_button->set_text("MenuButton"); diff --git a/tools/editor/plugins/theme_editor_plugin.h b/tools/editor/plugins/theme_editor_plugin.h index 98156422ee..83432b9232 100644 --- a/tools/editor/plugins/theme_editor_plugin.h +++ b/tools/editor/plugins/theme_editor_plugin.h @@ -33,6 +33,8 @@ #include "scene/gui/texture_frame.h" #include "scene/gui/option_button.h" #include "scene/gui/file_dialog.h" +#include "scene/gui/check_box.h" +#include "scene/gui/button_group.h" #include "tools/editor/editor_node.h" |