diff --git a/rsrc/dialogs/edit-special-node.xml b/rsrc/dialogs/edit-special-node.xml index d0717a83..980d15b2 100644 --- a/rsrc/dialogs/edit-special-node.xml +++ b/rsrc/dialogs/edit-special-node.xml @@ -32,66 +32,80 @@ + + + + + Extra 1: + + + Extra 2: + + + Jump To: + diff --git a/rsrc/strings/specials-text-affect.txt b/rsrc/strings/specials-text-affect.txt index bf15faea..85defa56 100644 --- a/rsrc/strings/specials-text-affect.txt +++ b/rsrc/strings/specials-text-affect.txt @@ -448,7 +448,7 @@ Second part of message Unused Unused Unused -If 1, just store ID in SDF and leave PC in party +Just store ID in SDF and leave PC in party? extra 1b extra 1c extra 2a diff --git a/rsrc/strings/specials-text-general.txt b/rsrc/strings/specials-text-general.txt index 9c345e1e..b13cf453 100644 --- a/rsrc/strings/specials-text-general.txt +++ b/rsrc/strings/specials-text-general.txt @@ -196,7 +196,7 @@ Unused 0 - allow, 1 - prevent Unused Unused -0 - don't force, 1 - force if blocked +Force allow if blocked? Unused Unused Special to Jump To @@ -245,7 +245,7 @@ Unused Unused Unused Which sound -0 - wait for sound to finish, 1 - don't wait +Continue without waiting for sound to finish? Unused Unused Unused @@ -264,7 +264,7 @@ Unused Horse to set (0 .. 29) Unused Unused -0 - not property, 1 - becomes property +Owned by party? Unused Unused Special to Jump To @@ -281,7 +281,7 @@ Unused Boat to set (0 .. 29) Unused Unused -0 - not property, 1 - becomes property +Owned by party? Unused Unused Special to Jump To @@ -298,7 +298,7 @@ Unused Town to show/hide Unused Unused -0 - town hidden, 1 - town visible +Town visible? Unused Unused Special to Jump To @@ -650,7 +650,7 @@ Unused Unused Unused Unused -If 1, put a space before it +Put a space before it? Unused String to append Unused @@ -667,7 +667,7 @@ Unused Unused Unused Unused -If 1, put a space before it +Put a space before it? Unused Number to append Unused @@ -684,7 +684,7 @@ Unused Unused Unused Unused -If 1, put a space before it +Put a space before it? Unused Monster type, or 0 to used selected PC Unused @@ -701,10 +701,10 @@ Unused Unused Unused Unused -If 1, put a space before it +Put a space before it? Unused Item type -0 - unidentified, 1 - full identified name +Use identified name? Unused Unused Unused @@ -718,7 +718,7 @@ Unused Unused Unused Unused -If 1, put a space before it +Put a space before it? Unused Terrain type Unused diff --git a/rsrc/strings/specials-text-ifthen.txt b/rsrc/strings/specials-text-ifthen.txt index db6cb052..a4f2e0a8 100644 --- a/rsrc/strings/specials-text-ifthen.txt +++ b/rsrc/strings/specials-text-ifthen.txt @@ -128,7 +128,7 @@ Unused If party has this much gold ... Call this special ... Unused -If 1, take gold +Take gold? Unused Unused Otherwise call this special @@ -145,7 +145,7 @@ Unused If party has this much food ... Call this special ... Unused -If 1, take food +Take food? Unused Unused Otherwise call this special @@ -164,7 +164,7 @@ Y coordinate of space Unused If item of this class on space ... Call this special ... -If 1, take item +Take item? Otherwise call this special -------------------- @@ -179,7 +179,7 @@ Unused If has item of this special class ... Call this special ... Unused -If 1, take item +Take item? Unused Unused Otherwise call this special @@ -196,7 +196,7 @@ Unused If has equipped item of this special ... Call this special ... Unused -If 1, take item +Take item? Unused Unused Otherwise call this special @@ -329,7 +329,7 @@ Unused Unused Unused Unused -1 - include dead characters, otherwise no +Include dead characters? If party size sufficient, call this special ... Unused 0 - Exact size, 1 - Minimum size @@ -449,7 +449,7 @@ Unused Unused Unused Which context (0 .. 24) -0 - can enter, 1 - no enter +Prevent entry? If context matches, call this special ... Unused Unused diff --git a/rsrc/strings/specials-text-once.txt b/rsrc/strings/specials-text-once.txt index 2f5cc87f..862daeb0 100644 --- a/rsrc/strings/specials-text-once.txt +++ b/rsrc/strings/specials-text-once.txt @@ -88,7 +88,7 @@ Stuff Done Flag Part A Stuff Done Flag Part B Number of first message in dialog Unused -1 - add 'Leave'/'OK' button, else no +Add 'Leave'/'OK' button? Picture number Picture type Label of 2nd button (-1 - no button) diff --git a/rsrc/strings/specials-text-rect.txt b/rsrc/strings/specials-text-rect.txt index 8a90cfeb..74c4dbf1 100644 --- a/rsrc/strings/specials-text-rect.txt +++ b/rsrc/strings/specials-text-rect.txt @@ -37,7 +37,7 @@ X of space to move to Y of space to move to First part of message Second part of message -Set to 1 to place in container, if present +Place in container, if present? 0 - entire rectangle, 1 - just borders Unused Top of rectangle diff --git a/rsrc/strings/specials-text-town.txt b/rsrc/strings/specials-text-town.txt index b3138554..3929f7a1 100644 --- a/rsrc/strings/specials-text-town.txt +++ b/rsrc/strings/specials-text-town.txt @@ -77,7 +77,7 @@ Unused X coordinate of space Y coordinate of space Unused -0 - Just move, 1 - Teleport +Play teleport animation? Unused Unused Special to Jump To @@ -197,7 +197,7 @@ X coordinate of space to place Y coordinate of space to place Unused Number of creature to place -1 - force placement +Force placement? Unused Special to Jump To @@ -350,7 +350,7 @@ X coordinate to place at Y coordinate to place at Unused Number of town to place party in -If 1, always change level. +Skip dialog and always change level? Trigger Limitations Special to Call in New Town @@ -384,7 +384,7 @@ X coordinate to place at Y coordinate to place at Unused Item to place -Set to 1 to place in container, if present +Place in container, if present? Unused Special to Jump To @@ -417,7 +417,7 @@ Unused Sound to play (10 = teleport) Unused Unused -If 1, don't change location +0 - return to split point, 1 - don't change location Unused Unused Special to Jump To @@ -520,8 +520,8 @@ Which spell pattern? (0 - single space) Max range? (ignored outside combat mode) Max targets? (>1 only in combat) Special Called if Targeting Fails -if 1, allow obstructed spaces -if 1, allow targeting in antimagic fields +Allow obstructed spaces? +Allow targeting in antimagic fields? Special to Call for Each Target -------------------- diff --git a/src/scenedit/scen.keydlgs.cpp b/src/scenedit/scen.keydlgs.cpp index 518b5431..93bdfc16 100644 --- a/src/scenedit/scen.keydlgs.cpp +++ b/src/scenedit/scen.keydlgs.cpp @@ -555,19 +555,28 @@ static void setup_node_field(cDialog& me, std::string field, short value, const me[field].setTextToNum(value); bool is_sdf = field.substr(0,3) == "sdf"; std::string button = field + "-edit"; + std::string toggle = field + "-toggle"; switch(fcn.button) { case eSpecPicker::NONE: me[button].hide(); + me[toggle].hide(); break; case eSpecPicker::MSG_PAIR: case eSpecPicker::MSG_SINGLE: case eSpecPicker::MSG_SEQUENCE: case eSpecPicker::NODE: me[button].show(); + me[toggle].hide(); if(is_sdf) break; me[button].setText("Create/Edit"); dynamic_cast(me[button]).setBtnType(BTN_LG); break; + case eSpecPicker::TOGGLE: + me[button].hide(); + me[toggle].show(); + dynamic_cast(me[toggle]).setState(value > 0 ? eLedState::led_red : eLedState::led_off); + break; default: me[button].show(); + me[toggle].hide(); if(is_sdf) break; me[button].setText("Choose"); dynamic_cast(me[button]).setBtnType(BTN_REG); @@ -866,6 +875,17 @@ static bool edit_spec_enc_value(cDialog& me, std::string item_hit, node_stack_t& store = val; edit_dialog_text(fcn.force_global ? STRS_SCEN : eStrMode(edit_stack.top().mode), &store, &me); break; + case eSpecPicker::TOGGLE: { + // TODO: We should also add a focus handler so that manually changing the field value updates the toggle... + cLed& toggle = dynamic_cast(me[item_hit]); + if(val > 0) { + store = 0; + toggle.setState(eLedState::led_off); + } else { + store = 1; + toggle.setState(eLedState::led_red); + } + } break; case eSpecPicker::NODE: { short mode = fcn.force_global ? 0 : edit_stack.top().mode; store = val < 0 ? get_fresh_spec(mode) : val; @@ -1000,6 +1020,9 @@ bool edit_spec_enc(short which_node,short mode,cDialog* parent) { "msg1-edit", "msg2-edit", "msg3-edit", "pict-edit", "pictype-edit", "jump-edit", "x1a-edit", "x1b-edit", "x1c-edit", "x2a-edit", "x2b-edit", "x2c-edit", "sdf1-edit", "sdf2-edit", + "msg1-toggle", "msg2-toggle", "msg3-toggle", "pict-toggle", "pictype-toggle", "jump-toggle", + "x1a-toggle", "x1b-toggle", "x1c-toggle", "x2a-toggle", "x2b-toggle", "x2c-toggle", + "sdf1-toggle", "sdf2-toggle", }); special["cancel"].attachClickHandler(std::bind(discard_spec_enc, _1, std::ref(edit_stack))); special["node-help"].attachClickHandler([&edit_stack](cDialog& me, std::string item_hit, eKeyMod mods) {