From d47249b4041adf8bead28268b089d54ee2f4506f Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Thu, 26 Sep 2024 10:41:47 -0500 Subject: [PATCH] rename control_click to click_control --- src/dialogxml/dialogs/dialog.cpp | 2 +- src/dialogxml/widgets/container.cpp | 2 +- src/dialogxml/widgets/control.cpp | 2 +- src/dialogxml/widgets/ledgroup.cpp | 2 +- src/tools/replay.cpp | 4 ++-- test/replays/short/Issue455.xml | 20 ++++++++++---------- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/dialogxml/dialogs/dialog.cpp b/src/dialogxml/dialogs/dialog.cpp index 333504fc..e1f4c7b6 100644 --- a/src/dialogxml/dialogs/dialog.cpp +++ b/src/dialogxml/dialogs/dialog.cpp @@ -564,7 +564,7 @@ void cDialog::handle_events() { cFramerateLimiter fps_limiter; while(dialogNotToast) { - if(replaying && has_next_action("control_click")){ + if(replaying && has_next_action("click_control")){ Element& next_action = pop_next_action(); auto info = info_from_action(next_action); if(info["id"].empty()) continue; diff --git a/src/dialogxml/widgets/container.cpp b/src/dialogxml/widgets/container.cpp index ff4f8643..3fd91d4f 100644 --- a/src/dialogxml/widgets/container.cpp +++ b/src/dialogxml/widgets/container.cpp @@ -70,7 +70,7 @@ bool cContainer::handleClick(location where, cFramerateLimiter& fps_limiter) { void cContainer::callHandler(event_fcn::type onClick, cDialog& me, std::string id, eKeyMod mods) { // When replaying, a click event for the specifically child control comes next if(replaying){ - auto child_click_action = pop_next_action("control_click"); + auto child_click_action = pop_next_action("click_control"); auto info = info_from_action(child_click_action); clicking = info["id"]; } diff --git a/src/dialogxml/widgets/control.cpp b/src/dialogxml/widgets/control.cpp index 037d519e..d4b681a7 100644 --- a/src/dialogxml/widgets/control.cpp +++ b/src/dialogxml/widgets/control.cpp @@ -352,7 +352,7 @@ bool cControl::haveHandler(eDlogEvt t) const { bool cControl::triggerClickHandler(cDialog& dlg, std::string id, eKeyMod mods){ if(recording){ std::map action_info = {{"id", id}, {"mods", boost::lexical_cast(mods)}}; - record_action("control_click", action_info); + record_action("click_control", action_info); } triggerEvent(dlg, id, mods); return true; diff --git a/src/dialogxml/widgets/ledgroup.cpp b/src/dialogxml/widgets/ledgroup.cpp index 447cc774..7d259e5c 100644 --- a/src/dialogxml/widgets/ledgroup.cpp +++ b/src/dialogxml/widgets/ledgroup.cpp @@ -73,7 +73,7 @@ bool cLedGroup::handleClick(location where, cFramerateLimiter& fps_limiter) { void cLedGroup::callHandler(event_fcn::type onClick, cDialog& me, std::string id, eKeyMod mods) { // When replaying, a click event for the specifically clicked led comes next if(replaying){ - auto led_click_action = pop_next_action("control_click"); + auto led_click_action = pop_next_action("click_control"); auto info = info_from_action(led_click_action); clicking = info["id"]; } diff --git a/src/tools/replay.cpp b/src/tools/replay.cpp index 5d114e3f..203fe3c5 100644 --- a/src/tools/replay.cpp +++ b/src/tools/replay.cpp @@ -184,8 +184,8 @@ Element& pop_next_action(std::string expected_action_type) { replay_fps_limit->frame_finished(); } - // control_click actions are not meaningful for debugging - if (to_return->Value() != "control_click"){ + // click_control actions are not meaningful for debugging + if (to_return->Value() != "click_control"){ last_action_type = to_return->Value(); if(replay_verbose){ diff --git a/test/replays/short/Issue455.xml b/test/replays/short/Issue455.xml index 36b7bf8b..df777a88 100644 --- a/test/replays/short/Issue455.xml +++ b/test/replays/short/Issue455.xml @@ -23,26 +23,26 @@ UIScaleMap = 1.5 1 AnimatedTile.boes Boundary Test.boes Boundary Test 2.boes Display Picture.boes myscenario.boes thrakos.exs recttown.exs - + list 1 - - + + scen1 1 - - + + btn1 0 - + (8,8) (9,7) (10,7) (11,7) - + done 0 - + (11,7) (12,8) (12,9) @@ -58,8 +58,8 @@ UIScaleMap = 1.5 Ask About... response - + okay 0 - +