Add a field to outdoor details dialog for editing the sector's comment string (which has been uneditable since I reformed the string system).

This commit is contained in:
2014-12-18 19:05:46 -05:00
parent 72200a57f3
commit 7a2b6e2349
2 changed files with 8 additions and 3 deletions

View File

@@ -489,6 +489,7 @@ bool change_ter(short& change_from,short& change_to,short& chance) {
static bool outdoor_details_event_filter(cDialog& me, std::string, eKeyMod) { static bool outdoor_details_event_filter(cDialog& me, std::string, eKeyMod) {
if(!me.toast(true)) return true; if(!me.toast(true)) return true;
current_terrain.out_name = me["name"].getText(); current_terrain.out_name = me["name"].getText();
current_terrain.comment = me["comment"].getText();
return true; return true;
} }
@@ -499,13 +500,13 @@ void outdoor_details() {
out_dlg["okay"].attachClickHandler(outdoor_details_event_filter); out_dlg["okay"].attachClickHandler(outdoor_details_event_filter);
snprintf(temp_str,256,"X = %d, Y = %d",cur_out.x,cur_out.y); snprintf(temp_str,256,"X = %d, Y = %d",cur_out.x,cur_out.y);
out_dlg["loc"].setText(temp_str); out_dlg["loc"].setText(temp_str);
out_dlg["comment"].setText(current_terrain.comment);
out_dlg["name"].setText(current_terrain.out_name); out_dlg["name"].setText(current_terrain.out_name);
out_dlg.run(); out_dlg.run();
} }
void put_out_wand_in_dlog(cDialog& me, short which_out_wand, const cOutdoors::cWandering& store_out_wand) { static void put_out_wand_in_dlog(cDialog& me, short which_out_wand, const cOutdoors::cWandering& store_out_wand) {
char str[256];
short i; short i;
me["num"].setTextToNum(which_out_wand); me["num"].setTextToNum(which_out_wand);

View File

@@ -3,10 +3,14 @@
<dialog skin='light' defbtn='okay' debug='true'> <dialog skin='light' defbtn='okay' debug='true'>
<!-- OK button --> <!-- OK button -->
<field name='name' top='51' left='162' width='151' height='16'/> <field name='name' top='51' left='162' width='151' height='16'/>
<button name='okay' type='regular' top='74' left='254'>OK</button> <button name='okay' type='regular' top='176' left='354'>OK</button>
<pict type='dlog' num='16' top='8' left='8'/> <pict type='dlog' num='16' top='8' left='8'/>
<text size='large' top='6' left='50' width='256' height='17'>Outdoors Details</text> <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> <text top='53' left='50' width='101' height='14'>Section name:</text>
<text top='29' left='50' width='87' height='14'>Coordinates:</text> <text top='29' left='50' width='87' height='14'>Coordinates:</text>
<text name='loc' top='29' left='142' width='127' height='14'/> <text name='loc' top='29' left='142' width='127' height='14'/>
<text top='85' left='50' width='101' height='90'>Comment:<br/><br/>
You can put useful notes for yourself here. It's not used by the game for anything.
</text>
<field name='comment' top='83' left='162' width='251' height='80'/>
</dialog> </dialog>