From 6666a2753f4edc99112b8efaf8d8f03e14878155 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Sun, 6 Apr 2025 09:51:30 -0500 Subject: [PATCH] custom choice dialogs Stay/Leave can't both use Enter Key. And since depending on context they could both mean 'Cancel' but 'Leave' could be a positive action in some contexts, I've just given them no keys. --- src/dialogxml/widgets/basicbtns.cpp | 4 ++-- src/game/boe.specials.cpp | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/dialogxml/widgets/basicbtns.cpp b/src/dialogxml/widgets/basicbtns.cpp index 46a6d11d..1db23781 100644 --- a/src/dialogxml/widgets/basicbtns.cpp +++ b/src/dialogxml/widgets/basicbtns.cpp @@ -23,7 +23,7 @@ bbtt basic_buttons[71] = { {BTN_REG, "Cancel", {true,key_esc,mod_none}}, {BTN_REG, "Buy", {false,0,mod_none}}, {BTN_REG, "Enter", {false,0,mod_none}}, - {BTN_REG, "Leave", {true,key_enter,mod_none}}, + {BTN_REG, "Leave", {false,0,mod_none}}, {BTN_REG, "Get", {false,'g',mod_none}}, {BTN_REG, "1", {false,'1',mod_none}}, {BTN_REG, "2", {false,'2',mod_none}}, @@ -34,7 +34,7 @@ bbtt basic_buttons[71] = { {BTN_REG, "Cast", {false,0,mod_none}}, {BTN_REG, "Save", {false,0,mod_none}}, {BTN_REG, "Take", {false,0,mod_none}}, - {BTN_REG, "Stay", {true,key_enter,mod_none}}, + {BTN_REG, "Stay", {false,0,mod_none}}, {BTN_REG, "Steal", {false,0,mod_none}}, {BTN_REG, "Attack", {false,0,mod_none}}, {BTN_LG, "Step In", {false,0,mod_none}}, diff --git a/src/game/boe.specials.cpp b/src/game/boe.specials.cpp index d3f1efa4..20900b70 100644 --- a/src/game/boe.specials.cpp +++ b/src/game/boe.specials.cpp @@ -2567,9 +2567,11 @@ void oneshot_spec(const runtime_state& ctx) { break; get_strs(strs, ctx.cur_spec_type, spec.m1); if(spec.m3 > 0) { + // The first button defaults to OK if toggle is on buttons[0] = 1; buttons[1] = spec.ex1a; buttons[2] = spec.ex2a; + // If button 2 and/or button 3 are provided, the first button becomes a Leave button! if((spec.ex1a >= 0) || (spec.ex2a >= 0)) buttons[0] = 9; }