From 8a29c0952c4b66f547a57061338f24eedca40d80 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Fri, 19 Jan 2024 00:15:28 -0600 Subject: [PATCH] [olympic/studio] Fix imguiutil.hpp name, add StudioContext::tctx --- src/olympic/studio/applib/src/aboutpopup.cpp | 2 +- src/olympic/studio/applib/src/main.cpp | 2 +- src/olympic/studio/applib/src/newmenu.cpp | 2 +- src/olympic/studio/applib/src/newproject.cpp | 2 +- src/olympic/studio/modlib/include/studio/context.hpp | 4 ++++ .../modlib/include/studio/{imguiuitl.hpp => imguiutil.hpp} | 0 src/olympic/studio/modlib/include/studio/studio.hpp | 2 +- src/olympic/studio/modlib/src/popup.cpp | 2 +- 8 files changed, 10 insertions(+), 6 deletions(-) rename src/olympic/studio/modlib/include/studio/{imguiuitl.hpp => imguiutil.hpp} (100%) diff --git a/src/olympic/studio/applib/src/aboutpopup.cpp b/src/olympic/studio/applib/src/aboutpopup.cpp index f5930529..ebd93ddc 100644 --- a/src/olympic/studio/applib/src/aboutpopup.cpp +++ b/src/olympic/studio/applib/src/aboutpopup.cpp @@ -4,7 +4,7 @@ #include -#include +#include #include "aboutpopup.hpp" namespace olympic { diff --git a/src/olympic/studio/applib/src/main.cpp b/src/olympic/studio/applib/src/main.cpp index 4e2de237..135186ac 100644 --- a/src/olympic/studio/applib/src/main.cpp +++ b/src/olympic/studio/applib/src/main.cpp @@ -48,7 +48,7 @@ static ox::Error runApp( turbine::setUpdateHandler(*ctx, updateHandler); turbine::setKeyEventHandler(*ctx, keyEventHandler); turbine::setConstantRefresh(*ctx, false); - studio::StudioContext studioCtx; + studio::StudioContext studioCtx(*ctx); turbine::setApplicationData(*ctx, &studioCtx); StudioUI ui(*ctx, projectDataDir); studioCtx.ui = &ui; diff --git a/src/olympic/studio/applib/src/newmenu.cpp b/src/olympic/studio/applib/src/newmenu.cpp index 21897b22..e5786cac 100644 --- a/src/olympic/studio/applib/src/newmenu.cpp +++ b/src/olympic/studio/applib/src/newmenu.cpp @@ -6,7 +6,7 @@ #include -#include +#include #include "newmenu.hpp" diff --git a/src/olympic/studio/applib/src/newproject.cpp b/src/olympic/studio/applib/src/newproject.cpp index 1c624b78..647dd25c 100644 --- a/src/olympic/studio/applib/src/newproject.cpp +++ b/src/olympic/studio/applib/src/newproject.cpp @@ -4,7 +4,7 @@ #include -#include +#include #include #include "filedialogmanager.hpp" diff --git a/src/olympic/studio/modlib/include/studio/context.hpp b/src/olympic/studio/modlib/include/studio/context.hpp index f3b93d3b..c7101bac 100644 --- a/src/olympic/studio/modlib/include/studio/context.hpp +++ b/src/olympic/studio/modlib/include/studio/context.hpp @@ -6,6 +6,8 @@ #include +#include + #include "project.hpp" namespace studio { @@ -13,6 +15,8 @@ namespace studio { struct StudioContext { class StudioUI *ui = nullptr; Project *project = nullptr; + turbine::Context &tctx; + inline explicit StudioContext(turbine::Context &pTctx) noexcept: tctx(pTctx) {} }; } diff --git a/src/olympic/studio/modlib/include/studio/imguiuitl.hpp b/src/olympic/studio/modlib/include/studio/imguiutil.hpp similarity index 100% rename from src/olympic/studio/modlib/include/studio/imguiuitl.hpp rename to src/olympic/studio/modlib/include/studio/imguiutil.hpp diff --git a/src/olympic/studio/modlib/include/studio/studio.hpp b/src/olympic/studio/modlib/include/studio/studio.hpp index 40de7385..13d2ab05 100644 --- a/src/olympic/studio/modlib/include/studio/studio.hpp +++ b/src/olympic/studio/modlib/include/studio/studio.hpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/olympic/studio/modlib/src/popup.cpp b/src/olympic/studio/modlib/src/popup.cpp index a3b26398..65a3d097 100644 --- a/src/olympic/studio/modlib/src/popup.cpp +++ b/src/olympic/studio/modlib/src/popup.cpp @@ -2,7 +2,7 @@ * Copyright 2016 - 2024 Gary Talent (gary@drinkingtea.net). All rights reserved. */ -#include +#include #include namespace studio {