diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-01-03 17:24:16 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-01-03 17:24:16 -0300 |
commit | dc7ac86b798f40e1472871391af49a562879eadc (patch) | |
tree | 0cae39a004458c5a62cc14888a35f53e88aa42a1 /tools/editor | |
parent | 0e1d70f637c31aa107f109a2e21ec9cd5e82d047 (diff) |
-Completely removed EmptyControl (but added fallback), closes #1017
Diffstat (limited to 'tools/editor')
-rw-r--r-- | tools/editor/animation_editor.cpp | 8 | ||||
-rw-r--r-- | tools/editor/animation_editor.h | 4 | ||||
-rw-r--r-- | tools/editor/editor_help.cpp | 4 | ||||
-rw-r--r-- | tools/editor/editor_log.cpp | 4 | ||||
-rw-r--r-- | tools/editor/editor_log.h | 4 | ||||
-rw-r--r-- | tools/editor/editor_node.cpp | 16 | ||||
-rw-r--r-- | tools/editor/plugins/tile_map_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | tools/editor/progress_dialog.cpp | 6 | ||||
-rw-r--r-- | tools/editor/project_export.cpp | 4 | ||||
-rw-r--r-- | tools/editor/project_export.h | 2 | ||||
-rw-r--r-- | tools/editor/project_manager.cpp | 6 |
11 files changed, 31 insertions, 31 deletions
diff --git a/tools/editor/animation_editor.cpp b/tools/editor/animation_editor.cpp index 2eef821438..db70a2675a 100644 --- a/tools/editor/animation_editor.cpp +++ b/tools/editor/animation_editor.cpp @@ -2909,11 +2909,11 @@ void AnimationKeyEditor::set_anim_pos(float p_pos) { void AnimationKeyEditor::_pane_drag(const Point2& p_delta) { - Size2 ecs = ec->get_minsize(); + Size2 ecs = ec->get_custom_minimum_size(); ecs.y-=p_delta.y; if (ecs.y<100) ecs.y=100; - ec->set_minsize(ecs);; + ec->set_custom_minimum_size(ecs);; } @@ -3296,8 +3296,8 @@ AnimationKeyEditor::AnimationKeyEditor(UndoRedo *p_undo_redo, EditorHistory *p_h // menu->get_popup()->connect("item_pressed",this,"_menu_callback"); - ec = memnew (EmptyControl); - ec->set_minsize(Size2(0,50)); + ec = memnew (Control); + ec->set_custom_minimum_size(Size2(0,50)); add_child(ec); ec->set_v_size_flags(SIZE_EXPAND_FILL); diff --git a/tools/editor/animation_editor.h b/tools/editor/animation_editor.h index 9d3e692fad..1f17922552 100644 --- a/tools/editor/animation_editor.h +++ b/tools/editor/animation_editor.h @@ -37,7 +37,7 @@ #include "scene/gui/scroll_bar.h" #include "scene/gui/tool_button.h" #include "scene/gui/file_dialog.h" -#include "scene/gui/empty_control.h" + #include "scene/resources/animation.h" #include "scene/animation/animation_cache.h" #include "scene_tree_editor.h" @@ -157,7 +157,7 @@ class AnimationKeyEditor : public VBoxContainer { PopupMenu *track_menu; PopupMenu *type_menu; - EmptyControl *ec; + Control *ec; TextureFrame *zoomicon; HSlider *zoom; //MenuButton *menu; diff --git a/tools/editor/editor_help.cpp b/tools/editor/editor_help.cpp index 8408436a6c..2283a2df14 100644 --- a/tools/editor/editor_help.cpp +++ b/tools/editor/editor_help.cpp @@ -1361,8 +1361,8 @@ EditorHelp::EditorHelp(EditorNode *p_editor) { Separator *hs = memnew( VSeparator ); panel_hb->add_child(hs); - EmptyControl *ec = memnew( EmptyControl ); - ec->set_minsize(Size2(200,1)); + Control *ec = memnew( Control ); + ec->set_custom_minimum_size(Size2(200,1)); panel_hb->add_child(ec); search = memnew( LineEdit ); ec->add_child(search); diff --git a/tools/editor/editor_log.cpp b/tools/editor/editor_log.cpp index f7f5f596d7..7c3fa6c1bd 100644 --- a/tools/editor/editor_log.cpp +++ b/tools/editor/editor_log.cpp @@ -203,9 +203,9 @@ EditorLog::EditorLog() { tb->connect("pressed",this,"_close_request"); - ec = memnew( EmptyControl); + ec = memnew( Control); vb->add_child(ec); - ec->set_minsize(Size2(0,100)); + ec->set_custom_minimum_size(Size2(0,100)); ec->set_v_size_flags(SIZE_EXPAND_FILL); diff --git a/tools/editor/editor_log.h b/tools/editor/editor_log.h index b6cd951287..27cce4a584 100644 --- a/tools/editor/editor_log.h +++ b/tools/editor/editor_log.h @@ -33,7 +33,7 @@ #include "scene/gui/label.h" #include "scene/gui/rich_text_label.h" #include "scene/gui/texture_button.h" -#include "scene/gui/empty_control.h" +//#include "scene/gui/empty_control.h" #include "scene/gui/box_container.h" #include "scene/gui/panel_container.h" #include "scene/gui/texture_frame.h" @@ -50,7 +50,7 @@ class EditorLog : public PanelContainer { TextureButton *tb; HBoxContainer *title_hb; // PaneDrag *pd; - EmptyControl *ec; + Control *ec; static void _error_handler(void *p_self, const char*p_func, const char*p_file,int p_line, const char*p_error,const char*p_errorexp,ErrorHandlerType p_type); diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index b2fdd2fe03..5843a7cb28 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -3309,13 +3309,13 @@ EditorNode::EditorNode() { main_editor_tabs->connect("tab_changed",this,"_editor_select"); HBoxContainer *srth = memnew( HBoxContainer ); srt->add_child( srth ); - EmptyControl *tec = memnew( EmptyControl ); - tec->set_minsize(Size2(100,0)); + Control *tec = memnew( Control ); + tec->set_custom_minimum_size(Size2(100,0)); tec->set_h_size_flags(Control::SIZE_EXPAND_FILL); srth->add_child(tec); srth->add_child(main_editor_tabs); - tec = memnew( EmptyControl ); - tec->set_minsize(Size2(100,0)); + tec = memnew( Control ); + tec->set_custom_minimum_size(Size2(100,0)); srth->add_child(tec); tec->set_h_size_flags(Control::SIZE_EXPAND_FILL); @@ -3675,8 +3675,8 @@ EditorNode::EditorNode() { top_pallete->add_child(resources_dock); top_pallete->set_v_size_flags(Control::SIZE_EXPAND_FILL); - EmptyControl *editor_spacer = memnew( EmptyControl ); - editor_spacer->set_minsize(Size2(260,200)); + Control *editor_spacer = memnew( Control ); + editor_spacer->set_custom_minimum_size(Size2(260,200)); editor_spacer->set_v_size_flags(Control::SIZE_EXPAND_FILL); editor_vsplit->add_child( editor_spacer ); editor_spacer->add_child( top_pallete ); @@ -3687,8 +3687,8 @@ EditorNode::EditorNode() { prop_pallete->set_v_size_flags(Control::SIZE_EXPAND_FILL); - editor_spacer = memnew( EmptyControl ); - editor_spacer->set_minsize(Size2(260,200)); + editor_spacer = memnew( Control ); + editor_spacer->set_custom_minimum_size(Size2(260,200)); editor_spacer->set_v_size_flags(Control::SIZE_EXPAND_FILL); editor_vsplit->add_child( editor_spacer ); editor_spacer->add_child( prop_pallete ); diff --git a/tools/editor/plugins/tile_map_editor_plugin.cpp b/tools/editor/plugins/tile_map_editor_plugin.cpp index 118ddc97e6..a7e6a0d1f9 100644 --- a/tools/editor/plugins/tile_map_editor_plugin.cpp +++ b/tools/editor/plugins/tile_map_editor_plugin.cpp @@ -718,8 +718,8 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) { undo_redo = editor->get_undo_redo(); int mw = EDITOR_DEF("tile_map/palette_min_width",80); - EmptyControl *ec = memnew( EmptyControl); - ec->set_minsize(Size2(mw,0)); + Control *ec = memnew( Control); + ec->set_custom_minimum_size(Size2(mw,0)); add_child(ec); // Add tile palette diff --git a/tools/editor/progress_dialog.cpp b/tools/editor/progress_dialog.cpp index ac54796c64..df40c5d5a5 100644 --- a/tools/editor/progress_dialog.cpp +++ b/tools/editor/progress_dialog.cpp @@ -29,7 +29,7 @@ #include "progress_dialog.h" #include "main/main.h" #include "message_queue.h" -#include "scene/gui/empty_control.h" + void BackgroundProgress::_add_task(const String& p_task,const String& p_label, int p_steps) { @@ -43,12 +43,12 @@ void BackgroundProgress::_add_task(const String& p_task,const String& p_label, i t.progress = memnew( ProgressBar ); t.progress->set_max(p_steps); t.progress->set_val(p_steps); - EmptyControl *ec = memnew( EmptyControl ); + Control *ec = memnew( Control ); ec->set_h_size_flags(SIZE_EXPAND_FILL); ec->set_v_size_flags(SIZE_EXPAND_FILL); t.progress->set_area_as_parent_rect(); ec->add_child(t.progress); - ec->set_minsize(Size2(80,5)); + ec->set_custom_minimum_size(Size2(80,5)); t.hb->add_child(ec); add_child(t.hb); diff --git a/tools/editor/project_export.cpp b/tools/editor/project_export.cpp index 3a0f1e76b5..449e54e12f 100644 --- a/tools/editor/project_export.cpp +++ b/tools/editor/project_export.cpp @@ -1240,8 +1240,8 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) { group_options->add_child(atlas_preview); atlas_preview->show(); atlas_preview->connect("pressed",this,"_group_atlas_preview"); - EmptyControl *ec = memnew(EmptyControl ); - ec->set_minsize(Size2(150,1)); + Control *ec = memnew(Control ); + ec->set_custom_minimum_size(Size2(150,1)); gvb->add_child(ec); VBoxContainer *group_vb_right = memnew( VBoxContainer ); diff --git a/tools/editor/project_export.h b/tools/editor/project_export.h index dfe7a2d900..e437497dd2 100644 --- a/tools/editor/project_export.h +++ b/tools/editor/project_export.h @@ -40,7 +40,7 @@ #include "os/dir_access.h" #include "os/thread.h" #include "scene/gui/option_button.h" -#include "scene/gui/empty_control.h" + #include "scene/gui/slider.h" #include "tools/editor/editor_file_system.h" #include "property_editor.h" diff --git a/tools/editor/project_manager.cpp b/tools/editor/project_manager.cpp index 4eadd980f4..cf94758ad6 100644 --- a/tools/editor/project_manager.cpp +++ b/tools/editor/project_manager.cpp @@ -39,7 +39,7 @@ #include "scene/gui/line_edit.h" #include "scene/gui/panel_container.h" -#include "scene/gui/empty_control.h" + #include "scene/gui/texture_frame.h" #include "scene/gui/margin_container.h" #include "io/resource_saver.h" @@ -580,8 +580,8 @@ void ProjectManager::_load_recent_projects() { VBoxContainer *vb = memnew(VBoxContainer); hb->add_child(vb); - EmptyControl *ec = memnew( EmptyControl ); - ec->set_minsize(Size2(0,1)); + Control *ec = memnew( Control ); + ec->set_custom_minimum_size(Size2(0,1)); vb->add_child(ec); Label *title = memnew( Label(project_name) ); title->add_font_override("font",get_font("large","Fonts")); |