mirror of https://github.com/WerWolv/ImHex.git
fix: Stop all views from opening automatically on launch
This commit is contained in:
parent
907f25c231
commit
959988a670
|
@ -63,7 +63,7 @@ namespace hex {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string m_unlocalizedViewName;
|
std::string m_unlocalizedViewName;
|
||||||
bool m_windowOpen = this->hasViewMenuItemEntry();
|
bool m_windowOpen = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
|
@ -47,7 +47,7 @@ namespace hex {
|
||||||
buf->appendf("[%s][General]\n", handler->TypeName);
|
buf->appendf("[%s][General]\n", handler->TypeName);
|
||||||
|
|
||||||
for (auto &view : ContentRegistry::Views::getEntries()) {
|
for (auto &view : ContentRegistry::Views::getEntries()) {
|
||||||
buf->appendf("%s=%d\n", typeid(*view).name(), view->getWindowOpenState());
|
buf->appendf("%s=%d\n", view->getUnlocalizedName().data(), view->getWindowOpenState());
|
||||||
}
|
}
|
||||||
|
|
||||||
buf->append("\n");
|
buf->append("\n");
|
||||||
|
@ -102,6 +102,13 @@ namespace hex {
|
||||||
if (targetFps.is_number())
|
if (targetFps.is_number())
|
||||||
this->m_targetFps = targetFps;
|
this->m_targetFps = targetFps;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
if (ContentRegistry::Settings::read("hex.builtin.setting.imhex", "hex.builtin.setting.imhex.launched", 0) == 1)
|
||||||
|
this->m_layoutConfigured = true;
|
||||||
|
else
|
||||||
|
ContentRegistry::Settings::write("hex.builtin.setting.imhex", "hex.builtin.setting.imhex.launched", 1);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
EventManager::subscribe<EventFileLoaded>(this, [this](const std::string &path){
|
EventManager::subscribe<EventFileLoaded>(this, [this](const std::string &path){
|
||||||
|
@ -370,11 +377,8 @@ namespace hex {
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
} else if (!this->m_layoutConfigured) {
|
} else if (!this->m_layoutConfigured) {
|
||||||
this->m_layoutConfigured = true;
|
this->m_layoutConfigured = true;
|
||||||
if (ContentRegistry::Settings::read("hex.builtin.setting.imhex", "hex.builtin.setting.imhex.launched", 0) == 0) {
|
|
||||||
ContentRegistry::Settings::write("hex.builtin.setting.imhex", "hex.builtin.setting.imhex.launched", 1);
|
|
||||||
this->resetLayout();
|
this->resetLayout();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
|
|
Loading…
Reference in New Issue