town events cancel button

This commit is contained in:
2025-05-19 08:24:25 -05:00
parent ce2fc24074
commit 4b28b89a87
2 changed files with 4 additions and 3 deletions

View File

@@ -769,6 +769,7 @@ void edit_town_events() {
cDialog evt_dlg(*ResMgr::dialogs.get("edit-town-events"));
evt_dlg["okay"].attachClickHandler(save_town_events);
evt_dlg["cancel"].attachClickHandler(std::bind(&cDialog::toast, &evt_dlg, false));
evt_dlg.attachClickHandlers(edit_town_events_event_filter, {"edit1", "edit2", "edit3", "edit4", "edit5", "edit6", "edit7", "edit8"});
evt_dlg.attachFocusHandlers(std::bind(check_range_msg, _1, _2, _3, -1, town->specials.size(), "The town special node", "-1 for no special"), {"spec1", "spec2", "spec3", "spec4", "spec5", "spec6", "spec7", "spec8"});