Make TileMap toolbar a FlowContainer
This commit is contained in:
parent
4368191a9f
commit
156c4cbcb8
@ -3986,7 +3986,7 @@ TileMapEditor::TileMapEditor() {
|
|||||||
tabs_bar->connect("tab_changed", callable_mp(this, &TileMapEditor::_tab_changed));
|
tabs_bar->connect("tab_changed", callable_mp(this, &TileMapEditor::_tab_changed));
|
||||||
|
|
||||||
// --- TileMap toolbar ---
|
// --- TileMap toolbar ---
|
||||||
tile_map_toolbar = memnew(HBoxContainer);
|
tile_map_toolbar = memnew(HFlowContainer);
|
||||||
tile_map_toolbar->set_h_size_flags(SIZE_EXPAND_FILL);
|
tile_map_toolbar->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||||
add_child(tile_map_toolbar);
|
add_child(tile_map_toolbar);
|
||||||
|
|
||||||
@ -4001,8 +4001,11 @@ TileMapEditor::TileMapEditor() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wide empty separation control.
|
// Wide empty separation control. (like BoxContainer::add_spacer())
|
||||||
tile_map_toolbar->add_spacer();
|
Control *c = memnew(Control);
|
||||||
|
c->set_mouse_filter(MOUSE_FILTER_PASS);
|
||||||
|
c->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||||
|
tile_map_toolbar->add_child(c);
|
||||||
|
|
||||||
// Layer selector.
|
// Layer selector.
|
||||||
layers_selection_button = memnew(OptionButton);
|
layers_selection_button = memnew(OptionButton);
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include "scene/2d/tile_map.h"
|
#include "scene/2d/tile_map.h"
|
||||||
#include "scene/gui/box_container.h"
|
#include "scene/gui/box_container.h"
|
||||||
#include "scene/gui/check_box.h"
|
#include "scene/gui/check_box.h"
|
||||||
|
#include "scene/gui/flow_container.h"
|
||||||
#include "scene/gui/item_list.h"
|
#include "scene/gui/item_list.h"
|
||||||
#include "scene/gui/menu_button.h"
|
#include "scene/gui/menu_button.h"
|
||||||
#include "scene/gui/option_button.h"
|
#include "scene/gui/option_button.h"
|
||||||
@ -323,7 +324,7 @@ private:
|
|||||||
Vector<TileMapEditorPlugin *> tile_map_editor_plugins;
|
Vector<TileMapEditorPlugin *> tile_map_editor_plugins;
|
||||||
|
|
||||||
// Toolbar.
|
// Toolbar.
|
||||||
HBoxContainer *tile_map_toolbar = nullptr;
|
HFlowContainer *tile_map_toolbar = nullptr;
|
||||||
|
|
||||||
OptionButton *layers_selection_button = nullptr;
|
OptionButton *layers_selection_button = nullptr;
|
||||||
Button *toggle_highlight_selected_layer_button = nullptr;
|
Button *toggle_highlight_selected_layer_button = nullptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user