confirm before killing
This commit is contained in:
12
rsrc/dialogs/kill-party-confirm.xml
Normal file
12
rsrc/dialogs/kill-party-confirm.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
|
||||
<?xml-stylesheet href="dialog.xsl" type="text/xsl"?>
|
||||
<dialog defbtn='no'>
|
||||
<pict type='dlog' num='7' top='6' left='6'/>
|
||||
<text top='6' left='48' width='249' height='67'>
|
||||
You are about to kill your entire party.<br/>
|
||||
<br/>
|
||||
Are you sure you want to do this?
|
||||
</text>
|
||||
<button name='no' type='regular' def-key='n' top='84' left='239'>No</button>
|
||||
<button name='yes' type='regular' def-key='y' top='84' left='172'>Yes</button>
|
||||
</dialog>
|
||||
@@ -2085,13 +2085,16 @@ void debug_kill_party() {
|
||||
if(recording){
|
||||
record_action("debug_kill_party", "");
|
||||
}
|
||||
for(short i = 0; i < 6; i++) {
|
||||
if(univ.party[i].is_alive())
|
||||
kill_pc(univ.party[i],eMainStatus::ABSENT);
|
||||
std::string confirm = cChoiceDlog("kill-party-confirm",{"yes","no"}).show();
|
||||
if(confirm == "yes"){
|
||||
for(short i = 0; i < 6; i++) {
|
||||
if(univ.party[i].is_alive())
|
||||
kill_pc(univ.party[i],eMainStatus::ABSENT);
|
||||
}
|
||||
draw_terrain();
|
||||
add_string_to_buf("Debug: Kill the party.");
|
||||
advance_time(false, true, true);
|
||||
}
|
||||
draw_terrain();
|
||||
add_string_to_buf("Debug: Kill the party.");
|
||||
advance_time(false, true, true);
|
||||
}
|
||||
|
||||
void debug_magic_map() {
|
||||
|
||||
Reference in New Issue
Block a user