From 578bd98b404662ba2fe7f1224e1792d93cd6501f Mon Sep 17 00:00:00 2001 From: Joey Pollack Date: Fri, 24 Jun 2022 18:57:27 -0400 Subject: [PATCH] ImGui::Begin call moved to the Panel class Adds PreBegin in case code needs to be run just before ImGui::Begin is called --- src/core/core_console.cpp | 26 ++----- src/core/core_console.h | 3 +- src/gui/console.cpp | 18 ++--- src/gui/console.h | 4 +- src/gui/panel.cpp | 74 ++++++++++++++++++- src/gui/panel.h | 38 +++++++++- src/gui/panel_manager.cpp | 2 +- src/run_modes/editor/panels/about.cpp | 19 ++--- src/run_modes/editor/panels/about.h | 3 +- src/run_modes/editor/panels/asset_browser.cpp | 22 ++---- src/run_modes/editor/panels/asset_browser.h | 4 +- .../editor/panels/properties_view.cpp | 16 +--- src/run_modes/editor/panels/properties_view.h | 2 +- src/run_modes/editor/panels/world_tree.cpp | 16 +--- src/run_modes/editor/panels/world_tree.h | 2 +- src/run_modes/editor/panels/world_view.cpp | 23 ++---- src/run_modes/editor/panels/world_view.h | 2 +- .../tools/map_editor/panels/map_canvas.cpp | 22 ++---- .../tools/map_editor/panels/map_canvas.h | 3 +- .../tools/map_editor/panels/tile_set_view.cpp | 21 ++---- .../tools/map_editor/panels/tile_set_view.h | 3 +- 21 files changed, 171 insertions(+), 152 deletions(-) diff --git a/src/core/core_console.cpp b/src/core/core_console.cpp index 216150e..d40824a 100644 --- a/src/core/core_console.cpp +++ b/src/core/core_console.cpp @@ -15,7 +15,8 @@ namespace lunarium { CoreConsole::CoreConsole() - : Console("Core Console"), mDockIsInit(false) + : Console("Core Console", ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoTitleBar + | ImGuiWindowFlags_NoCollapse), mDockIsInit(false) { } @@ -24,14 +25,10 @@ namespace lunarium { } - bool CoreConsole::DoFrame() + void CoreConsole::PreBegin() { InitDock(); - - if (!mIsOpen) - return false; - - + ImGuiViewport* pView = ImGui::GetMainViewport(); float myHeight = pView->WorkSize.y / 3.0f; @@ -41,18 +38,11 @@ namespace lunarium ImGui::SetNextWindowPos(ImVec2(pView->WorkPos.x, y), ImGuiCond_Always); ImGui::SetNextWindowSize(ImVec2(pView->WorkSize.x, myHeight), ImGuiCond_Always); ImGui::SetNextWindowBgAlpha(alpha); - if (!ImGui::Begin(GetName(), &mIsOpen, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoTitleBar - | ImGuiWindowFlags_NoCollapse)) - { - ImGui::End(); - return mIsOpen; - } - - Console::DoFrame(); - - ImGui::End(); + } - return mIsOpen; + void CoreConsole::DoFrame() + { + Console::DoFrame(); } void CoreConsole::InitDock() diff --git a/src/core/core_console.h b/src/core/core_console.h index eea01b7..1c8ffbb 100644 --- a/src/core/core_console.h +++ b/src/core/core_console.h @@ -18,7 +18,8 @@ namespace lunarium public: CoreConsole(); virtual ~CoreConsole(); - bool DoFrame() override; + void DoFrame() override; + void PreBegin(); private: void InitDock(); diff --git a/src/gui/console.cpp b/src/gui/console.cpp index 280dad1..5fa9516 100644 --- a/src/gui/console.cpp +++ b/src/gui/console.cpp @@ -43,8 +43,8 @@ namespace lunarium //////////////////////////////////////////////////////////// // CONSOLE //////////////////////////////////////////////////////////// - Console::Console(const char* name) - : Panel(name, PanelDockZone::DDZ_NONE, false), + Console::Console(const char* name, int window_flags) + : Panel(name, PanelDockZone::DDZ_NONE, false, window_flags), mbNewCommand(false), mRecalledCommand(-1), mIsFocused(false), mListener(nullptr), mbOglDebug(false), mbInfoVerbose(false), mpListener(nullptr) { @@ -67,20 +67,14 @@ namespace lunarium void Console::Update(float dt) { - - } - - bool Console::DoFrame() - { - if (Core::Input().IsKeyDown(KeyCode::ESCAPE, true)) { mRecalledCommand = -1; } + } - - - + void Console::DoFrame() + { float history_height = ImGui::GetWindowSize().y - 45; ImGui::BeginChild("history", ImVec2(0, history_height), false, ImGuiWindowFlags_AlwaysVerticalScrollbar | ImGuiWindowFlags_NoMove); mIsFocused = ImGui::IsWindowFocused(ImGuiFocusedFlags_RootAndChildWindows); @@ -156,8 +150,6 @@ namespace lunarium ImGui::EndChild(); //mAlpha = mIsFocused ? 0.75f : 0.5f; - - return mIsOpen; } const std::vector* Console::GetCommandHistory() const diff --git a/src/gui/console.h b/src/gui/console.h index f1ead78..e3514c9 100644 --- a/src/gui/console.h +++ b/src/gui/console.h @@ -32,10 +32,10 @@ namespace lunarium class Console : public Panel { public: - Console(const char* name); + Console(const char* name, int window_flags); virtual ~Console(); virtual void Update(float dt); - virtual bool DoFrame(); + virtual void DoFrame(); bool IsFocused() const; diff --git a/src/gui/panel.cpp b/src/gui/panel.cpp index 43c1cc9..9057729 100644 --- a/src/gui/panel.cpp +++ b/src/gui/panel.cpp @@ -12,8 +12,8 @@ namespace lunarium { - Panel::Panel(std::string name, PanelDockZone dock_zone, bool isOpen) - : mIsOpen(isOpen), mPanelName(name), mDockZone(dock_zone) + Panel::Panel(std::string name, PanelDockZone dock_zone, bool isOpen, int window_flags) + : mIsOpen(isOpen), mPanelName(name), mDockZone(dock_zone), mWindowFlags(window_flags) { } @@ -33,6 +33,12 @@ namespace lunarium return mDockZone; } + + void Panel::SetWindowFlags(int flags) + { + mWindowFlags = flags; + } + void Panel::SetOpen(bool isOpen) { mIsOpen = isOpen; @@ -42,7 +48,6 @@ namespace lunarium { return mIsOpen; } - void Panel::GetPosition(int& x, int& y) const { @@ -55,12 +60,75 @@ namespace lunarium w = mWidth; h = mHeight; } + + + void Panel::SetNumPushedStyles(int num) + { + mNumPushedStyles = num; + } void Panel::Update(float dt) { } + void Panel::PreBegin() + { + + } + + bool Panel::OnUIRender() + { + if (!mIsOpen) + return false; + + PreBegin(); + + if (!ImGui::Begin(GetName(), &mIsOpen, (ImGuiWindowFlags) mWindowFlags)) + { + ImGui::PopStyleVar(mNumPushedStyles); + ImGui::End(); + return false; + } + + ImGui::PopStyleVar(mNumPushedStyles); + UpdateMetaInfo(); + + DoFrame(); + + RunPopups(); + + ImGui::End(); + return true; + } + + + OpRes Panel::AddPopup(int id, std::string name, std::function func) + { + auto iter = mPopups.find(id); + if (iter != mPopups.end()) + { + return OpRes::Fail("A popup with id: %d alread exists. Existing name: %s, New Name: %s", + iter->first, iter->second->Name.c_str(), name.c_str()); + } + + mPopups[id] = new Popup { func, false, name }; + return OpRes::OK(); + } + + void Panel::RunPopups() + { + for (auto iter = mPopups.begin(); iter != mPopups.end(); iter++) + { + Popup* ppu = iter->second; + if (ppu->IsOpen) + { + ppu->IsOpen = ppu->PopupFunc(this); + ImGui::OpenPopup(ppu->Name.c_str()); + } + } + } + void Panel::UpdateMetaInfo() { ImVec2 p = ImGui::GetWindowPos(); diff --git a/src/gui/panel.h b/src/gui/panel.h index d239d03..0748e2b 100644 --- a/src/gui/panel.h +++ b/src/gui/panel.h @@ -11,8 +11,11 @@ #include "panel_defs.h" #include "panel_manager.h" +#include #include +#include +#include struct ImGuiInputTextCallbackData; @@ -21,30 +24,57 @@ namespace lunarium class Panel { public: - Panel(std::string name, PanelDockZone dock_zone, bool isOpen = false); + + struct Popup + { + std::function PopupFunc; + bool IsOpen; + std::string Name; + }; + + public: + Panel(std::string name, PanelDockZone dock_zone, bool isOpen = false, int window_flags = 0); virtual ~Panel(); const char* GetName() const; virtual void Update(float dt); - virtual bool DoFrame() = 0; + bool OnUIRender(); + void SetWindowFlags(int flags); void SetOpen(bool isOpen); bool IsOpen(); void GetPosition(int& x, int& y) const; void GetSize(int& w, int& h) const; PanelDockZone GetDockZone() const; - protected: + OpRes AddPopup(int id, std::string name, std::function); + + private: std::string mPanelName; bool mIsOpen; PanelDockZone mDockZone; + int mWindowFlags; + + // TODO: Not sure I like this solution... + int mNumPushedStyles; + + // Popups + std::map mPopups; int mX; int mY; int mWidth; int mHeight; - protected: + private: // Helpers void UpdateMetaInfo(); + void RunPopups(); + + protected: + virtual void PreBegin(); + virtual void DoFrame() = 0; + + void SetNumPushedStyles(int num); + void OpenPopup(int id); private: friend class PanelManager; diff --git a/src/gui/panel_manager.cpp b/src/gui/panel_manager.cpp index cb01ccb..29eab54 100644 --- a/src/gui/panel_manager.cpp +++ b/src/gui/panel_manager.cpp @@ -134,7 +134,7 @@ namespace lunarium if ((*iter)->IsOpen()) { ImGui::SetNextWindowClass(&mWindowClass); - (*iter)->DoFrame(); + (*iter)->OnUIRender(); } } } diff --git a/src/run_modes/editor/panels/about.cpp b/src/run_modes/editor/panels/about.cpp index 8d4e3a7..64334a9 100644 --- a/src/run_modes/editor/panels/about.cpp +++ b/src/run_modes/editor/panels/about.cpp @@ -16,27 +16,18 @@ namespace lunarium namespace editor { AboutPanel::AboutPanel() - : Panel("About", PanelDockZone::DDZ_NONE) + : Panel("About", PanelDockZone::DDZ_NONE, false, (int)ImGuiWindowFlags_NoCollapse) { } - - bool AboutPanel::DoFrame() + void AboutPanel::PreBegin() { - if (!mIsOpen) - return false; - ImGui::SetNextWindowSize(ImVec2(300, ImGui::GetFrameHeight() * 20)); - if (!ImGui::Begin(GetName(), &mIsOpen, ImGuiWindowFlags_NoCollapse )) - { - ImGui::End(); - return false; - } + } + void AboutPanel::DoFrame() + { ImGui::TextWrapped("Lunarium Editor Version %s - Written by Joey Pollack", Version::GetVersion().ToString().c_str()); - - ImGui::End(); - return true; } } } \ No newline at end of file diff --git a/src/run_modes/editor/panels/about.h b/src/run_modes/editor/panels/about.h index d00d1f7..e7e36f3 100644 --- a/src/run_modes/editor/panels/about.h +++ b/src/run_modes/editor/panels/about.h @@ -22,7 +22,8 @@ namespace editor AboutPanel(); // Returns false if the window is closed - bool DoFrame(); + void PreBegin(); + void DoFrame(); }; } } diff --git a/src/run_modes/editor/panels/asset_browser.cpp b/src/run_modes/editor/panels/asset_browser.cpp index 4543974..e28a27a 100644 --- a/src/run_modes/editor/panels/asset_browser.cpp +++ b/src/run_modes/editor/panels/asset_browser.cpp @@ -23,7 +23,7 @@ namespace lunarium namespace editor { AssetBrowser::AssetBrowser(std::filesystem::path dir, Editor* pEditor) - : Panel("Asset Browser", PanelDockZone::DDZ_BOTTOM, true), + : Panel("Asset Browser", PanelDockZone::DDZ_BOTTOM, true, (ImGuiWindowFlags)ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoScrollbar), mAssetDirectory(dir), mpEditor(pEditor), mNewFolder(false), mSyncTree(false) { } @@ -39,18 +39,8 @@ namespace editor return mSelectedDir; } - bool AssetBrowser::DoFrame() + void AssetBrowser::DoFrame() { - if (!mIsOpen) - return false; - - if (!ImGui::Begin(GetName(), &mIsOpen, ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoScrollbar)) - { - ImGui::End(); - return false; - } - - //DoNewFolder(); // Directory tree // TODO: Figure out a better way to size stuff other @@ -74,9 +64,6 @@ namespace editor DoContentArea(wind_size); HandlePopupActions(); - - ImGui::End(); - return true; } void AssetBrowser::DoDirTree(std::filesystem::path dir) @@ -232,6 +219,11 @@ namespace editor } } + + void AssetBrowser::DefinePopups() + { + + } void AssetBrowser::DoNewFolder() { diff --git a/src/run_modes/editor/panels/asset_browser.h b/src/run_modes/editor/panels/asset_browser.h index b516028..4dfd2b5 100644 --- a/src/run_modes/editor/panels/asset_browser.h +++ b/src/run_modes/editor/panels/asset_browser.h @@ -26,7 +26,7 @@ namespace editor void SetAssetDirectory(std::filesystem::path dir); - bool DoFrame(); + void DoFrame(); std::filesystem::path GetSelectedDirectory(); @@ -46,6 +46,8 @@ namespace editor bool mSyncTree; private: + void DefinePopups(); + void HandlePopupActions(); void HandleAssetDrop(std::filesystem::path dir); diff --git a/src/run_modes/editor/panels/properties_view.cpp b/src/run_modes/editor/panels/properties_view.cpp index fa201a4..4ad18e1 100644 --- a/src/run_modes/editor/panels/properties_view.cpp +++ b/src/run_modes/editor/panels/properties_view.cpp @@ -17,22 +17,14 @@ namespace lunarium { namespace editor { PropertiesView::PropertiesView() - : Panel("Properties", PanelDockZone::DDZ_RIGHT, true), mpSelectedAsset(nullptr), mpSelectedEntity(nullptr) + : Panel("Properties", PanelDockZone::DDZ_RIGHT, true, ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoScrollbar), + mpSelectedAsset(nullptr), mpSelectedEntity(nullptr) { } - bool PropertiesView::DoFrame() + void PropertiesView::DoFrame() { - if (!mIsOpen) - return false; - - if (!ImGui::Begin(GetName(), &mIsOpen, ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoScrollbar)) - { - ImGui::End(); - return false; - } - if (mpSelectedEntity) { // TODO: iterate through components @@ -42,8 +34,6 @@ namespace lunarium { namespace editor } } - ImGui::End(); - return true; } void PropertiesView::SetSelection(Entity* pEntity) diff --git a/src/run_modes/editor/panels/properties_view.h b/src/run_modes/editor/panels/properties_view.h index 961121b..658ec6c 100644 --- a/src/run_modes/editor/panels/properties_view.h +++ b/src/run_modes/editor/panels/properties_view.h @@ -29,7 +29,7 @@ namespace editor void SetSelection(Entity* pEntity); void SetSelection(EditorAsset* pAsset); - bool DoFrame(); + void DoFrame(); private: std::vector mCustomProps; diff --git a/src/run_modes/editor/panels/world_tree.cpp b/src/run_modes/editor/panels/world_tree.cpp index 36c2731..1e735fc 100644 --- a/src/run_modes/editor/panels/world_tree.cpp +++ b/src/run_modes/editor/panels/world_tree.cpp @@ -20,7 +20,8 @@ namespace lunarium namespace editor { WorldTree::WorldTree() - : Panel("World Tree", PanelDockZone::DDZ_LEFT, true), mpWorld(new lunarium::World), mDoNewEntity(false) + : Panel("World Tree", PanelDockZone::DDZ_LEFT, true, ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoScrollbar), + mpWorld(new lunarium::World), mDoNewEntity(false) { } @@ -35,17 +36,8 @@ namespace editor return mpWorld; } - bool WorldTree::DoFrame() + void WorldTree::DoFrame() { - if (!mIsOpen) - return false; - - if (!ImGui::Begin(GetName(), &mIsOpen, ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoScrollbar)) - { - ImGui::End(); - return false; - } - if (ImGui::TreeNode("World Root") && mpWorld) { // List all world entities @@ -74,8 +66,6 @@ namespace editor DoContextMenu(); HandlePopupEvents(); - ImGui::End(); - return true; } void WorldTree::DoContextMenu() diff --git a/src/run_modes/editor/panels/world_tree.h b/src/run_modes/editor/panels/world_tree.h index 1a335cb..a79a7a9 100644 --- a/src/run_modes/editor/panels/world_tree.h +++ b/src/run_modes/editor/panels/world_tree.h @@ -25,7 +25,7 @@ namespace editor void SetWorld(lunarium::World* pWorld); lunarium::World* GetWorld(); - bool DoFrame(); + void DoFrame(); private: lunarium::World* mpWorld; diff --git a/src/run_modes/editor/panels/world_view.cpp b/src/run_modes/editor/panels/world_view.cpp index 5e31383..fcd9d8c 100644 --- a/src/run_modes/editor/panels/world_view.cpp +++ b/src/run_modes/editor/panels/world_view.cpp @@ -13,29 +13,16 @@ #include #include -namespace lunarium -{ -namespace editor +namespace lunarium { namespace editor { WorldView::WorldView() - : Panel("World View", PanelDockZone::DDZ_CENTER ,true), mpWorld(nullptr) + : Panel("World View", PanelDockZone::DDZ_CENTER, true, ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoScrollbar), mpWorld(nullptr) { } - bool WorldView::DoFrame() - { - if (!mIsOpen) - return false; - - if (!ImGui::Begin(GetName(), &mIsOpen, ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoScrollbar)) - { - ImGui::End(); - return false; - } + void WorldView::DoFrame() + { - ImGui::End(); - return true; } -} -} \ No newline at end of file +}} \ No newline at end of file diff --git a/src/run_modes/editor/panels/world_view.h b/src/run_modes/editor/panels/world_view.h index 735bd63..9729700 100644 --- a/src/run_modes/editor/panels/world_view.h +++ b/src/run_modes/editor/panels/world_view.h @@ -23,7 +23,7 @@ namespace editor { public: WorldView(); - bool DoFrame(); + void DoFrame(); void SetWorld(World* pWorld); World* GetWorld(); diff --git a/src/run_modes/editor/tools/map_editor/panels/map_canvas.cpp b/src/run_modes/editor/tools/map_editor/panels/map_canvas.cpp index 5acccf3..b3ae5aa 100644 --- a/src/run_modes/editor/tools/map_editor/panels/map_canvas.cpp +++ b/src/run_modes/editor/tools/map_editor/panels/map_canvas.cpp @@ -21,7 +21,7 @@ namespace lunarium { namespace editor { MapCanvas::MapCanvas(MapEditor* editor) - : Panel("Map Canvas", PanelDockZone::DDZ_CENTER, true), + : Panel("Map Canvas", PanelDockZone::DDZ_CENTER, true, ImGuiWindowFlags_NoScrollbar), mpMapEditor(editor), mpCanvasImage(nullptr), mMap(nullptr), mSelectedTile({-1, -1}), mFrameBuffer(-1), mMapSizeChanged(false), mZoomFactor(1.0f), mScrollDragged(false), mCurrentRegion({0, 0}), mRegionString("") { @@ -129,23 +129,17 @@ namespace lunarium { namespace editor } } - bool MapCanvas::DoFrame() - { - if (!mIsOpen) - return false; + void MapCanvas::PreBegin() + { ImGui::PushStyleVar( ImGuiStyleVar_WindowRounding, 0.0f ); ImGui::PushStyleVar( ImGuiStyleVar_WindowBorderSize, 0.0f ); ImGui::PushStyleVar( ImGuiStyleVar_WindowPadding, ImVec2( 0.0f, 0.0f ) ); - if (!ImGui::Begin(GetName(), &mIsOpen, ImGuiWindowFlags_NoScrollbar)) - { - ImGui::PopStyleVar(3); - ImGui::End(); - return false; - } - - ImGui::PopStyleVar(3); + SetNumPushedStyles(3); + } + void MapCanvas::DoFrame() + { ImVec2 pos = ImGui::GetWindowPos(); ImVec2 size = ImGui::GetWindowSize(); @@ -189,8 +183,6 @@ namespace lunarium { namespace editor } ImGui::EndChild(); - ImGui::End(); - return mIsOpen; } void MapCanvas::SetTileMap(TileMap* pMap) diff --git a/src/run_modes/editor/tools/map_editor/panels/map_canvas.h b/src/run_modes/editor/tools/map_editor/panels/map_canvas.h index 33f5593..7e517f8 100644 --- a/src/run_modes/editor/tools/map_editor/panels/map_canvas.h +++ b/src/run_modes/editor/tools/map_editor/panels/map_canvas.h @@ -25,7 +25,8 @@ namespace lunarium { namespace editor public: MapCanvas(MapEditor* editor); void Update(float delta); - bool DoFrame(); + void PreBegin(); + void DoFrame(); void SetTileMap(TileMap* pMap); diff --git a/src/run_modes/editor/tools/map_editor/panels/tile_set_view.cpp b/src/run_modes/editor/tools/map_editor/panels/tile_set_view.cpp index 11c6375..942d34c 100644 --- a/src/run_modes/editor/tools/map_editor/panels/tile_set_view.cpp +++ b/src/run_modes/editor/tools/map_editor/panels/tile_set_view.cpp @@ -20,7 +20,7 @@ namespace lunarium { namespace editor { TileSetView::TileSetView(MapEditor* editor) - : Panel("Tile Set View", PanelDockZone::DDZ_RIGHT, true), + : Panel("Tile Set View", PanelDockZone::DDZ_RIGHT, true, ImGuiWindowFlags_HorizontalScrollbar), mpEditor(editor), mpSelectedTileSet(nullptr), mpViewImage(nullptr), mFrameBuffer(-1), mViewOffset({0, 0}), mViewZoom(1.0f), mMouseDown(false) { @@ -97,22 +97,16 @@ namespace lunarium { namespace editor } } - bool TileSetView::DoFrame() + void TileSetView::PreBegin() { - if (!mIsOpen) - return false; - ImGui::PushStyleVar( ImGuiStyleVar_WindowRounding, 0.0f ); ImGui::PushStyleVar( ImGuiStyleVar_WindowBorderSize, 0.0f ); ImGui::PushStyleVar( ImGuiStyleVar_WindowPadding, ImVec2( 0.0f, 0.0f ) ); - if (!ImGui::Begin(GetName(), &mIsOpen, ImGuiWindowFlags_HorizontalScrollbar)) - { - ImGui::PopStyleVar(3); - ImGui::End(); - return false; - } - ImGui::PopStyleVar(3); + SetNumPushedStyles(3); + } + void TileSetView::DoFrame() + { ImVec2 window_size = ImGui::GetWindowSize(); float child_height = ImGui::GetFrameHeight() * 2; @@ -159,9 +153,6 @@ namespace lunarium { namespace editor ImGui::Image((ImTextureID)mpViewImage->GetGLTextureID64(), ImVec2(mpViewImage->GetWidth(), mpViewImage->GetHeight()), ImVec2(0, 1), ImVec2(1, 0)); // the last 2 params are flipping the image on the y } - - ImGui::End(); - return mIsOpen; } void TileSetView::ClearTileSets() diff --git a/src/run_modes/editor/tools/map_editor/panels/tile_set_view.h b/src/run_modes/editor/tools/map_editor/panels/tile_set_view.h index ef3c7b1..d4d267d 100644 --- a/src/run_modes/editor/tools/map_editor/panels/tile_set_view.h +++ b/src/run_modes/editor/tools/map_editor/panels/tile_set_view.h @@ -26,7 +26,8 @@ namespace lunarium { namespace editor TileSetView(MapEditor* editor); void Update(float delta); - bool DoFrame(); + void DoFrame(); + void PreBegin(); void ClearTileSets(); void AddTileSet(TileSet* set);