mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
Add icons to the buttons on the save state popup. Flip the undo buttons to match the regular buttons.
This commit is contained in:
+13
-15
@@ -107,8 +107,6 @@ protected:
|
||||
gridsettings.fillCells = true;
|
||||
GridLayout *grid = content->Add(new GridLayoutList(gridsettings, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT, Margins(10, 0))));
|
||||
|
||||
Choice *back = new Choice(di->T("Back"));
|
||||
|
||||
const bool hasUndo = SaveState::HasUndoSaveInSlot(saveStatePrefix_, slot_);
|
||||
const bool undoEnabled = g_Config.bEnableStateUndo;
|
||||
|
||||
@@ -120,14 +118,14 @@ protected:
|
||||
undoButton->SetEnabled(hasUndo);
|
||||
}
|
||||
|
||||
grid->Add(new Choice(pa->T("Save State")))->OnClick.Handle(this, &ScreenshotViewScreen::OnSaveState);
|
||||
grid->Add(new Choice(pa->T("Save State"), ImageID("I_FILE_SAVE")))->OnClick.Handle(this, &ScreenshotViewScreen::OnSaveState);
|
||||
// We can unconditionally show the load state button, because you can only pop this dialog up if a state exists.
|
||||
grid->Add(new Choice(pa->T("Load State")))->OnClick.Handle(this, &ScreenshotViewScreen::OnLoadState);
|
||||
grid->Add(new Choice(pa->T("Delete State")))->OnClick.Handle(this, &ScreenshotViewScreen::OnDeleteState);
|
||||
grid->Add(new Choice(pa->T("Load State"), ImageID("I_FOLDER_OPEN")))->OnClick.Handle(this, &ScreenshotViewScreen::OnLoadState);
|
||||
grid->Add(new Choice(di->T("Delete"), ImageID("I_TRASHCAN")))->OnClick.Handle(this, &ScreenshotViewScreen::OnDeleteState);
|
||||
if (undoButton) {
|
||||
grid->Add(undoButton)->OnClick.Handle(this, &ScreenshotViewScreen::OnUndoState);
|
||||
}
|
||||
grid->Add(back)->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
|
||||
grid->Add(new Choice(di->T("Back"), ImageID("I_NAVIGATE_BACK")))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
|
||||
|
||||
scroll->Add(content);
|
||||
parent->Add(scroll);
|
||||
@@ -410,21 +408,21 @@ void GamePauseScreen::CreateSavestateControls(UI::LinearLayout *leftColumnItems,
|
||||
|
||||
*extraRow = nullptr;
|
||||
|
||||
LinearLayout *buttonRow = new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(Margins(10, 0, 0, 0)));
|
||||
LinearLayout *buttonRow = new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(Margins(10, 0, 0, 10)));
|
||||
if (g_Config.bEnableStateUndo && !Achievements::HardcoreModeActive() && NetworkAllowSaveState()) {
|
||||
UI::Choice *loadUndoButton = buttonRow->Add(new Choice(pa->T("Undo last load"), ImageID("I_NAVIGATE_BACK"), new LinearLayoutParams(WRAP_CONTENT, WRAP_CONTENT)));
|
||||
loadUndoButton->SetEnabled(SaveState::HasUndoLoad(saveStatePrefix_));
|
||||
loadUndoButton->OnClick.Add([this](UI::EventParams &e) {
|
||||
SaveState::UndoLoad(saveStatePrefix_, &AfterSaveStateAction);
|
||||
TriggerFinish(DR_CANCEL);
|
||||
});
|
||||
|
||||
UI::Choice *saveUndoButton = buttonRow->Add(new Choice(pa->T("Undo last save"), ImageID("I_NAVIGATE_BACK"), new LinearLayoutParams(WRAP_CONTENT, WRAP_CONTENT)));
|
||||
saveUndoButton->SetEnabled(SaveState::HasUndoLastSave(saveStatePrefix_));
|
||||
saveUndoButton->OnClick.Add([this](UI::EventParams &e) {
|
||||
SaveState::UndoLastSave(saveStatePrefix_);
|
||||
RecreateViews();
|
||||
});
|
||||
|
||||
UI::Choice *loadUndoButton = buttonRow->Add(new Choice(pa->T("Undo last load"), ImageID("I_NAVIGATE_BACK"), new LinearLayoutParams(WRAP_CONTENT, WRAP_CONTENT)));
|
||||
loadUndoButton->SetEnabled(SaveState::HasUndoLoad(saveStatePrefix_));
|
||||
loadUndoButton->OnClick.Add([this](UI::EventParams &e) {
|
||||
SaveState::UndoLoad(saveStatePrefix_, &AfterSaveStateAction);
|
||||
TriggerFinish(DR_CANCEL);
|
||||
});
|
||||
}
|
||||
|
||||
if (g_Config.iRewindSnapshotInterval > 0 && !Achievements::HardcoreModeActive() && NetworkAllowSaveState()) {
|
||||
@@ -474,7 +472,7 @@ void GamePauseScreen::CreateViews() {
|
||||
}
|
||||
|
||||
if (portrait) {
|
||||
// We have room for a title bar. Use the game DB title if available.
|
||||
// We have room for a title bar in portrait mode. Use the game DB title if available.
|
||||
std::string title;
|
||||
std::vector<GameDBInfo> dbInfos;
|
||||
const bool inGameDB = g_gameDB.GetGameInfos(g_paramSFO.GetDiscID(), &dbInfos);
|
||||
|
||||
@@ -184,6 +184,7 @@ static const ImageMeta imageIDs[] = {
|
||||
{"I_SHORTCUT", false},
|
||||
{"I_KEYBOARD", false},
|
||||
{"I_MOUSE", false},
|
||||
{"I_FILE_SAVE", false},
|
||||
};
|
||||
|
||||
static std::string PNGNameFromID(std::string_view id) {
|
||||
|
||||
+10
-12
@@ -24,9 +24,9 @@
|
||||
inkscape:pagecheckerboard="true"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="px"
|
||||
inkscape:zoom="2.8284271"
|
||||
inkscape:cx="-1.2374369"
|
||||
inkscape:cy="458.73552"
|
||||
inkscape:zoom="5.6568542"
|
||||
inkscape:cx="302.55332"
|
||||
inkscape:cy="546.85871"
|
||||
inkscape:window-width="3840"
|
||||
inkscape:window-height="2071"
|
||||
inkscape:window-x="-9"
|
||||
@@ -3007,16 +3007,14 @@
|
||||
style="baseline-shift:baseline;display:inline;overflow:visible;opacity:1;vector-effect:none;fill:#ffffff;marker:none;enable-background:accumulate;stop-color:#000000;stop-opacity:1"
|
||||
d="m 50.070957,117.73958 -1.123047,2.20508 v 8.18946 h 11.127879 v -8.34376 l -0.503906,-0.34765 h -4.096629 l -0.835938,-1.70313 z m 0.357422,0.58399 h 3.847656 l 0.833984,1.70508 h 4.280223 l 0.101563,0.0684 v 7.45117 h -9.957957 v -7.4668 z"
|
||||
id="I_FOLDER"
|
||||
sodipodi:nodetypes="cccccccccccccccccc" /><g
|
||||
transform="matrix(0.38952161,0,0,0.38952161,-81.944133,8.1765973)"
|
||||
sodipodi:nodetypes="cccccccccccccccccc" /><path
|
||||
id="I_FOLDER_OPEN"
|
||||
inkscape:export-xdpi="135"
|
||||
inkscape:export-ydpi="135"
|
||||
inkscape:export-filename="C:\Users\hrydg\folder_open_line.png"><path
|
||||
id="path6612"
|
||||
style="baseline-shift:baseline;display:inline;overflow:visible;opacity:1;vector-effect:none;fill:#ffffff;marker:none;enable-background:accumulate;stop-color:#000000;stop-opacity:1"
|
||||
d="m 298.14993,281.27572 -2.73956,5.66353 -0.13267,21.01966 h 0.0703 25.33561 0.54659 l 5.92621,-18.59718 -5.61577,0.0186 -0.12471,-2.851 -1.27758,-0.87958 h -8.94411 l -2.14256,-4.37401 z m 0.94193,1.49913 h 9.02454 l 2.14257,4.37534 h 9.41242 l 0.2786,0.19103 0.0889,2.04439 -18.10132,0.0716 -5.13551,14.42084 0.10613,-16.58861 z m 26.00956,8.09397 -4.96703,15.58963 h -22.65973 l 5.52157,-15.50472 z"
|
||||
sodipodi:nodetypes="cccccccccccccccccccccccccccc" /></g><g
|
||||
style="baseline-shift:baseline;display:inline;overflow:visible;vector-effect:none;fill:#ffffff;stroke-width:0.389522;marker:none;enable-background:accumulate;stop-color:#000000"
|
||||
d="m 35.612869,117.64602 -1.067117,2.20607 -0.05168,8.18761 h 0.02738 9.031569 0.212908 l 2.308387,-7.244 -2.187463,0.007 -0.04858,-1.11053 -0.497645,-0.34262 H 40.69391 l -0.834573,-1.70377 z m 0.366902,0.58395 h 3.515254 l 0.834577,1.70429 h 2.829142 l 0.108521,0.0744 0.03463,0.79633 -6.213656,0.0279 -2.000392,5.61723 0.04134,-6.46162 z m 9.294087,3.15277 -1.934765,6.0725 h -7.989256 l 2.150771,-6.03942 z"
|
||||
sodipodi:nodetypes="cccccccccccccccccccccccccccc" /><path
|
||||
id="I_FILE_SAVE"
|
||||
style="baseline-shift:baseline;display:inline;overflow:visible;vector-effect:none;fill:#ffffff;fill-opacity:1;stroke-width:0.389522;stroke-linecap:round;enable-background:accumulate;stop-color:#000000"
|
||||
d="m 68.102154,145.24213 c -0.520899,0 -0.950846,0.43046 -0.950846,0.95136 v 10.02936 h 1.753381 7.473444 0.802535 c 0.520899,0 0.950849,-0.43046 0.950846,-0.95136 v -8.30595 l -1.995227,-1.72341 z m 0,0.71675 h 1.672247 v 3.70262 h 5.736602 v -3.70262 h 0.358633 l 1.545127,1.33429 v 7.97832 c 0,0.13355 -0.100544,0.23358 -0.234095,0.23358 h -0.802535 v -4.06539 h -7.473444 v 4.06539 h -1.03663 v -9.31158 c -4e-6,-0.13355 0.100544,-0.23461 0.234095,-0.23461 z m 2.388998,0 h 4.303096 v 2.98638 h -4.303096 z m -0.869712,6.19755 h 6.039942 v 3.34864 H 69.62144 Z" /><g
|
||||
id="I_ROTATE_LEFT"
|
||||
transform="matrix(0.00878851,0,0,0.00878851,85.530872,43.567481)"
|
||||
style="vector-effect:none;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:23.3029;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
|
||||
|
Before Width: | Height: | Size: 256 KiB After Width: | Height: | Size: 257 KiB |
Reference in New Issue
Block a user