Skip to content

Commit

Permalink
Some fixes and improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
louist103 committed Jun 22, 2024
1 parent 5849d3a commit 2eca9cc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/window/gui/Gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,10 @@ void Gui::RemoveGuiWindow(const std::string& name) {
mGuiWindows.erase(name);
}

void Ship::Gui::RemoveAllGuiWindows() {
mGuiWindows.clear();
}

std::shared_ptr<GuiWindow> Gui::GetGuiWindow(const std::string& name) {
if (mGuiWindows.contains(name)) {
return mGuiWindows[name];
Expand Down
1 change: 1 addition & 0 deletions src/window/gui/Gui.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ class Gui {
void AddGuiWindow(std::shared_ptr<GuiWindow> guiWindow);
void RemoveGuiWindow(std::shared_ptr<GuiWindow> guiWindow);
void RemoveGuiWindow(const std::string& name);
void RemoveAllGuiWindows();
void LoadGuiTexture(const std::string& name, const std::string& path, const ImVec4& tint);
bool HasTextureByName(const std::string& name);
void LoadGuiTexture(const std::string& name, const LUS::Texture& tex, const ImVec4& tint);
Expand Down
1 change: 1 addition & 0 deletions src/window/gui/GuiWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
namespace Ship {
class GuiWindow : public GuiElement {
public:
GuiWindow() = default;
GuiWindow(const std::string& consoleVariable, bool isVisible, const std::string& name);
GuiWindow(const std::string& consoleVariable, const std::string& name);

Expand Down

0 comments on commit 2eca9cc

Please sign in to comment.