Snapshots, refactoring

This commit is contained in:
2025-10-26 16:06:34 -04:00
parent fe9366f9ef
commit dd3aeae6d2
16 changed files with 443 additions and 106 deletions

View File

@@ -236,8 +236,8 @@ namespace anm2ed::imgui
bool shortcut(std::string string, shortcut::Type type)
{
if (ImGui::GetTopMostPopupModal() != nullptr) return false;
auto flags = type == shortcut::GLOBAL || type == shortcut::GLOBAL_SET ? ImGuiInputFlags_RouteGlobal
: ImGuiInputFlags_RouteFocused;
int flags = type == shortcut::GLOBAL || type == shortcut::GLOBAL_SET ? ImGuiInputFlags_RouteGlobal
: ImGuiInputFlags_RouteFocused;
if (type == shortcut::GLOBAL_SET || type == shortcut::FOCUSED_SET)
{
ImGui::SetNextItemShortcut(string_to_chord(string), flags);