MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / btnYesClick

Method btnYesClick

src/Menu/DeleteGameState.cpp:109–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109void DeleteGameState::btnYesClick(Action *)
110{
111 _game->popState();
112 if (!CrossPlatform::deleteFile(_filename))
113 {
114 std::wstring error = tr("STR_DELETE_UNSUCCESSFUL");
115 if (_origin != OPT_BATTLESCAPE)
116 _game->pushState(new ErrorMessageState(_game, error, _palette, Palette::blockOffset(8)+10, "BACK01.SCR", 6));
117 else
118 _game->pushState(new ErrorMessageState(_game, error, _palette, Palette::blockOffset(0), "TAC00.SCR", -1));
119 }
120}
121
122}

Callers

nothing calls this directly

Calls 3

deleteFileFunction · 0.85
pushStateMethod · 0.80
popStateMethod · 0.45

Tested by

no test coverage detected