Merge remote-tracking branch 'tmj/master' into sim

This commit is contained in:
milek7
2020-10-18 23:35:14 +02:00
244 changed files with 54164 additions and 11636 deletions

View File

@@ -11,23 +11,16 @@ http://mozilla.org/MPL/2.0/.
#include "editoruilayer.h"
#include "Globals.h"
#include "opengl33renderer.h"
#include "scenenode.h"
#include "renderer.h"
editor_ui::editor_ui() {
clear_panels();
// bind the panels with ui object. maybe not the best place for this but, eh
add_external_panel( &m_itempropertiespanel );
add_external_panel( &m_nodebankpanel );
}
// potentially processes provided input key. returns: true if key was processed, false otherwise
bool
editor_ui::on_key( int const Key, int const Action ) {
if (ui_layer::on_key(Key, Action))
return true;
return false;
add_external_panel( &m_nodebankpanel );
}
// updates state of UI elements
@@ -39,7 +32,7 @@ editor_ui::update() {
if( ( true == Global.ControlPicking )
&& ( true == DebugModeFlag ) ) {
auto const scenerynode = GfxRenderer.get_picked_node();
auto const scenerynode = GfxRenderer->Pick_Node();
set_tooltip(
( scenerynode ?
scenerynode->name() :
@@ -56,27 +49,17 @@ 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() {
std::string const *
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(STR_C("Mode windows")))
{
ImGui::MenuItem(m_nodebankpanel.title.c_str(), nullptr, &m_nodebankpanel.is_open);
ImGui::EndMenu();
}
nodebank_panel::edit_mode
editor_ui::mode() {
return m_nodebankpanel.mode;
}