16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 03:09:18 +02:00

node cloner

This commit is contained in:
milek7
2019-02-23 01:03:18 +01:00
parent 939aa73384
commit 5fe4e1213e
12 changed files with 205 additions and 18 deletions

View File

@@ -18,6 +18,7 @@ editor_ui::editor_ui() {
clear_panels();
// bind the panels with ui object. maybe not the best place for this but, eh
push_back( &m_itempropertiespanel );
push_back( &m_nodebankpanel );
}
// potentially processes provided input key. returns: true if key was processed, false otherwise
@@ -54,3 +55,28 @@ editor_ui::set_node( scene::basic_node * Node ) {
m_node = Node;
}
nodebank_panel::edit_mode
editor_ui::mode() {
return m_nodebankpanel.mode;
}
void
editor_ui::add_node_template(const std::string &desc) {
m_nodebankpanel.add_template(desc);
}
const std::string *editor_ui::get_active_node_template() {
return m_nodebankpanel.get_active_template();
}
void editor_ui::render_menu_contents() {
ui_layer::render_menu_contents();
if (ImGui::BeginMenu(locale::strings[locale::string::ui_mode_windows].c_str()))
{
ImGui::MenuItem(m_nodebankpanel.title.c_str(), nullptr, &m_nodebankpanel.is_open);
ImGui::EndMenu();
}
}