From 8a502fe1d6c8c5ebdb6d962b8d3cbe6d39b3b1fd Mon Sep 17 00:00:00 2001 From: Sam Date: Sat, 8 Aug 2026 17:13:23 +0700 Subject: [PATCH] the client starts remembering: zoom, camera, filters, a Combat page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - minimap zoom and the camera's distance and pitch persist across sessions - the trainer's point-filter is a saved variable now and survives a relog, resetting per packet like the reference - the options window gains its Combat page, over rows that can write the UI's own saved globals - the step-up is a rise, not a jump forward — and the descent cone's cap belongs to the body, on every leg Co-Authored-By: Claude Fable 5 --- crates/benilla-app/assets/ui/CombatText.xml | 23 +- crates/benilla-app/assets/ui/GameTime.xml | 8 +- crates/benilla-app/assets/ui/OptionsFrame.xml | 345 ++++++++++++++++- crates/benilla-app/assets/ui/TrainerFrame.xml | 55 ++- crates/benilla-app/src/cvars.rs | 128 ++++++- crates/benilla-app/src/lib.rs | 3 + crates/benilla-app/src/local_state.rs | 28 ++ crates/benilla-app/src/minimap/mod.rs | 29 ++ crates/benilla-app/src/player.rs | 4 + crates/benilla-app/src/player/camera.rs | 6 +- crates/benilla-app/src/player/camera_saved.rs | 262 +++++++++++++ crates/benilla-app/src/player/mover.rs | 348 ++++++++++++++---- crates/benilla-app/src/ui_saved.rs | 213 +++++++++++ crates/benilla-app/src/ui_script/mod.rs | 14 +- .../src/ui_script/options_tests.rs | 269 +++++++++++++- .../src/ui_script/shipped_xml_tests.rs | 21 ++ .../src/ui_script/trainer_tests.rs | 121 +++++- crates/benilla-app/src/ui_trainer/mod.rs | 17 +- crates/benilla-ui/src/script/cvars.rs | 22 ++ crates/benilla-ui/src/script/minimap.rs | 27 +- crates/benilla-ui/src/script/mod.rs | 21 ++ crates/benilla-ui/src/script/model.rs | 5 + crates/benilla-ui/src/script/saved.rs | 317 ++++++++++++++++ crates/benilla-ui/src/script/tests/minimap.rs | 63 ++++ crates/benilla-ui/src/script/trainer/mod.rs | 25 ++ 25 files changed, 2254 insertions(+), 120 deletions(-) create mode 100644 crates/benilla-app/src/player/camera_saved.rs create mode 100644 crates/benilla-app/src/ui_saved.rs create mode 100644 crates/benilla-ui/src/script/saved.rs diff --git a/crates/benilla-app/assets/ui/CombatText.xml b/crates/benilla-app/assets/ui/CombatText.xml index 1c47d52e..344041fb 100644 --- a/crates/benilla-app/assets/ui/CombatText.xml +++ b/crates/benilla-app/assets/ui/CombatText.xml @@ -42,22 +42,41 @@ COMBAT_TEXT_LOCATIONS = {} -- The option family's saved-variables (ref UIOptionsFrame.lua l.125-152), at the ref - -- defaults except the master (see the header). No options panel binds them yet — flip in - -- Lua when wanted. + -- defaults except the master (see the header). Each is assigned AT FILE SCOPE and + -- registered on the line under it — the reference's own load order (decision 1128): + -- defaults first, the saved chunk over the top, consumers third; reverse any two and a + -- saved value can never win. The Options window's Combat page drives all fourteen + -- (decision 1134) and takes its Defaults values from these very assignments, read at the + -- row's OnLoad — which runs before the saved chunk — so each default lives in one place, + -- here, and the panel cannot drift from it. SHOW_COMBAT_TEXT = "1" + RegisterForSave("SHOW_COMBAT_TEXT") COMBAT_TEXT_SHOW_LOW_HEALTH_MANA = "1" + RegisterForSave("COMBAT_TEXT_SHOW_LOW_HEALTH_MANA") COMBAT_TEXT_SHOW_AURAS = "1" + RegisterForSave("COMBAT_TEXT_SHOW_AURAS") COMBAT_TEXT_SHOW_AURA_FADE = "0" + RegisterForSave("COMBAT_TEXT_SHOW_AURA_FADE") COMBAT_TEXT_SHOW_COMBAT_STATE = "1" + RegisterForSave("COMBAT_TEXT_SHOW_COMBAT_STATE") COMBAT_TEXT_SHOW_DODGE_PARRY_MISS = "0" + RegisterForSave("COMBAT_TEXT_SHOW_DODGE_PARRY_MISS") COMBAT_TEXT_SHOW_RESISTANCES = "0" + RegisterForSave("COMBAT_TEXT_SHOW_RESISTANCES") COMBAT_TEXT_SHOW_REPUTATION = "0" + RegisterForSave("COMBAT_TEXT_SHOW_REPUTATION") COMBAT_TEXT_SHOW_REACTIVES = "0" + RegisterForSave("COMBAT_TEXT_SHOW_REACTIVES") COMBAT_TEXT_SHOW_FRIENDLY_NAMES = "0" + RegisterForSave("COMBAT_TEXT_SHOW_FRIENDLY_NAMES") COMBAT_TEXT_SHOW_COMBO_POINTS = "0" + RegisterForSave("COMBAT_TEXT_SHOW_COMBO_POINTS") COMBAT_TEXT_SHOW_MANA = "0" + RegisterForSave("COMBAT_TEXT_SHOW_MANA") COMBAT_TEXT_SHOW_HONOR_GAINED = "1" + RegisterForSave("COMBAT_TEXT_SHOW_HONOR_GAINED") COMBAT_TEXT_FLOAT_MODE = "1" + RegisterForSave("COMBAT_TEXT_FLOAT_MODE") -- The message words (shipped enUS GlobalStrings values, hardcoded like the rest of our -- enUS-only data; or-guarded so an earlier definition wins). diff --git a/crates/benilla-app/assets/ui/GameTime.xml b/crates/benilla-app/assets/ui/GameTime.xml index be365f5e..fd249fcc 100644 --- a/crates/benilla-app/assets/ui/GameTime.xml +++ b/crates/benilla-app/assets/ui/GameTime.xml @@ -22,9 +22,11 @@ macro; CharacterFrame.xml's note). - TwentyFourHourTime = 1 is SET here: the reference sets it in Localization.lua's LocalizeFrames() — this install is enGB, and enGB is a 24-hour locale — called at - VARIABLES_LOADED, which benilla doesn't fire yet (no saved-variables arc; BagFrame.xml's - precedent). So the tooltip reads "21:07" exactly as the reference client on this install - does; the 12-hour AM/PM branches stay verbatim below for the day a locale/CVar drives it. + VARIABLES_LOADED. benilla fires that event since decision 1128 and could carry this as a saved + variable (it is on 1128's follow-on list), but the value here is a LOCALE fact, not a player + toggle: this install is enGB and enGB is a 24-hour locale. So the tooltip reads "21:07" exactly + as the reference client on this install does; the 12-hour AM/PM branches stay verbatim below + for the day a locale/CVar drives it. -->