add shortcuts, node text font attributes

This commit is contained in:
2019-12-02 17:10:08 +01:00
parent baec98835a
commit aac280f48a
8 changed files with 80 additions and 18 deletions

View File

@@ -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);
}
//////////////////////////////////////////////////////////////////////////