File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed
src/game/client/components Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -576,7 +576,6 @@ bool CChat::LineShouldHighlight(const char *pLine, const char *pName)
576576 return false ;
577577}
578578
579- #define SAVES_FILE " ddnet-saves.txt"
580579const char *SAVES_HEADER[] = {
581580 " Time" ,
582581 " Player" ,
Original file line number Diff line number Diff line change 1515#include < game/client/skin.h>
1616#include < game/generated/protocol7.h>
1717
18+ constexpr auto SAVES_FILE = " ddnet-saves.txt" ;
19+
1820class CChat : public CComponent
1921{
2022 static constexpr float CHAT_HEIGHT_FULL = 200 .0f ;
Original file line number Diff line number Diff line change @@ -172,6 +172,17 @@ void CMenus::RenderSettingsGeneral(CUIRect MainView)
172172 }
173173 GameClient ()->m_Tooltips .DoToolTip (&s_SettingsButtonId, &SettingsButton, Localize (" Open the settings file" ));
174174
175+ CUIRect SavesButton;
176+ Left.HSplitBottom (20 .0f , &Left, &SavesButton);
177+ Left.HSplitBottom (5 .0f , &Left, nullptr );
178+ static CButtonContainer s_SavesButtonId;
179+ if (DoButton_Menu (&s_SavesButtonId, Localize (" Saves file" ), 0 , &SavesButton))
180+ {
181+ Storage ()->GetCompletePath (IStorage::TYPE_SAVE, SAVES_FILE, aBuf, sizeof (aBuf));
182+ Client ()->ViewFile (aBuf);
183+ }
184+ GameClient ()->m_Tooltips .DoToolTip (&s_SavesButtonId, &SavesButton, Localize (" Open the saves file" ));
185+
175186 CUIRect ConfigButton;
176187 Left.HSplitBottom (20 .0f , &Left, &ConfigButton);
177188 Left.HSplitBottom (5 .0f , &Left, nullptr );
You can’t perform that action at this time.
0 commit comments