Skip to content

Commit

Permalink
save show_all_outposts setting from WorldMapWidget
Browse files Browse the repository at this point in the history
  • Loading branch information
DubbleClick committed Jun 22, 2024
1 parent 5ab3e18 commit 6d3dc9c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
14 changes: 13 additions & 1 deletion GWToolboxdll/Widgets/WorldMapWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include <Widgets/WorldMapWidget.h>

#include <Timer.h>
#include "Defines.h"

namespace {
ImRect show_all_rect;
Expand Down Expand Up @@ -66,6 +66,18 @@ void WorldMapWidget::ShowAllOutposts(const bool show = showing_all_outposts)
TriggerWorldMapRedraw();
}

void WorldMapWidget::LoadSettings(ToolboxIni* ini)
{
ToolboxWidget::LoadSettings(ini);
LOAD_BOOL(showing_all_outposts);
}

void WorldMapWidget::SaveSettings(ToolboxIni* ini)
{
ToolboxWidget::SaveSettings(ini);
SAVE_BOOL(showing_all_outposts);
}

void WorldMapWidget::Draw(IDirect3DDevice9*)
{

Expand Down
10 changes: 4 additions & 6 deletions GWToolboxdll/Widgets/WorldMapWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,14 @@ class WorldMapWidget : public ToolboxWidget {
void RegisterSettingsContent() override { };

[[nodiscard]] bool ShowOnWorldMap() const override { return true; }

[[nodiscard]] const char* Name() const override { return "World Map"; }

[[nodiscard]] const char* Icon() const override { return ICON_FA_GLOBE; }

void LoadSettings(ToolboxIni*) override;
void SaveSettings(ToolboxIni*) override;
void Draw(IDirect3DDevice9* pDevice) override;

static void ShowAllOutposts(bool show);

void DrawSettingsInternal() override;

bool WndProc(UINT, WPARAM, LPARAM) override;

static void ShowAllOutposts(bool show);
};

0 comments on commit 6d3dc9c

Please sign in to comment.