diff --git a/rsrc/dialogs/edit-special-node.xml b/rsrc/dialogs/edit-special-node.xml
index 19fbbdaf..95efb582 100644
--- a/rsrc/dialogs/edit-special-node.xml
+++ b/rsrc/dialogs/edit-special-node.xml
@@ -30,9 +30,11 @@
Stuff Done Flags:
+
+
Message, Pict:
diff --git a/src/classes/special.cpp b/src/classes/special.cpp
index c640ea15..60446644 100644
--- a/src/classes/special.cpp
+++ b/src/classes/special.cpp
@@ -516,14 +516,16 @@ static std::map loadProps() {
props.p_btn = button_dict[j][3][k];
props.pt_btn = button_dict[j][4][k];
if(category != eSpecCat::RECT) {
+ props.sd1_btn = ' ';
props.x1a_btn = button_dict[j][5][k];
props.x1b_btn = button_dict[j][6][k];
- }
+ } else props.sd1_btn = button_dict[j][5][k];
props.x1c_btn = button_dict[j][7][k];
if(category != eSpecCat::RECT) {
+ props.sd2_btn = ' ';
props.x2a_btn = button_dict[j][8][k];
props.x2b_btn = button_dict[j][9][k];
- }
+ } else props.sd2_btn = button_dict[j][8][k];
props.x2c_btn = button_dict[j][10][k];
if(category == eSpecCat::RECT) {
props.x1a_btn = props.x2a_btn = ' ';
diff --git a/src/classes/special.h b/src/classes/special.h
index a16fa95b..57d6bbc8 100644
--- a/src/classes/special.h
+++ b/src/classes/special.h
@@ -65,7 +65,7 @@ struct node_properties_t {
std::string ex1a_lbl() const, ex1b_lbl() const, ex1c_lbl() const, ex1a_hlp() const, ex1b_hlp() const, ex1c_hlp() const;
std::string ex2a_lbl() const, ex2b_lbl() const, ex2c_lbl() const, ex2a_hlp() const, ex2b_hlp() const, ex2c_hlp() const;
std::string jmp_lbl() const, jmp_hlp() const;
- char m1_btn, m2_btn, m3_btn, p_btn, pt_btn;
+ char sd1_btn, sd2_btn, m1_btn, m2_btn, m3_btn, p_btn, pt_btn;
char x1a_btn, x1b_btn, x1c_btn, x2a_btn, x2b_btn, x2c_btn;
node_properties_t() {}
node_properties_t(std::initializer_list>);
diff --git a/src/scenedit/scen.keydlgs.cpp b/src/scenedit/scen.keydlgs.cpp
index ec365363..961b36b7 100644
--- a/src/scenedit/scen.keydlgs.cpp
+++ b/src/scenedit/scen.keydlgs.cpp
@@ -457,24 +457,22 @@ typedef std::stack node_stack_t;
static void setup_node_field(cDialog& me, std::string field, short value, std::string label, char buttonType) {
me[field + "-lbl"].setText(label);
me[field].setTextToNum(value);
+ bool is_sdf = field.substr(0,3) == "sdf";
std::string button = field + "-edit";
- try { // Just make sure the button exists before fiddling with it.
- me.getControl(button);
- } catch(std::invalid_argument) {
- return;
- }
switch(buttonType) {
case ' ':
me[button].hide();
break;
- case 'm': case 'M': case'$': case 'd': // messages
+ case 'm': case 'M': case '$': case 'd': // messages
case 's': case 'S': // specials
me[button].show();
+ if(is_sdf) break;
me[button].setText("Create/Edit");
dynamic_cast(me[button]).setBtnType(BTN_LG);
break;
default:
me[button].show();
+ if(is_sdf) break;
me[button].setText("Choose");
dynamic_cast(me[button]).setBtnType(BTN_REG);
break;
@@ -499,8 +497,8 @@ static void put_spec_enc_in_dlog(cDialog& me, node_stack_t& edit_stack) {
node_properties_t info = *spec.type;
// Set up the labels, fields, and buttons
- setup_node_field(me, "sdf1", spec.sd1, info.sdf1_lbl(), ' ');
- setup_node_field(me, "sdf2", spec.sd2, info.sdf2_lbl(), ' ');
+ setup_node_field(me, "sdf1", spec.sd1, info.sdf1_lbl(), info.sd1_btn);
+ setup_node_field(me, "sdf2", spec.sd2, info.sdf2_lbl(), info.sd2_btn);
setup_node_field(me, "msg1", spec.m1, info.msg1_lbl(), info.m1_btn);
setup_node_field(me, "msg2", spec.m2, info.msg2_lbl(), info.m2_btn);
@@ -731,7 +729,8 @@ static bool edit_spec_enc_value(cDialog& me, std::string item_hit, node_stack_t&
std::string field = item_hit.substr(0, item_hit.find_first_of('-'));
char btn;
eSpecType type = edit_stack.top().node.type;
- if(field.substr(0,3) == "sdf") return true;
+ if(field == "sdf1") btn = (*type).sd1_btn;
+ else if(field == "sdf2") btn = (*type).sd2_btn;
else if(field == "msg1") btn = (*type).m1_btn;
else if(field == "msg2") btn = (*type).m2_btn;
else if(field == "msg3") btn = (*type).m3_btn;
@@ -882,6 +881,7 @@ bool edit_spec_enc(short which_node,short mode,cDialog* parent) {
special.attachClickHandlers(std::bind(edit_spec_enc_value, _1, _2, std::ref(edit_stack)), {
"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",
});
special["cancel"].attachClickHandler(std::bind(discard_spec_enc, _1, std::ref(edit_stack)));