mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 05:05:19 -05:00
feat: Added command line palette option to open/focus views
This commit is contained in:
@@ -82,6 +82,12 @@ namespace hex {
|
||||
ImGui::GetIO().ConfigFlags &= ~ImGuiConfigFlags_NavEnableKeyboard;
|
||||
}
|
||||
|
||||
void View::bringToFront() {
|
||||
getWindowOpenState() = true;
|
||||
TaskManager::doLater([this]{ ImGui::SetWindowFocus(toWindowName(getUnlocalizedName()).c_str()); });
|
||||
}
|
||||
|
||||
|
||||
std::string View::toWindowName(const UnlocalizedString &unlocalizedName) {
|
||||
return fmt::format("{}###{}", Lang(unlocalizedName), unlocalizedName.get());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user