void Settings::showShortcutSettings() { auto& actions = m_app.getActions(); ImGui::LabellessInputText("Filter", m_filter, lengthOf(m_filter)); ImGui::Columns(4); ImGui::Text("Label"); ImGui::NextColumn(); ImGui::Text("Shortcut key 1"); ImGui::NextColumn(); ImGui::Text("Shortcut key 2"); ImGui::NextColumn(); ImGui::Text("Shortcut key 3"); ImGui::NextColumn(); ImGui::Separator(); for (int i = 0; i < actions.size(); ++i) { Action& a = *actions[i]; if (m_filter[0] == 0 || stristr(a.label_long, m_filter) != 0) { ImGui::AlignTextToFramePadding(); ImGui::Text("%s", a.label_long); ImGui::NextColumn(); shortcutInput(a.shortcut[0]); ImGui::NextColumn(); shortcutInput(a.shortcut[1]); ImGui::NextColumn(); shortcutInput(a.shortcut[2]); ImGui::NextColumn(); } } ImGui::Columns(1); }
void Settings::showShortcutSettings() { auto& actions = m_app.getActions(); ImGui::FilterInput("Filter", m_filter, Lumix::lengthOf(m_filter)); ImGui::Columns(4); ImGui::Text("Label"); ImGui::NextColumn(); ImGui::Text("Shortcut key 1"); ImGui::NextColumn(); ImGui::Text("Shortcut key 2"); ImGui::NextColumn(); ImGui::Text("Shortcut key 3"); ImGui::NextColumn(); ImGui::Separator(); for (int i = 0; i < actions.size(); ++i) { Action& a = *actions[i]; if (m_filter[0] == 0 || Lumix::stristr(a.label, m_filter) != 0) { ImGui::AlignFirstTextHeightToWidgets(); ImGui::Text("%s", a.label); ImGui::NextColumn(); shortcutInput(a.shortcut[0]); ImGui::NextColumn(); shortcutInput(a.shortcut[1]); ImGui::NextColumn(); shortcutInput(a.shortcut[2]); ImGui::NextColumn(); } } ImGui::Columns(1); }
void Settings::showShortcutSettings(Action** actions, int actions_count) { ImGui::InputText("Filter", m_filter, Lumix::lengthOf(m_filter)); ImGui::Columns(4); for (int i = 0; i < actions_count; ++i) { Action& a = *actions[i]; if (m_filter[0] == 0 || Lumix::stristr(a.label, m_filter) != 0) { ImGui::Text(a.label); ImGui::NextColumn(); shortcutInput(a.shortcut[0]); ImGui::NextColumn(); shortcutInput(a.shortcut[1]); ImGui::NextColumn(); shortcutInput(a.shortcut[2]); ImGui::NextColumn(); } } ImGui::Columns(1); }