outdoor details cancel button

This commit is contained in:
2025-05-19 08:33:39 -05:00
parent 5ad8bc00fe
commit 30f7117317
2 changed files with 3 additions and 2 deletions

View File

@@ -1,10 +1,10 @@
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<!-- NOTE: This file should be updated to use relative positioning the next time it changes. -->
<?xml-stylesheet href="dialog.xsl" type="text/xsl"?>
<dialog defbtn='okay'>
<!-- OK button -->
<dialog defbtn='okay' escbtn='cancel'>
<field name='name' top='51' left='162' width='151' height='16'/>
<button name='okay' type='regular' top='295' left='354'>OK</button>
<button name='cancel' type='regular' relative='neg pos-in' rel-anchor='prev' top='0' left='71'>Cancel</button>
<pict type='dlog' num='16' top='8' left='8'/>
<text size='large' top='6' left='50' width='256' height='17'>Outdoors Details</text>
<text top='53' left='50' width='101' height='14'>Section name:</text>

View File

@@ -498,6 +498,7 @@ static bool outdoor_details_event_filter(cDialog& me, std::string, eKeyMod) {
void outdoor_details() {
cDialog out_dlg(*ResMgr::dialogs.get("edit-outdoor-details"));
out_dlg["okay"].attachClickHandler(outdoor_details_event_filter);
out_dlg["cancel"].attachClickHandler(std::bind(&cDialog::toast, &out_dlg, false));
std::ostringstream str_out;
str_out << "X = " << cur_out.x << ", Y = " << cur_out.y;
out_dlg["loc"].setText(str_out.str());