add shortcuts, node text font attributes
This commit is contained in:
@@ -22,7 +22,12 @@ void NodeShortcuts::init_controls()
|
||||
m_btn_close->on_click = [this](Node*) {
|
||||
destroy();
|
||||
};
|
||||
add_shortcut("New File", "Ctrl+N");
|
||||
add_shortcut("Quick switch to Erase", "Hold E");
|
||||
add_shortcut("Brush Size Keyboard", "[ and ]");
|
||||
add_shortcut("Brush Size", "Alt + Right Mouse Button");
|
||||
add_shortcut("Color picker", "Alt + Left Mouse Button");
|
||||
add_shortcut("Zoom", "Ctrl + Right Mouse Button");
|
||||
//add_shortcut("", "");
|
||||
}
|
||||
|
||||
void NodeShortcuts::add_shortcut(const std::string& descr, const std::string& shortcut) noexcept
|
||||
@@ -30,6 +35,7 @@ void NodeShortcuts::add_shortcut(const std::string& descr, const std::string& sh
|
||||
auto item = m_content->add_child<NodeShortcutsItem>();
|
||||
item->set_descr(descr);
|
||||
item->set_shortcut(shortcut);
|
||||
item->m_color = glm::vec4(glm::vec3(m_content->get_child_index(item) % 2 == 0 ? .1f : .0f), 1);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user