mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-01 20:35:04 +01:00
Merge remote-tracking branch 'origin/feat/switch-blades' into feat/renderers-cleanup
This commit is contained in:
@@ -32,6 +32,10 @@ class editor_ui : public ui_layer
|
||||
// updates state of UI elements
|
||||
void update() override;
|
||||
void set_node(scene::basic_node *Node);
|
||||
scene::basic_node *node() const
|
||||
{
|
||||
return m_node;
|
||||
}
|
||||
// include of a scenery template to show in the node properties in place of a node; nullptr if there's none
|
||||
void set_include(include_selection *Include);
|
||||
void add_node_template(const std::string &desc);
|
||||
@@ -111,6 +115,13 @@ class editor_ui : public ui_layer
|
||||
void set_new_scenery(std::function<void()> New) { m_newscenery = std::move(New); }
|
||||
void set_open_scenery(std::function<void()> Open) { m_openscenery = std::move(Open); }
|
||||
void set_memcell_focus(std::function<void(scene::basic_node *)> Focus) { m_memcellspanel.focus = std::move(Focus); }
|
||||
// draws the base layers under the scenery at the bottom of the layers window (they live in the editor mode)
|
||||
void set_base_layers(std::function<void()> Renderer) { m_layerspanel.base_layers = std::move(Renderer); }
|
||||
void show_layers()
|
||||
{
|
||||
m_layerspanel.is_open = true;
|
||||
m_layerspanel.focus = true;
|
||||
}
|
||||
// part of the main window between the docked windows, where the 3d view is seen; for the overlays placed in it
|
||||
static glm::vec2 view_min()
|
||||
{
|
||||
@@ -166,9 +177,14 @@ class editor_ui : public ui_layer
|
||||
static void register_settings();
|
||||
// shows outcome of an operation in the layers window
|
||||
void set_status(std::string const &Status, bool const Error = false);
|
||||
// a warning after an operation done: added to its status, shown by the cursor for a while
|
||||
void set_notice(std::string const &Notice);
|
||||
// the refusal or warning by the cursor taken away before its time, when what it tells of was taken back
|
||||
void drop_refusal() { m_refusal.clear(); }
|
||||
|
||||
private:
|
||||
// methods
|
||||
void render_refusal();
|
||||
void render_mode_options(nodebank_panel::edit_mode const Mode);
|
||||
// windows of the editor drawn by the user interface itself
|
||||
void render_tool_options();
|
||||
@@ -215,6 +231,10 @@ class editor_ui : public ui_layer
|
||||
std::function<void()> m_editmenu;
|
||||
std::function<void()> m_toolsmenu;
|
||||
bool m_layoutreset{false}; // the default layout is to be built again on the next frame
|
||||
std::string m_refusal;
|
||||
double m_refusaltime{-100.0};
|
||||
bool m_refusalnotice{false}; // a warning rather than a refusal
|
||||
double m_statustime{-100.0};
|
||||
bool m_tooloptionsopen{true};
|
||||
bool m_inspectoropen{true};
|
||||
bool m_sceneopen{true};
|
||||
|
||||
Reference in New Issue
Block a user