mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-21 10:19:17 +02:00
Add brush mode in editor mode
This commit is contained in:
@@ -14,64 +14,68 @@ http://mozilla.org/MPL/2.0/.
|
||||
#include "scenenode.h"
|
||||
#include "renderer.h"
|
||||
|
||||
editor_ui::editor_ui() {
|
||||
editor_ui::editor_ui()
|
||||
{
|
||||
|
||||
clear_panels();
|
||||
// bind the panels with ui object. maybe not the best place for this but, eh
|
||||
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 );
|
||||
add_external_panel( &m_functionspanel );
|
||||
add_external_panel(&m_itempropertiespanel);
|
||||
add_external_panel(&m_nodebankpanel);
|
||||
add_external_panel(&m_functionspanel);
|
||||
}
|
||||
|
||||
// updates state of UI elements
|
||||
void
|
||||
editor_ui::update() {
|
||||
void editor_ui::update()
|
||||
{
|
||||
|
||||
set_tooltip( "" );
|
||||
set_tooltip("");
|
||||
|
||||
if( Global.ControlPicking && DebugModeFlag ) {
|
||||
const auto sceneryNode = GfxRenderer->Pick_Node();
|
||||
if (Global.ControlPicking && DebugModeFlag)
|
||||
{
|
||||
const auto sceneryNode = GfxRenderer->Pick_Node();
|
||||
const std::string content = sceneryNode ? sceneryNode->tooltip() : "";
|
||||
set_tooltip(content);
|
||||
}
|
||||
set_tooltip(content);
|
||||
}
|
||||
|
||||
ui_layer::update();
|
||||
m_itempropertiespanel.update( m_node );
|
||||
m_functionspanel.update( m_node );
|
||||
ui_layer::update();
|
||||
m_itempropertiespanel.update(m_node);
|
||||
m_functionspanel.update(m_node);
|
||||
}
|
||||
|
||||
void
|
||||
editor_ui::set_node( scene::basic_node * Node ) {
|
||||
|
||||
m_node = Node;
|
||||
void editor_ui::set_node(scene::basic_node *Node)
|
||||
{
|
||||
m_node = Node;
|
||||
}
|
||||
|
||||
void
|
||||
editor_ui::add_node_template(const std::string &desc) {
|
||||
void editor_ui::add_node_template(const std::string &desc)
|
||||
{
|
||||
m_nodebankpanel.add_template(desc);
|
||||
}
|
||||
|
||||
std::string const *
|
||||
editor_ui::get_active_node_template() {
|
||||
std::string const *editor_ui::get_active_node_template()
|
||||
{
|
||||
return m_nodebankpanel.get_active_template();
|
||||
}
|
||||
|
||||
nodebank_panel::edit_mode
|
||||
editor_ui::mode() {
|
||||
nodebank_panel::edit_mode editor_ui::mode()
|
||||
{
|
||||
return m_nodebankpanel.mode;
|
||||
}
|
||||
float editor_ui::getSpacing()
|
||||
{
|
||||
return m_nodebankpanel.spacing;
|
||||
}
|
||||
|
||||
functions_panel::rotation_mode
|
||||
editor_ui::rot_mode() {
|
||||
functions_panel::rotation_mode editor_ui::rot_mode()
|
||||
{
|
||||
return m_functionspanel.rot_mode;
|
||||
}
|
||||
float
|
||||
editor_ui::rot_val() {
|
||||
float editor_ui::rot_val()
|
||||
{
|
||||
return m_functionspanel.rot_value;
|
||||
}
|
||||
bool
|
||||
editor_ui::rot_from_last()
|
||||
bool editor_ui::rot_from_last()
|
||||
{
|
||||
return m_functionspanel.rot_from_last;
|
||||
}
|
||||
Reference in New Issue
Block a user