mirror of https://github.com/WerWolv/ImHex.git
ui: Fix rendering and default view initializing
This commit is contained in:
parent
b6b5045340
commit
c8b7f350ad
|
@ -197,7 +197,7 @@ namespace hex {
|
||||||
ImGui::NewFrame();
|
ImGui::NewFrame();
|
||||||
|
|
||||||
ImGuiViewport *viewport = ImGui::GetMainViewport();
|
ImGuiViewport *viewport = ImGui::GetMainViewport();
|
||||||
ImGui::SetNextWindowPos(ImVec2(0, ImGui::GetTextLineHeightWithSpacing()));
|
ImGui::SetNextWindowPos(viewport->WorkPos);
|
||||||
ImGui::SetNextWindowSize(ImHexApi::System::getMainWindowSize() - ImVec2(0, ImGui::GetTextLineHeightWithSpacing()));
|
ImGui::SetNextWindowSize(ImHexApi::System::getMainWindowSize() - ImVec2(0, ImGui::GetTextLineHeightWithSpacing()));
|
||||||
ImGui::SetNextWindowViewport(viewport->ID);
|
ImGui::SetNextWindowViewport(viewport->ID);
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 0.0f);
|
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 0.0f);
|
||||||
|
|
|
@ -32,7 +32,7 @@ namespace hex::plugin::builtin {
|
||||||
|
|
||||||
static std::string s_tipOfTheDay;
|
static std::string s_tipOfTheDay;
|
||||||
|
|
||||||
[[maybe_unused]] static void loadDefaultLayout() {
|
static void loadDefaultLayout() {
|
||||||
auto layouts = ContentRegistry::Interface::getLayouts();
|
auto layouts = ContentRegistry::Interface::getLayouts();
|
||||||
if (!layouts.empty()) {
|
if (!layouts.empty()) {
|
||||||
|
|
||||||
|
@ -434,8 +434,8 @@ namespace hex::plugin::builtin {
|
||||||
});
|
});
|
||||||
|
|
||||||
EventManager::subscribe<EventProviderCreated>([](auto) {
|
EventManager::subscribe<EventProviderCreated>([](auto) {
|
||||||
//if (!isAnyViewOpen())
|
if (!isAnyViewOpen())
|
||||||
//loadDefaultLayout();
|
loadDefaultLayout();
|
||||||
});
|
});
|
||||||
|
|
||||||
ContentRegistry::Interface::addMenuItem("hex.builtin.menu.file", 1075, [&] {
|
ContentRegistry::Interface::addMenuItem("hex.builtin.menu.file", 1075, [&] {
|
||||||
|
|
Loading…
Reference in New Issue