Skip to content

Commit 408e4ef

Browse files
committed
fixup buttons
1 parent 14d2c43 commit 408e4ef

3 files changed

Lines changed: 5 additions & 29 deletions

File tree

Source/Fodder.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3221,19 +3221,6 @@ void cFodder::Game_Save()
32213221
continue;
32223222
}
32233223

3224-
if (mGUI_SaveLoadAction == GUI_SAVELOAD_OVERWRITE)
3225-
{
3226-
if (!SelectedSave)
3227-
continue;
3228-
3229-
if (!GUI_Confirm_Dialog("OVERWRITE SAVE", SelectedSave->mName, "OVERWRITE"))
3230-
continue;
3231-
3232-
Game_Save_ToFile(g_ResourceMan->GetSave(SelectedSave->mFileName), SelectedSave->mName);
3233-
mMouse_Exit_Loop = false;
3234-
return;
3235-
}
3236-
32373224
if (mGUI_SaveLoadAction != 2 || !mInput.size())
32383225
continue;
32393226

Source/Fodder.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ struct sSavedGame {
7676
};
7777

7878
static const int16 GUI_SAVELOAD_DELETE = 7;
79-
static const int16 GUI_SAVELOAD_OVERWRITE = 8;
80-
static const int16 GUI_SAVELOAD_SELECT_SAVE = 9;
79+
static const int16 GUI_SAVELOAD_SELECT_SAVE = 8;
8180

8281
struct sService_Draw {
8382
int16 mSpriteType;
@@ -1262,7 +1261,6 @@ class cFodder {
12621261
void GUI_Button_Load_Selected();
12631262
void GUI_Button_Delete_Selected();
12641263
void GUI_Button_Save_Current();
1265-
void GUI_Button_Overwrite_Selected();
12661264
void GUI_Button_Confirm_Yes();
12671265
void GUI_Button_Confirm_No();
12681266
void GUI_Button_Show_About();

Source/GUI_Element.cpp

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1660,21 +1660,18 @@ std::string cFodder::GUI_Save_File(const char* pTitle, const std::vector<sSavedG
16601660

16611661
if (mInput.size())
16621662
{
1663-
GUI_SaveDialog_DrawBoxText(this, "SAVE", 0x12, 0x48, 0xB3 + YOffset, 0xBF, 0xBC, eTextAlign::Centre, 2);
1663+
GUI_SaveDialog_DrawBoxText(this, "SAVE", 0x26, 0x66, 0xB3 + YOffset, 0xBF, 0xBC, eTextAlign::Centre, 2);
16641664
GUI_Button_Setup(&cFodder::GUI_Button_Save_Current);
16651665
}
16661666

16671667
const bool HasSelectedSave = mGUI_Select_File_Count > 0 && mGUI_Select_File_SelectedFileIndex >= 0;
16681668
if (HasSelectedSave)
16691669
{
1670-
GUI_SaveDialog_DrawBoxText(this, "OVERWRITE", 0x50, 0xA2, 0xB3 + YOffset, 0xBF, 0xBC, eTextAlign::Centre, 2);
1671-
GUI_Button_Setup(&cFodder::GUI_Button_Overwrite_Selected);
1672-
1673-
GUI_SaveDialog_DrawBoxText(this, "DELETE", 0xAA, 0xE2, 0xB3 + YOffset, 0xBF, 0xBC, eTextAlign::Centre, 2);
1670+
GUI_SaveDialog_DrawBoxText(this, "DELETE", 0x78, 0xC0, 0xB3 + YOffset, 0xBF, 0xBC, eTextAlign::Centre, 2);
16741671
GUI_Button_Setup(&cFodder::GUI_Button_Delete_Selected);
16751672
}
16761673

1677-
GUI_SaveDialog_DrawBoxText(this, "BACK", 0xEA, 0x126, 0xB3 + YOffset, 0xBF, 0xBC, eTextAlign::Centre, 2);
1674+
GUI_SaveDialog_DrawBoxText(this, "BACK", 0xD2, 0x112, 0xB3 + YOffset, 0xBF, 0xBC, eTextAlign::Centre, 2);
16781675
GUI_Button_Setup(&cFodder::GUI_Button_Load_Exit);
16791676

16801677
if (mGUI_Select_File_Count > 0)
@@ -1743,7 +1740,7 @@ bool cFodder::GUI_Confirm_Dialog(const std::string& pTitle, const std::string& p
17431740
GUI_SaveDialog_DrawBoxText(this, pConfirmText, 0x38, 0xA0, 0x82, 0xBF, 0xBC, eTextAlign::Centre, 2);
17441741
GUI_Button_Setup(&cFodder::GUI_Button_Confirm_Yes);
17451742

1746-
GUI_SaveDialog_DrawBoxText(this, "CANCEL", 0xB0, 0xF8, 0x82, 0xBF, 0xBC, eTextAlign::Centre, 2);
1743+
GUI_SaveDialog_DrawBoxText(this, "CANCEL", 0xA8, 0x110, 0x82, 0xBF, 0xBC, eTextAlign::Centre, 2);
17471744
GUI_Button_Setup(&cFodder::GUI_Button_Confirm_No);
17481745

17491746
mGraphics->SetActiveSpriteSheet(eGFX_RECRUIT);
@@ -1872,12 +1869,6 @@ void cFodder::GUI_Button_Save_Current()
18721869
mGUI_SaveLoadAction = 2;
18731870
}
18741871

1875-
void cFodder::GUI_Button_Overwrite_Selected()
1876-
{
1877-
if (mGUI_Select_File_Count > 0 && mGUI_Select_File_SelectedFileIndex >= 0)
1878-
mGUI_SaveLoadAction = GUI_SAVELOAD_OVERWRITE;
1879-
}
1880-
18811872
void cFodder::GUI_Button_Confirm_Yes()
18821873
{
18831874
mGUI_SaveLoadAction = 2;

0 commit comments

Comments
 (0)