Change logic of restart-game confirmation
This commit is contained in:
@@ -3,8 +3,8 @@
|
|||||||
<?xml-stylesheet href="dialog.xsl" type="text/xsl"?>
|
<?xml-stylesheet href="dialog.xsl" type="text/xsl"?>
|
||||||
<dialog defbtn='cancel'>
|
<dialog defbtn='cancel'>
|
||||||
<pict type='dlog' num='23' top='9' left='9'/>
|
<pict type='dlog' num='23' top='9' left='9'/>
|
||||||
<text top='6' left='53' width='249' height='31'>
|
<text name='warning' top='6' left='53' width='249' height='31'>
|
||||||
Starting over will unload the current party without saving.
|
{{action}} will discard any unsaved progress.
|
||||||
Are you sure you want to do this?
|
Are you sure you want to do this?
|
||||||
</text>
|
</text>
|
||||||
<button name='cancel' type='regular' def-key='esc' top='45' left='244'>Cancel</button>
|
<button name='cancel' type='regular' def-key='esc' top='45' left='244'>Cancel</button>
|
||||||
|
@@ -3504,13 +3504,19 @@ void new_party() {
|
|||||||
if(recording){
|
if(recording){
|
||||||
record_action("new_party", "");
|
record_action("new_party", "");
|
||||||
}
|
}
|
||||||
if(overall_mode != MODE_STARTUP) {
|
if(party_in_memory) {
|
||||||
std::string choice = cChoiceDlog("restart-game",{"okay","cancel"}).show();
|
cChoiceDlog confirm("restart-game",{"okay","cancel"});
|
||||||
|
(confirm.operator->())->getControl("warning").replaceText("{{action}}", "Starting over");
|
||||||
|
std::string choice = confirm.show();
|
||||||
if(choice == "cancel")
|
if(choice == "cancel")
|
||||||
return;
|
return;
|
||||||
for(short i = 0; i < 6; i++)
|
}
|
||||||
univ.party[i].main_status = eMainStatus::ABSENT;
|
|
||||||
party_in_memory = false;
|
for(short i = 0; i < 6; i++)
|
||||||
|
univ.party[i].main_status = eMainStatus::ABSENT;
|
||||||
|
party_in_memory = false;
|
||||||
|
|
||||||
|
if(overall_mode != MODE_STARTUP){
|
||||||
reload_startup();
|
reload_startup();
|
||||||
overall_mode = MODE_STARTUP;
|
overall_mode = MODE_STARTUP;
|
||||||
draw_startup(0);
|
draw_startup(0);
|
||||||
|
Reference in New Issue
Block a user