diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-01-04 01:36:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-04 01:36:24 +0100 |
commit | 1235d422ea75a782e70fab9de2094b14bf837fc2 (patch) | |
tree | ec2c5ebffd887f534ec840b4b731ecf6efb869c8 /editor/plugins | |
parent | 023c04689e176d1669a34619e9624d817aa5e33e (diff) | |
parent | fb68ceebae5cf660bbcd21fa574e653279286b0a (diff) |
Merge pull request #15309 from YeldhamDev/tileset_button_fix
Fixed the "Tile Set" button being able to go out of bounds
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/tile_set_editor_plugin.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp index eccb11ba12..632684abc3 100644 --- a/editor/plugins/tile_set_editor_plugin.cpp +++ b/editor/plugins/tile_set_editor_plugin.cpp @@ -238,11 +238,8 @@ void TileSetEditor::_bind_methods() { TileSetEditor::TileSetEditor(EditorNode *p_editor) { - Panel *panel = memnew(Panel); - panel->set_anchors_and_margins_preset(Control::PRESET_WIDE); - add_child(panel); MenuButton *options = memnew(MenuButton); - panel->add_child(options); + CanvasItemEditor::get_singleton()->add_control_to_menu_panel(options); options->set_position(Point2(1, 1)); options->set_text(TTR("Tile Set")); options->get_popup()->add_item(TTR("Add Item"), MENU_OPTION_ADD_ITEM); @@ -345,7 +342,7 @@ AutotileEditor::AutotileEditor(EditorNode *p_editor) { helper = memnew(AutotileEditorHelper(this)); property_editor->edit(helper); - // Editor + //Editor dragging_point = -1; creating_shape = false; @@ -420,8 +417,6 @@ AutotileEditor::AutotileEditor(EditorNode *p_editor) { p.push_back((int)SHAPE_DELETE); tools[SHAPE_DELETE]->connect("pressed", this, "_on_tool_clicked", p); tool_containers[TOOLBAR_SHAPE]->add_child(tools[SHAPE_DELETE]); - //tools[SHAPE_CREATE_FROM_NOT_BITMASKED] = memnew(ToolButton); - //tool_containers[TOOLBAR_SHAPE]->add_child(tools[SHAPE_CREATE_FROM_NOT_BITMASKED]); tool_containers[TOOLBAR_SHAPE]->add_change_receptor(memnew(VSeparator)); tools[SHAPE_KEEP_INSIDE_TILE] = memnew(ToolButton); tools[SHAPE_KEEP_INSIDE_TILE]->set_toggle_mode(true); |