Skip to content

Commit

Permalink
Move modern skin toggling for better PoC example
Browse files Browse the repository at this point in the history
  • Loading branch information
Lpsd committed Jan 14, 2025
1 parent 3664624 commit 67541e7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Client/core/CSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ void CSettings::CreateGUI()
CGUITab *pTabMultiplayer, *pTabVideo, *pTabAudio, *pTabBinds, *pTabControls, *pTabAdvanced;
CGUI* pManager = g_pCore->GetGUI();

pManager->SetModernSkinEnabled(true);

// Init
m_bIsModLoaded = false;
m_bCaptureKey = false;
Expand Down Expand Up @@ -1379,6 +1381,8 @@ void CSettings::CreateGUI()

// Load the load of skins
LoadSkins();

pManager->SetModernSkinEnabled(false);
}

void CSettings::DestroyGUI()
Expand Down
2 changes: 0 additions & 2 deletions Client/gui/CGUI_Impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@ CGUI_Impl::CGUI_Impl(IDirect3DDevice9* pDevice) : m_HasSchemeLoaded(false), m_fC
SString strMessage = e.getMessage().c_str();
BrowseToSolution("create-fonts", EXIT_GAME_FIRST | ASK_GO_ONLINE, SString("Error loading fonts!\n\n%s", *strMessage));
}

SetModernSkinEnabled(true);
}

CGUI_Impl::~CGUI_Impl()
Expand Down
2 changes: 2 additions & 0 deletions Client/sdk/gui/CGUI.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,4 +169,6 @@ class CGUI

virtual CGUIWindow* LoadLayout(CGUIElement* pParent, const SString& strFilename) = 0;
virtual bool LoadImageset(const SString& strFilename) = 0;

virtual void SetModernSkinEnabled(bool bEnabled) = 0;
};

0 comments on commit 67541e7

Please sign in to comment.