Add more confirms

develop
Robob27 2023-02-02 00:33:27 -05:00
parent 085a308e99
commit 4a0d542b5e
2 changed files with 11 additions and 1 deletions

@ -317,8 +317,9 @@ public:
if (paused)
{
if (paused_focus != "" && (input->count(df::interface_key::LEAVESCREEN) || mouseExit))
if (paused_focus != "" && (input->count(df::interface_key::LEAVESCREEN) || mouseExit)) {
conf_lua::api::unpause(NULL);
}
return false;
}
else if (state == INACTIVE)
@ -372,6 +373,7 @@ public:
df::global::enabler->mouse_rbut_down = 0;
}
set_state(INACTIVE);
Screen::invalidate();
} else if (input->count(df::interface_key::SELECT))
set_state(SELECTED);
else if (input->count(df::interface_key::CUSTOM_P))
@ -600,6 +602,7 @@ DEFINE_CONFIRMATION(depot_remove, viewscreen_dwarfmodest);
DEFINE_CONFIRMATION(squad_disband, viewscreen_dwarfmodest);
DEFINE_CONFIRMATION(order_remove, viewscreen_dwarfmodest);
DEFINE_CONFIRMATION(zone_remove, viewscreen_dwarfmodest);
DEFINE_CONFIRMATION(burrow_remove, viewscreen_dwarfmodest);
// these are more complex to implement
//DEFINE_CONFIRMATION(convict, viewscreen_dwarfmodest);

@ -118,6 +118,13 @@ end
zone_remove.title = "Remove zone"
zone_remove.message = "Are you sure you want to remove this zone?"
burrow_remove = defconf('burrow-remove')
function burrow_remove.intercept_key(key)
return key == MOUSE_LEFT and df.global.game.main_interface.current_hover == 171
end
burrow_remove.title = "Remove burrow"
burrow_remove.message = "Are you sure you want to remove this burrow?"
-- these confirmations have more complex button detection requirements
--[[
trade = defconf('trade')