Hide "Tilemap" menu properly in CanvasItem view
This commit is contained in:
parent
6098a7f191
commit
1aaab30a2b
|
@ -1949,6 +1949,7 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) {
|
||||||
|
|
||||||
// Container to the right of the toolbar
|
// Container to the right of the toolbar
|
||||||
toolbar_right = memnew(HBoxContainer);
|
toolbar_right = memnew(HBoxContainer);
|
||||||
|
toolbar_right->hide();
|
||||||
toolbar_right->set_h_size_flags(SIZE_EXPAND_FILL);
|
toolbar_right->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||||
toolbar_right->set_alignment(BoxContainer::ALIGN_END);
|
toolbar_right->set_alignment(BoxContainer::ALIGN_END);
|
||||||
CanvasItemEditor::get_singleton()->add_control_to_menu_panel(toolbar_right);
|
CanvasItemEditor::get_singleton()->add_control_to_menu_panel(toolbar_right);
|
||||||
|
@ -2045,10 +2046,12 @@ void TileMapEditorPlugin::make_visible(bool p_visible) {
|
||||||
|
|
||||||
tile_map_editor->show();
|
tile_map_editor->show();
|
||||||
tile_map_editor->get_toolbar()->show();
|
tile_map_editor->get_toolbar()->show();
|
||||||
|
tile_map_editor->get_toolbar_right()->show();
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
tile_map_editor->hide();
|
tile_map_editor->hide();
|
||||||
tile_map_editor->get_toolbar()->hide();
|
tile_map_editor->get_toolbar()->hide();
|
||||||
|
tile_map_editor->get_toolbar_right()->hide();
|
||||||
tile_map_editor->edit(NULL);
|
tile_map_editor->edit(NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -214,6 +214,7 @@ protected:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
HBoxContainer *get_toolbar() const { return toolbar; }
|
HBoxContainer *get_toolbar() const { return toolbar; }
|
||||||
|
HBoxContainer *get_toolbar_right() const { return toolbar_right; }
|
||||||
|
|
||||||
bool forward_gui_input(const Ref<InputEvent> &p_event);
|
bool forward_gui_input(const Ref<InputEvent> &p_event);
|
||||||
void forward_canvas_draw_over_viewport(Control *p_overlay);
|
void forward_canvas_draw_over_viewport(Control *p_overlay);
|
||||||
|
|
Loading…
Reference in New Issue