[nostalgia/core/studio] Add Palette page names to editor
All checks were successful
Build / build (push) Successful in 2m33s

This commit is contained in:
2024-09-06 21:35:09 -05:00
parent ba4540e43f
commit 52533c8c44
8 changed files with 136 additions and 37 deletions

View File

@ -29,7 +29,7 @@ bool AboutPopup::isOpen() const noexcept {
return m_stage == Stage::Open;
}
void AboutPopup::draw(studio::StudioContext &sctx) noexcept {
void AboutPopup::draw(StudioContext &sctx) noexcept {
switch (m_stage) {
case Stage::Closed:
break;
@ -40,15 +40,14 @@ void AboutPopup::draw(studio::StudioContext &sctx) noexcept {
case Stage::Open: {
constexpr auto modalFlags =
ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize;
ImGui::SetNextWindowSize(ImVec2(215, 90));
studio::ig::centerNextWindow(sctx.tctx);
ig::centerNextWindow(sctx.tctx);
auto open = true;
if (ImGui::BeginPopupModal("About", &open, modalFlags)) {
ImGui::Text("%s", m_text.c_str());
ImGui::NewLine();
ImGui::Dummy(ImVec2(148.0f, 0.0f));
ImGui::Dummy({148.0f, 0.0f});
ImGui::SameLine();
if (ImGui::Button("Close")) {
if (ig::PushButton("Close")) {
ImGui::CloseCurrentPopup();
open = false;
}