Implemented Open File and Preferences button in Welcome screen

This commit is contained in:
WerWolv
2021-01-27 14:26:24 +01:00
parent bc6d33e4fb
commit 319068eef5
13 changed files with 66 additions and 33 deletions

View File

@@ -5,8 +5,6 @@
namespace hex {
ViewCommandPalette::ViewCommandPalette() : View("Command Palette") {
this->getWindowOpenState() = true;
this->m_commandBuffer.resize(1024, 0x00);
this->m_lastResults = this->getCommandResults("");
}
@@ -17,6 +15,8 @@ namespace hex {
void ViewCommandPalette::drawContent() {
if (!this->getWindowOpenState()) return;
auto windowPos = SharedData::windowPos;
auto windowSize = SharedData::windowSize;
auto paletteSize = this->getMinSize();
@@ -49,7 +49,10 @@ namespace hex {
}
ImGui::EndPopup();
} else {
this->getWindowOpenState() = false;
}
}
void ViewCommandPalette::drawMenu() {
@@ -61,6 +64,7 @@ namespace hex {
View::doLater([this] {
this->m_justOpened = true;
ImGui::OpenPopup("Command Palette");
this->getWindowOpenState() = true;
});
return true;
}