Compare commits

...

2 Commits

28 changed files with 956 additions and 172 deletions

View File

@ -1,4 +1,4 @@
Ruen UI - ESDF key map (2026.11.21.5-beta.1)
Ruen UI - ESDF key map (2026.11.21.6-beta.1)
MOVEMENT
Q W [E] R T
@ -29,10 +29,15 @@ are preserved during setup. Ruen manages bar positions; duplicate its Edit Mode
UTILITY BARS (48 slots; all still clickable)
Each bar uses 1 2 3 4 5 6 / 7 8 9 0 - = in two rows of six.
Right group: bottom bar = Ctrl + numbers; upper bar = Shift + numbers.
Right group: bottom bar = numbers (utility profile) or Ctrl + numbers (pet profile);
upper bar = Shift + numbers.
Left group: bottom bar = Alt + numbers; upper bar = Ctrl + Shift + numbers.
Plain 1–0 controls the ten native pet slots. - and = cast up to two learned
active pet abilities missing from those ten slots; they fill automatically.
Hunter/Warlock default to the pet profile: plain 1–0 controls the ten native pet
slots; - and = activate the two extensions. Other classes default to the utility
profile: pet controls use Ctrl+1–0, Ctrl+- and Ctrl+=.
/ruen keys auto|pet|utility selects a per-character profile. Native vehicle and
possession controls take priority. Pet death/dismissal and forms do not remap keys.
The two extra buttons fill with eligible missing active pet abilities automatically.
Right-click an extra ability to toggle its autocast when supported.
Drag a learned pet ability/command onto either extra button while unlocked.
/ruen pet auto restores automatic overflow. Player spells/items are not pet actions.
@ -49,7 +54,7 @@ TARGETING AND INTERACTION
Tab / front thumb Next enemy (Mouse Button 5)
Shift+Tab / rear thumb Previous enemy (Mouse Button 4)
F1-F5 Self/party targeting (existing bindings retained)
1..0 Pet controls (centered row, larger icons)
1..0 Pet controls on Hunter/Warlock; utility actions on other classes
U Interact with target
Shift+U Assist target (select its target)
Ctrl+Shift+U Select your target's target's target, when present
@ -98,7 +103,7 @@ The store deliberately has no shortcut. Menus absent from this game branch
are skipped and reported; level/account restrictions still apply normally.
I/J/K/L group inventory, journal, character and group finder. P is spellbook,
with profession/pet variants; O groups social panels. Shift/Ctrl combat rows,
ESDF is preserved. Alt is now the fourth combat row, not a forced-self-cast modifier. F1-F5 retains party targeting; plain 1..0 controls pets.
ESDF is preserved. Alt is now the fourth combat row, not a forced-self-cast modifier. F1-F5 retains party targeting; number keys follow the character profile.
BAG WINDOW
Combined inventory opens to the left of the right-side quest/utility column,
@ -116,7 +121,7 @@ LANGUAGE AND HELP
/ruen language toggle Switch English/Russian game text/audio and narration.
/ruen voice en English narration only; leave game text/audio unchanged.
/ruen voice ru Russian narration only; leave game text/audio unchanged.
/ruen bindings Reapply only the new mouse/menu controls.
/ruen bindings Deliberately reapply mouse/menu and utility mappings.
English/Russian full names and enUS/ruRU also work. Spoken and Spoken_Quests are
required dependencies. Narration changes the active Spoken profile immediately;
@ -158,7 +163,12 @@ See docs/INSTALL.md for the measured world/raid calibration workflow.
CLASS ASSIST COMMANDS (no new keybindings)
/ruen cooldowns auto|show|hide|off|settings — native class cooldown/buff displays.
/ruen mouseover auto|on|off — per-character hover casting.
Auto mouseover: priest/druid/paladin/shaman ON; other classes OFF.
/ruen role auto|healer|tank|damage selects the role used by auto mouseover.
Auto uses a reliable native specialization/assigned role when available; only
HEALER enables mouseover. Unknown roles remain off. Explicit on/off wins.
Upgrades preserve the old effective mouseover choice; selecting a role explicitly
opts into the new automatic behavior. Cooldown/meter modes are per character.
Fresh installs start with duplicate cooldown viewers off; upgrades retain choices.
When enabled, hover a valid friendly or enemy unit/frame and use the spell key.
No added modifier; existing Shift/Ctrl/Alt rows and mouse buttons stay unchanged.
@ -166,7 +176,7 @@ Left utility layout: two compact bars, each with two rows of six at every screen
size. Alt+1–= remains the lower bar; Ctrl+Shift+1–= remains the upper bar.
All 24 slots and their shortcuts are retained; only arrangement changes.
Pet extras (-/=): real pet actions; left-click/key activates, right-click toggles
Pet extras (-/=, or Ctrl+-/= with the utility profile): real pet actions; left-click/key activates, right-click toggles
autocast when supported. The addon uses two free slots on unused page 2 and
preserves all visible player slots. /ruen unlock to assign; /ruen pet auto to reset.

View File

@ -4,7 +4,7 @@ A compact, class-aware **WoW: Forever** interface with ESDF controls, English/Ru
**[Download the beta](https://scm.bstein.dev/bstein/ruen-ui/releases)** · **[Windows installation](docs/INSTALL.md)** · **[Инструкция на русском](docs/INSTALL-RU.md)** · **[Release review](docs/RELEASE-REVIEW.md)** · **[Report a problem](https://scm.bstein.dev/bstein/ruen-ui/issues)**
Choose **Ruen-UI-2026.11.21.5-beta.1.zip** under release assets, not Gitea's automatic source ZIP. No account is needed to download. The download is small; setup then retrieves the selected companion addons directly from their authors.
Choose **Ruen-UI-2026.11.21.6-beta.1.zip** under release assets, not Gitea's automatic source ZIP. No account is needed to download. The download is small; setup then retrieves the selected companion addons directly from their authors.
## Windows quick start
@ -19,15 +19,18 @@ Ruen changes movement to **E forward, D backward, S/F strafe**. Turn using the r
## What is included
- Four central combat rows and four compact utility bars: **96 action buttons** with consistent modifier keys.
- Native forms, stances, totems, casting and pet controls. A centered pet row adds two configurable extra pet actions on **-** and **=** when spare native action slots are available.
- Per-character number-key profiles: Hunters/Warlocks use numbers for pets; other classes use numbers for utility actions. `/ruen keys auto|pet|utility` changes this without rewriting account bindings.
- Native forms, stances, totems, casting and pet controls. A centered pet row adds two configurable extra pet actions on **-** and **=** (Ctrl-modified with the utility profile) when spare native action slots are available. These are extensions of the native ten-slot bar, not additional native pet slots.
- Layout rules for bags, tooltips, notifications, party/raid frames and native damage meters. Meters appear automatically in dungeons and raids; `/ruen meters off` disables them.
- Optional native cooldown displays and class defaults for mouseover casting. Cooldown coverage comes from the game; it is not an exhaustive tracker for every learned spell.
- Optional native cooldown displays and role-based defaults for mouseover casting. Cooldown coverage comes from the game; it is not an exhaustive tracker for every learned spell.
- Spoken quest narration with English or English + Russian recordings. Game text and spoken language files must be installed separately through Battle.net.
- Optional graphics calibration for world/raid play, with a configurable FPS target. Hardware reports are generated on the destination PC; no donor hardware profile is shipped.
- Gun Silencer Forever integration, default replacement volume **100**. Its softer shot is still a gunshot. **Nearby original gunfire is muted while enabled**; `/ruen guns off` restores native audio.
The installer downloads Leatrix Plus, Leatrix Maps, Spoken, Gun Silencer Forever and your chosen narration packs from pinned upstream releases. Existing Forever-compatible copies and saved settings are retained. See [dependencies and licenses](docs/DEPENDENCIES.md).
See the [staged update checklist](docs/UPDATE-PLAN.md) for implementation and release gates.
## Beta status
Installer transaction tests, Lua regressions, source review and prior local gameplay checks inform this release. **A clean native Windows installation and every class/spec in live raids have not been verified.** Automated layout simulations are not a guarantee against every possible addon or window combination. See the [release review](docs/RELEASE-REVIEW.md) for the tested scope and remaining limitations.

77
RuenUI/ButtonStyle.lua Normal file
View File

@ -0,0 +1,77 @@
local _, P = ...
-- Presentation only: never replace Blizzard's secure button mixins or scripts.
-- Modern action templates expose named regions even when a texture getter is
-- absent. Copying only the getter left the pet extensions with a generic glow.
local defaults = {
Normal = "UI-HUD-ActionBar-IconFrame",
Pushed = "UI-HUD-ActionBar-IconFrame-Down",
Highlight = "UI-HUD-ActionBar-IconFrame-Mouseover",
Checked = "UI-HUD-ActionBar-IconFrame-Mouseover",
}
local function region(frame, kind)
if not frame then return end
local named = frame[kind .. "Texture"]
if named then return named end
local getter = frame["Get" .. kind .. "Texture"]
return type(getter) == "function" and getter(frame) or nil
end
function P.StyleActionButton(button, prototype)
for _, kind in ipairs({"Normal", "Pushed", "Highlight", "Checked"}) do
local source = region(prototype, kind)
local atlas = source and source:GetAtlas() or defaults[kind]
local setter = button["Set" .. kind .. "Atlas"]
if atlas and type(setter) == "function" then setter(button, atlas)
elseif source and source:GetTexture() then button["Set" .. kind .. "Texture"](button, source:GetTexture())
end
local target = region(button, kind)
if target then
target:ClearAllPoints()
-- Native small buttons anchor the art at TOPLEFT, not CENTER.
-- Match its size relative to the icon at any pet/UI scale.
local point, relative, relativePoint, x, y
if source and source.GetPoint then point, relative, relativePoint, x, y = source:GetPoint(1) end
if point and (relative == prototype or relative == prototype.icon) then
local ratio = button:GetWidth() / prototype:GetWidth()
target:SetPoint(point, button, relativePoint, (x or 0) * ratio, (y or 0) * ratio)
else target:SetPoint("TOPLEFT", button, "TOPLEFT", 0, 0) end
local w, h = button:GetWidth(), button:GetHeight()
if source and prototype:GetWidth() > 0 and prototype:GetHeight() > 0 then
target:SetSize(source:GetWidth() / prototype:GetWidth() * w,
source:GetHeight() / prototype:GetHeight() * h)
target:SetTexCoord(source:GetTexCoord())
if source.GetBlendMode and target.SetBlendMode then target:SetBlendMode(source:GetBlendMode()) end
if source.GetDrawLayer and target.SetDrawLayer then target:SetDrawLayer(source:GetDrawLayer()) end
else target:SetSize(w * 46 / 45, h) end
-- Do not inherit the prototype's transient attack-flash alpha.
if target.SetAlpha then target:SetAlpha(1) end
end
end
if prototype and prototype.Flash then
local source = prototype.Flash
if not button.Flash then button.Flash = button:CreateTexture(nil, "OVERLAY"); button.Flash:Hide() end
local flash = button.Flash
if source:GetAtlas() and flash.SetAtlas then flash:SetAtlas(source:GetAtlas()) else flash:SetTexture(source:GetTexture()) end
flash:ClearAllPoints(); flash:SetPoint("TOPLEFT", button, "TOPLEFT", 0, 0)
flash:SetSize(source:GetWidth() / prototype:GetWidth() * button:GetWidth(),
source:GetHeight() / prototype:GetHeight() * button:GetHeight())
end
end
function P.SetActionButtonSelected(button, selected, attack)
-- Pass an engine value straight to the widget; do not inspect secret values.
button:SetChecked(selected)
local checked = region(button, "Checked")
if checked and checked.SetAlpha then checked:SetAlpha(attack and .5 or 1) end
if button.Flash and UIFrameFlash and UIFrameFlashStop then
local flashing = false
if not (issecretvalue and issecretvalue(selected)) then flashing = attack and selected or false end
if flashing ~= button.ruenAttackFlashing then
if flashing then UIFrameFlash(button.Flash, .5, .5, -1, false)
else UIFrameFlashStop(button.Flash); button.Flash:Hide() end
button.ruenAttackFlashing = flashing
end
end
end

View File

@ -0,0 +1,233 @@
local _, P = ...
local numbers = {"1","2","3","4","5","6","7","8","9","0","-","="}
local petClasses = {HUNTER=true, WARLOCK=true}
local healClasses = {PRIEST=true, PALADIN=true, SHAMAN=true, DRUID=true}
local owner, listener, queued, signature
local effective, hooked = {}, {}
-- Executed by SecureHandlerStateTemplate, including transitions IN combat.
-- Never intercept native vehicle/possession/override controls. Ordinary rogue
-- stealth and druid forms keep the same utility keys and native main-bar paging.
local bindingSnippet = [[
self:ClearBindings()
if self:GetAttribute("state-ruencontrols") == "normal" then
for i = 1, self:GetAttribute("bindingCount") or 0 do
self:SetBinding(false, self:GetAttribute("key"..i), self:GetAttribute("action"..i))
end
end
]]
local conditions = "[vehicleui][overridebar][possessbar] special; normal"
function P.EnsureCharacterProfile()
if not RuenUICharacter or not RuenUIDB then return end
if RuenUICharacter.profileVersion == 1 then return end
-- Older releases recorded these shared migrations separately. Establish
-- their ownership before any fresh-character setup can replay them.
if not RuenUIDB.combatBindingsVersion and RuenUIDB.extraBindingsVersion == 1 and RuenUIDB.controlsVersion == 1 then
RuenUIDB.combatBindingsVersion = 2
end
-- Preserve the EFFECTIVE old modes, including explicit off. Fresh installs
-- start without duplicate cooldown icons; upgrades retain their choice.
RuenUICharacter.cooldownsMode = RuenUICharacter.cooldownsMode or RuenUIDB.cooldownsMode
or (RuenUICharacter.version and "auto" or "off")
RuenUICharacter.damageMeterMode = RuenUICharacter.damageMeterMode or RuenUIDB.damageMeterMode or "auto"
if (not RuenUICharacter.mouseoverMode or RuenUICharacter.mouseoverMode == "auto") and RuenUICharacter.version then
local old = RuenUICharacter.mouseoverApplied
local _, class = UnitClass("player")
local enabled = old and old.enabled
if enabled == nil then enabled = healClasses[class] or false end
local identity = (UnitGUID and UnitGUID("player")) or (UnitName("player")..":"..class)
if RuenUIDB.mouseoverLastCharacter == identity and C_CVar and C_CVar.GetCVar then
local current = C_CVar.GetCVar("enableMouseoverCast")
if current == "0" or current == "1" then enabled = current == "1" end
end
RuenUICharacter.mouseoverMode = enabled and "on" or "off"
end
RuenUICharacter.profileVersion = 1
end
function P.NumberProfile()
local preference = RuenUICharacter and RuenUICharacter.numberProfile
if preference == "pet" or preference == "utility" then return preference end
local _, class = UnitClass("player")
return petClasses[class] and "pet" or "utility"
end
function P.CharacterRole()
local role = RuenUICharacter and RuenUICharacter.rolePreference
if role == "HEALER" or role == "TANK" or role == "DAMAGER" then return role end
role = nil
if GetSpecialization and GetSpecializationRole then
local spec = GetSpecialization()
if spec then role = GetSpecializationRole(spec) end
end
if not role or role == "NONE" then role = UnitGroupRolesAssigned and UnitGroupRolesAssigned("player") end
if role == "HEALER" or role == "TANK" or role == "DAMAGER" then return role end
return "UNKNOWN" -- never infer a healing input scheme from class or form
end
local petSeen = {}
function P.NeedsPetRow()
local _, class = UnitClass("player")
if petClasses[class] or P.NumberProfile() == "pet" then return true end
local identity = (UnitGUID and UnitGUID("player")) or class
local spec = GetSpecialization and GetSpecialization() or 0
local key = tostring(identity)..":"..tostring(spec)
local shown = PetActionBar and PetActionBar:IsShown()
if shown and UnitExists and UnitExists("pet") then petSeen[key] = true end
-- Keep the acquired row stable through dismissal/death this session. A
-- petless Mage does not reserve it merely because of its class name.
return shown or petSeen[key] or false
end
function P.EffectiveBindingKey(action)
for _, key in ipairs(effective[action] or {}) do
if GetBindingAction(key, true) == action then return key end
end
for _, key in ipairs({GetBindingKey(action)}) do
if GetBindingAction(key, true) == action then return key end
end
end
local function label(button, action)
if not button or not button.HotKey then return end
local key = P.EffectiveBindingKey(action)
button.HotKey:SetText(key and GetBindingText(key, true) or "")
if key then button.HotKey:Show() else button.HotKey:Hide() end
end
function P.RefreshProfileHotkeys()
for i = 1, 12 do
local entries = {{_G["MultiBarLeftButton"..i], "MULTIACTIONBAR4BUTTON"..i, "UpdateHotkeys"}}
if i <= 10 then entries[#entries+1] = {_G["PetActionButton"..i], "BONUSACTIONBUTTON"..i, "SetHotkeys"}
else entries[#entries+1] = {_G["RuenPetExtraButton"..i], "CLICK RuenPetExtraButton"..i..":LeftButton"} end
for _, entry in ipairs(entries) do
local button, action, method = unpack(entry)
if button and not hooked[button] and method and type(button[method]) == "function" then
hooksecurefunc(button, method, function() label(button, action) end)
hooked[button] = true
end
label(button, action)
end
end
end
function P.ClearCharacterBindings()
if InCombatLockdown() then return false end
if owner then
UnregisterStateDriver(owner, "ruencontrols")
owner:SetAttribute("bindingCount", 0)
owner:Execute(bindingSnippet)
end
effective, signature = {}, nil
P.RefreshProfileHotkeys()
return true
end
function P.ApplyCharacterBindings(force)
if InCombatLockdown() then return false end
if not RuenUICharacter or not RuenUIDB then return false end
if RuenUIDB.disabled then return P.ClearCharacterBindings() end
P.EnsureCharacterProfile()
if not RegisterStateDriver or not UnregisterStateDriver then
RuenUICharacter.numberProfileStatus = "secure binding support unavailable"
return false
end
if not owner then
owner = CreateFrame("Frame", "RuenCharacterBindings", UIParent, "SecureHandlerStateTemplate")
owner:SetAttribute("_onstate-ruencontrols", bindingSnippet)
owner:HookScript("OnAttributeChanged", function(_, key)
if key == "state-ruencontrols" then P.RefreshProfileHotkeys() end
end)
end
local records = RuenUICharacter.numberBindingBases or {}
RuenUICharacter.numberBindingBases = records
local scope = GetCurrentBindingSet() == 1 and RuenUIDB or RuenUICharacter
local profile, wanted, parts, conflicts = P.NumberProfile(), {}, {}, {}
effective = {}
for i, number in ipairs(numbers) do
local pet = i <= 10 and "BONUSACTIONBUTTON"..i or "CLICK RuenPetExtraButton"..i..":LeftButton"
local utility = "MULTIACTIONBAR4BUTTON"..i
for _, entry in ipairs({{number, profile == "pet" and pet or utility, pet},
{"CTRL-"..number, profile == "pet" and utility or pet, utility}}) do
local key, action, oldDefault = unpack(entry)
local base = GetBindingAction(key) or ""
local record = records[key]
local change = RuenUICharacter.bindingChanges and RuenUICharacter.bindingChanges[key]
if not record or force then
record = {base=base, managed=force or base == "" or
(change and change.applied == base) or (scope.petBindingsVersion == 2 and base == oldDefault) or false}
records[key] = record
elseif record.base ~= base then
record.base, record.managed = base, false -- later user edits win
end
if record.managed then
wanted[#wanted+1] = {key, action}
parts[#parts+1] = key.."="..action
effective[action] = effective[action] or {}
effective[action][#effective[action]+1] = key
else conflicts[#conflicts+1] = key end
end
end
local nextSignature = table.concat(parts, ";")
if signature ~= nextSignature then
owner:SetAttribute("bindingCount", #wanted)
for i, entry in ipairs(wanted) do
owner:SetAttribute("key"..i, entry[1]); owner:SetAttribute("action"..i, entry[2])
end
RegisterStateDriver(owner, "ruencontrols", conditions)
owner:Execute(bindingSnippet)
signature = nextSignature
end
RuenUICharacter.numberProfileStatus = profile
RuenUICharacter.numberBindingConflicts = conflicts
P.RefreshProfileHotkeys()
return true
end
function P.CharacterProfileSummary()
return P.Localized("Numbers: ", "Цифры: ")..P.NumberProfile()
..P.Localized("; role: ", "; роль: ")..P.CharacterRole()
..P.Localized("; custom keys preserved: ", "; сохранены свои клавиши: ")
..table.concat(RuenUICharacter.numberBindingConflicts or {}, ", ")
end
function P.CharacterProfileCommand(command, argument)
P.EnsureCharacterProfile()
if command == "keys" and (argument == "auto" or argument == "pet" or argument == "utility") then
RuenUICharacter.numberProfile = argument
elseif command == "role" then
local roles = {auto="auto", healer="HEALER", tank="TANK", damage="DAMAGER"}
if roles[argument] then
RuenUICharacter.rolePreference = roles[argument]
RuenUICharacter.mouseoverMode = "auto"
P.mouseoverPending = true
end
end
P.ApplyCharacterBindings(false)
if P.ApplyMouseover then P.ApplyMouseover() end
if P.RefreshClassAssist then P.RefreshClassAssist() end
return P.CharacterProfileSummary()..P.Localized(
". /ruen keys auto|pet|utility; /ruen role auto|healer|tank|damage. Changes wait until combat ends.",
". /ruen keys auto|pet|utility; /ruen role auto|healer|tank|damage. Изменения применяются после боя.")
end
function P.InitializeCharacterProfiles()
P.EnsureCharacterProfile()
if listener then return end
listener = CreateFrame("Frame")
for _, event in ipairs({"UPDATE_BINDINGS", "PLAYER_REGEN_ENABLED", "PLAYER_ENTERING_WORLD",
"PLAYER_SPECIALIZATION_CHANGED", "GROUP_ROSTER_UPDATE", "PLAYER_ROLES_ASSIGNED"}) do
pcall(listener.RegisterEvent, listener, event)
end
listener:SetScript("OnEvent", function()
if queued then return end
queued = true
C_Timer.After(.1, function()
queued = false
if RuenUIDB.disabled then P.ClearCharacterBindings(); return end
P.ApplyCharacterBindings(false)
if P.ApplyMouseover then P.ApplyMouseover() end
end)
end)
end

View File

@ -4,7 +4,6 @@ local _, P = ...
-- categories. Ruen only supplies presentation and a class-aware input default.
-- Do not write C_CooldownViewer layout data or replace its secure aura handlers.
local names = {"EssentialCooldownViewer", "UtilityCooldownViewer", "BuffIconCooldownViewer", "BuffBarCooldownViewer"}
local healers = {PRIEST=true, DRUID=true, PALADIN=true, SHAMAN=true}
local owns, place, edge, put, queue
local busy, queued, hooked = false, false, {}
local appliedContext
@ -17,7 +16,7 @@ local function settingsOpen()
end
local function mode()
return RuenUIDB.cooldownsMode or "auto"
return RuenUICharacter.cooldownsMode or RuenUIDB.cooldownsMode or "auto"
end
local function set(system, key, value)
@ -152,12 +151,13 @@ function P.ApplyMouseover(force)
end
local _, class = UnitClass("player")
local preference = RuenUICharacter.mouseoverMode or "auto"
local enabled = preference == "on" or (preference == "auto" and healers[class]) or false
local role = P.CharacterRole()
local enabled = preference == "on" or (preference == "auto" and role == "HEALER") or false
local value = enabled and "1" or "0"
local previous = RuenUICharacter.mouseoverApplied
local current, modifier = C_CVar.GetCVar("enableMouseoverCast"), GetModifiedClick("MOUSEOVERCAST")
local character = (UnitGUID and UnitGUID("player")) or (UnitName("player") .. ":" .. class)
if not force and previous and previous.class == class and previous.mode == preference
if not force and previous and previous.class == class and previous.mode == preference and previous.role == role
and RuenUIDB.mouseoverLastCharacter == character then
-- A deliberate later change in Options is respected, even after reload.
RuenUICharacter.mouseoverStatus = current == "1" and "on" or "off"
@ -176,7 +176,7 @@ function P.ApplyMouseover(force)
Settings.SetValue("MOUSEOVERCAST", old)
else SetModifiedClick("MOUSEOVERCAST", old) end
end
RuenUICharacter.mouseoverApplied = {class=class, mode=preference, enabled=enabled}
RuenUICharacter.mouseoverApplied = {class=class, role=role, mode=preference, enabled=enabled}
RuenUIDB.mouseoverLastCharacter = character
P.mouseoverPending = nil
RuenUICharacter.mouseoverStatus = enabled and "on" or "off"
@ -296,7 +296,7 @@ function P.ClassAssistCommand(command, argument)
if argument == "settings" and CooldownViewerSettings and not InCombatLockdown() then
CooldownViewerSettings:ShowUIPanel()
elseif argument == "auto" or argument == "show" or argument == "off" then
RuenUIDB.cooldownsMode = argument
RuenUICharacter.cooldownsMode = argument
P.RefreshClassAssist()
end
return P.Localized("Cooldowns: ","Перезарядки: ") .. mode() .. P.Localized(

View File

@ -2,7 +2,7 @@ local _, P = ...
-- Separate from profile/version migrations: never reset spells, bindings,
-- graphics, language or the user's ordinary action-bar assignments.
P.classLayoutVersion = 7
P.classLayoutVersion = 8
P.petIconSize = 8 -- native 130%: pet icons now nearly match the combat buttons
P.classFrameNames = {
"PartyFrame", "CompactRaidFrameContainer",
@ -37,8 +37,7 @@ local function makePlan(base)
end
local function shown(name) return _G[name] and _G[name]:IsShown() end
local hasForms = GetNumShapeshiftForms and GetNumShapeshiftForms() > 0
local petClass = class == "HUNTER" or class == "WARLOCK" or class == "MAGE"
local petActive = petClass or shown("PetActionBar")
local petActive = P.NeedsPetRow()
-- Use six units of the twelve-unit clearance above the combat rows for
-- the larger pet icons, keeping the cast/unit HUD at its compact height.
if petActive then base = base - 6 end

View File

@ -105,6 +105,8 @@ end
function P.Help()
say(P.BarHelp())
say(P.Localized("/ruen role auto|healer|tank|damage: mouseover default follows the selected role. /ruen mouseover on|off overrides it. Cooldown and meter modes are per character.",
"/ruen role auto|healer|tank|damage: наведение зависит от выбранной роли. /ruen mouseover on|off задаёт свой режим. Перезарядки и счётчики настраиваются для каждого персонажа."))
say(P.Localized("/ruen guns on|off|settings|status; /ruen guns 100: softer gunshots, volume 10–100. Nearby stock gunshots are muted while enabled.",
"/ruen guns on|off|settings|status; /ruen guns 100: тихие выстрелы, громкость 10–100. Стандартные выстрелы окружающих при включении заглушаются."))
say(P.Localized("/ruen cooldowns auto|show|hide|off|settings|status: class-aware timers. /ruen mouseover auto|on|off: per-character casting preference.",

View File

@ -8,6 +8,7 @@ local function init()
RuenUIDB.reports = RuenUIDB.reports or {}
RuenUICharacter = RuenUICharacter or {original = {}}
RuenUICharacter.original = RuenUICharacter.original or {}
P.EnsureCharacterProfile()
end
-- Merge the narration profile once, preserving unrelated settings and live AceDB references.
local function mergePreferences(target, values)
@ -174,8 +175,14 @@ local function setupThirdTarget()
RegisterUnitWatch(f)
end
local function applyCombatBindings()
local function applyCombatBindings(force)
if InCombatLockdown() then error("leave combat before applying bindings") end
local scope = GetCurrentBindingSet() == 1 and RuenUIDB or RuenUICharacter
if not force and (scope.combatBindingsVersion == 2 or (GetCurrentBindingSet() == 2 and scope.bindingsVersion == 2)) then
RuenUICharacter.bindingsVersion = 2
P.ApplyUtilityBindings(false)
return false
end
RuenUICharacter.bindingChanges = RuenUICharacter.bindingChanges or {}
local changes = RuenUICharacter.bindingChanges
local function bind(key, action)
@ -224,7 +231,9 @@ local function applyCombatBindings()
bind("CTRL-I", "SITORSTAND"); bind("SHIFT-I", "TOGGLESHEATH")
SaveBindings(GetCurrentBindingSet())
RuenUICharacter.bindingsVersion = 2
scope.combatBindingsVersion = 2
P.ApplyUtilityBindings(true)
return true
end
local function restoreCombatBindings()
@ -308,7 +317,8 @@ local function fitChat()
local left=frameEdge(chat,"GetLeft") or 20
local right=frameEdge(MainActionBar,"GetLeft")
if not right then return end
local width=math.min(chatBaseWidth,math.max(240,(right-left-16)/uiRatio(chat)))
local policy=P.layoutPolicy.chat
local width=math.min(chatBaseWidth,math.max(policy.minimumWidth,(right-left-policy.edgeGap)/uiRatio(chat)))
if math.abs(current-width)>.5 then chat:SetWidth(width) end
chatAppliedWidth=width
end
@ -396,13 +406,10 @@ local function queueCombinedBags()
end)
end
local function refreshUILayout()
P.RefreshPetExtras()
function P.ReconcileControlGeometry()
if not ownsLayout() or InCombatLockdown() or EditModeManagerFrame:IsShown() then return end
P.MigrateExtraBars()
P.MigrateClassLayout()
placeRelative(MultiBarBottomLeft, "BOTTOMLEFT", MainActionBar, "TOPLEFT", 0, 4)
placeRelative(MultiBarBottomRight, "BOTTOMLEFT", MultiBarBottomLeft, "TOPLEFT", 0, 4)
placeRelative(MultiBarBottomLeft, "BOTTOMLEFT", MainActionBar, "TOPLEFT", 0, P.layoutPolicy.actionRowGap)
placeRelative(MultiBarBottomRight, "BOTTOMLEFT", MultiBarBottomLeft, "TOPLEFT", 0, P.layoutPolicy.actionRowGap)
alignCornerWidths()
placeRelative(BagsBar, "BOTTOMRIGHT", MicroMenuContainer, "TOPRIGHT", 0, 10)
placeRelative(MultiBarLeft, "BOTTOMRIGHT", BagsBar, "TOPRIGHT", 0, 14)
@ -414,6 +421,14 @@ local function refreshUILayout()
placeRelative(ObjectiveTrackerFrame, "TOPRIGHT", MinimapCluster, "BOTTOMRIGHT", 0, -24)
fitTracker()
P.PositionGroupFrames(placeRelative, frameEdge)
end
local function refreshUILayout()
P.RefreshPetExtras()
if not ownsLayout() or InCombatLockdown() or EditModeManagerFrame:IsShown() then return end
P.MigrateExtraBars()
P.MigrateClassLayout()
P.ReconcileControlGeometry()
P.RefreshClassAssist()
P.RefreshDamageMeters()
queueCombinedBags()
@ -728,10 +743,11 @@ local function configureLayout()
changeSetting(system, Enum.EditModeMinimapSetting.Size, 4) -- 90%
anchor(system, "TOPRIGHT", "TOPRIGHT", -22, -40)
elseif system.system == E.ChatFrame then
changeSetting(system, Enum.EditModeChatFrameSetting.WidthHundreds, 3)
changeSetting(system, Enum.EditModeChatFrameSetting.WidthTensAndOnes, 80)
changeSetting(system, Enum.EditModeChatFrameSetting.HeightHundreds, 1)
changeSetting(system, Enum.EditModeChatFrameSetting.HeightTensAndOnes, 50)
local chat=P.layoutPolicy.chat
changeSetting(system, Enum.EditModeChatFrameSetting.WidthHundreds, math.floor(chat.width/100))
changeSetting(system, Enum.EditModeChatFrameSetting.WidthTensAndOnes, chat.width%100)
changeSetting(system, Enum.EditModeChatFrameSetting.HeightHundreds, math.floor(chat.height/100))
changeSetting(system, Enum.EditModeChatFrameSetting.HeightTensAndOnes, chat.height%100)
anchor(system, "BOTTOMLEFT", "BOTTOMLEFT", 20, 45)
end
end
@ -813,6 +829,13 @@ local function recordLayoutStatus(announce)
end
end
status.classLayoutVersion = RuenUIDB.classLayoutVersion
status.characterProfile = {numbers=P.NumberProfile(), role=P.CharacterRole(),
bindings=RuenUICharacter.numberProfileStatus, customKeys=CopyTable(RuenUICharacter.numberBindingConflicts or {})}
status.petExtras = {nativeSlots=10, extensionSlots=2, errors={}}
for i, entry in pairs((RuenUICharacter.petExtraStatus or {}).abilities or {}) do
if entry.error then status.petExtras.errors[i]=entry.error;status.verified=false end
end
if RuenUICharacter.numberProfileStatus == "secure binding support unavailable" then status.verified=false end
status.intentionalOverlaps={}
if P.bagOverHUD and ContainerFrameCombinedBags and ContainerFrameCombinedBags:IsShown() then status.intentionalOverlaps[#status.intentionalOverlaps+1]="Oversized inventory temporarily covers HUD information; action/chat/quest controls remain clear" end
if P.tooltipOverInventory then status.intentionalOverlaps[#status.intentionalOverlaps+1]="Comparison tooltips over other inventory slots (hovered item kept clear)" end
@ -823,7 +846,7 @@ local function recordLayoutStatus(announce)
for alert in pairs(P.overlayOverOptional or {}) do status.intentionalOverlaps[#status.intentionalOverlaps+1]=(alert:GetName() or "Alert").." temporarily over optional cooldown/meter area in a crowded layout" end
status.attachments=P.AttachedHUDRegions()
status.classFrames = {}
local combatNames = {"MainActionBar", "MultiBarBottomLeft", "MultiBarBottomRight", "MultiBar5", "MultiBarLeft", "MultiBarRight", "MultiBar6", "MultiBar7", "BagsBar", "MicroMenuContainer"}
local combatNames = P.controlFrameNames
for _, name in ipairs(P.classFrameNames) do
local f = _G[name]
if f then
@ -863,12 +886,15 @@ local function recordLayoutStatus(announce)
end
RuenUICharacter.verification = status
if announce then
say("Ruen UI "..P.release.."; UI "..math.floor(status.uiWidth).." x "..math.floor(status.uiHeight)..". Cooldowns: "..(RuenUIDB.cooldownsMode or "auto")..".")
say("Ruen UI "..P.release.."; UI "..math.floor(status.uiWidth).." x "..math.floor(status.uiHeight)..". Cooldowns: "..(RuenUICharacter.cooldownsMode or RuenUIDB.cooldownsMode or "auto")..".")
for _,note in ipairs(status.intentionalOverlaps) do say(note) end
if status.verified then
say("ESDF ready: Q W R T / A G H / Z X C V B. Rows bottom to top: base, Shift, Ctrl, Alt. Utility bars are above bags and chat. /ruen bars lists shortcuts; /ruen lock or unlock controls dragging.")
else
say("Layout needs a spacing check: " .. table.concat(status.overlaps, ", ") .. ". /ruen status checks again.")
local issues=CopyTable(status.overlaps)
for i,err in pairs(status.petExtras.errors) do issues[#issues+1]="Pet extra "..i..": "..err end
if status.characterProfile.bindings=="secure binding support unavailable" then issues[#issues+1]=status.characterProfile.bindings end
say(P.Localized("Ruen needs attention: ","Ruen требует проверки: ")..table.concat(issues, ", ")..". /ruen status")
end
end
end
@ -882,7 +908,7 @@ local function mask(key, enum, names)
end
put(key, value)
end
local function apply()
local function apply(forceBindings)
if InCombatLockdown() then say("Wait until combat ends, then /ruen apply."); return end
P.InitializeGunAudio()
RuenUIDB.results = RuenUIDB.results or {}
@ -908,8 +934,8 @@ local function apply()
-- Retain existing extra bars and refresh Blizzard's cached visibility settings.
setBarVisibility(bars)
setupThirdTarget()
applyCombatBindings()
P.ApplyExtraBindings(true)
local changedBindings = applyCombatBindings(forceBindings)
P.ApplyExtraBindings(forceBindings or changedBindings)
local ok, err = pcall(configureLayout)
RuenUICharacter.layoutStatus = ok and "saved" or tostring(err)
if not ok then say("Bars enabled; layout needs attention: " .. tostring(err)); return end
@ -924,6 +950,8 @@ local function apply()
end
local function restore()
if InCombatLockdown() then say("Leave combat before restoring."); return end
P.ClearCharacterBindings()
P.RestoreChatDefaults()
if RuenUIDB.optimizer then P.OptimizerCommand("restore") end
P.StopGunAudio()
P.StopSwingTimers()
@ -992,6 +1020,7 @@ SlashCmdList.RUENUI = function(message)
if message == "unlock" or message == "lock" then
setSlotsLocked(message == "lock"); return
elseif message == "bars" then say(P.BarHelp()); return
elseif command == "keys" or command == "role" then say(P.CharacterProfileCommand(command,argument)); return
elseif command == "cooldowns" or command == "mouseover" then say(P.ClassAssistCommand(command,argument)); return
elseif command == "guns" then
local reply = P.GunAudioCommand(argument)
@ -1021,10 +1050,10 @@ SlashCmdList.RUENUI = function(message)
else queueCombinedBags() end
return
end
if message == "apply" then RuenUIDB.disabled = nil; apply()
if message == "apply" then RuenUIDB.disabled = nil; apply(true)
elseif message == "restore" then restore()
elseif message == "bench" then bench()
elseif message == "status" then recordLayoutStatus(true)
elseif message == "status" then recordLayoutStatus(true); say(P.CharacterProfileSummary())
elseif message == "balanced" or message == "performance" then
if InCombatLockdown() then say("Leave combat before changing graphics."); return end
P.StopOptimizer()
@ -1053,6 +1082,8 @@ local function setupAfterLogin()
if RuenUIDB.disabled then return end
local ok, err = pcall(function()
P.MigrateBrand()
P.InitializeCharacterProfiles()
P.ApplyChatDefaults()
setupThirdTarget()
P.InitializeSwingTimers(function()
return ownsLayout() and not EditModeManagerFrame:IsShown()

View File

@ -10,7 +10,7 @@ local function editing()
end
local function mode()
return RuenUIDB and RuenUIDB.damageMeterMode or "auto"
return (RuenUICharacter and RuenUICharacter.damageMeterMode) or (RuenUIDB and RuenUIDB.damageMeterMode) or "auto"
end
function P.WantsDamageMeters()
@ -164,7 +164,7 @@ end
function P.DamageMeterCommand(argument)
if argument == "auto" or argument == "show" or argument == "off" then
RuenUIDB.damageMeterMode = argument
RuenUICharacter.damageMeterMode = argument
P.RefreshDamageMeters()
end
return P.Localized("Damage meter: ", "Счётчик урона: ") .. mode() .. P.Localized(

View File

@ -161,31 +161,10 @@ end
function P.ApplyPetBindings(force)
if InCombatLockdown() or RuenUIDB.disabled then return end
local scope=GetCurrentBindingSet()==1 and RuenUIDB or RuenUICharacter
if scope.petBindingsVersion==2 and not force then return end
local changes=RuenUICharacter.bindingChanges or {}
RuenUICharacter.bindingChanges=changes
local function bind(key,action)
local old=GetBindingAction(key)
if old==(action or "") then return end
if not SetBinding(key,action) then error("Could not bind "..key) end
changes[key]=changes[key] or {before=old}
changes[key].applied=action or ""
end
-- Migrate only these keys, once per binding set. Leave the other action
-- rows, personal shortcuts and every spell/item slot exactly where they are.
-- Keep the mapping identical with no pet, a temporary pet, or another class.
-- Existing 1-0 / Ctrl-number customizations survive this two-key upgrade.
if force or scope.petBindingsVersion~=1 then
for i,key in ipairs(numbers) do
bind("CTRL-"..key,"MULTIACTIONBAR4BUTTON"..i)
if i<=10 then bind(key,"BONUSACTIONBUTTON"..i) end
end
end
bind("-","CLICK RuenPetExtraButton11:LeftButton")
bind("=","CLICK RuenPetExtraButton12:LeftButton")
SaveBindings(GetCurrentBindingSet())
scope.petBindingsVersion=2
P.ApplyCharacterBindings(force)
-- The caller may also have changed ordinary row bindings. Profile bindings
-- themselves are session-local and never written into the account set.
if force then SaveBindings(GetCurrentBindingSet()) end
end
function P.ApplyExtraBindings(force)
@ -235,14 +214,14 @@ function P.UtilityTop()
end
function P.PositionExtraBars(place,edge)
place(MultiBarRight,"BOTTOMRIGHT",MultiBarLeft,"TOPRIGHT",0,6)
place(MultiBar5,"BOTTOMLEFT",MultiBarBottomRight,"TOPLEFT",0,4)
place(MultiBarRight,"BOTTOMRIGHT",MultiBarLeft,"TOPRIGHT",0,P.layoutPolicy.utilityRowGap)
place(MultiBar5,"BOTTOMLEFT",MultiBarBottomRight,"TOPLEFT",0,P.layoutPolicy.actionRowGap)
end
function P.PositionLeftBars(place,edge)
local x,y=leftDock(edge)
place(MultiBar6,"BOTTOMLEFT",UIParent,"BOTTOMLEFT",x,y)
place(MultiBar7,"BOTTOMLEFT",MultiBar6,"TOPLEFT",0,6)
place(MultiBar7,"BOTTOMLEFT",MultiBar6,"TOPLEFT",0,P.layoutPolicy.utilityRowGap)
end
local groupScales={}
@ -304,6 +283,10 @@ function P.PositionGroupFrames(place,edge)
end
function P.BarHelp()
return P.Localized("96 slots: 48 ESDF combat (base/Shift/Ctrl/Alt); right utility bottom to top: Ctrl+1–=, Shift+1–=; left: Alt+1–=, Ctrl+Shift+1–=. 1–= controls pets (last two auto-fill missing abilities). /ruen lock | unlock. Customize in Esc > Key Bindings.",
"96 ячеек: 48 боевых ESDF (без модификатора/Shift/Ctrl/Alt); справа снизу вверх: Ctrl+1–=, Shift+1–=; слева: Alt+1–=, Ctrl+Shift+1–=. 1–= — питомец (две последние кнопки — недостающие способности). /ruen lock | unlock. Настройка: Esc > Назначение клавиш.")
local pet = P.NumberProfile() == "pet"
local mapping = pet and P.Localized("1–= pets; Ctrl+1–= right utility.", "1–= — питомец; Ctrl+1–= — нижняя правая панель.")
or P.Localized("1–= right utility; Ctrl+1–= pets.", "1–= — нижняя правая панель; Ctrl+1–= — питомец.")
return P.Localized("96 slots: 48 ESDF combat (base/Shift/Ctrl/Alt). ", "96 ячеек: 48 боевых ESDF (без модификатора/Shift/Ctrl/Alt). ")
..mapping..P.Localized(" Upper right: Shift+numbers; left: Alt+numbers, Ctrl+Shift+numbers. /ruen keys auto|pet|utility; /ruen lock | unlock. Custom bindings are preserved.",
" Верхняя правая: Shift+цифры; слева: Alt+цифры, Ctrl+Shift+цифры. /ruen keys auto|pet|utility; /ruen lock | unlock. Свои назначения сохраняются.")
end

43
RuenUI/LayoutPolicy.lua Normal file
View File

@ -0,0 +1,43 @@
local _, P = ...
-- Shared reservations used by placement AND diagnostics. Hidden/empty buttons
-- still occupy their block, so overlays cannot land in a temporarily blank slot.
P.layoutPolicy = {
gap = 12, actionRowGap = 4, utilityRowGap = 6,
chat = {width = 380, height = 150, minimumWidth = 240, fontSize = 14, edgeGap = 16},
controls = {
{name="Center controls", "MainActionBar","MultiBarBottomLeft","MultiBarBottomRight","MultiBar5"},
{name="Right controls", "MultiBarLeft","MultiBarRight","BagsBar","MicroMenuContainer"},
{name="Left controls", "MultiBar6","MultiBar7"},
},
panels = {"BankFrame","GuildBankFrame","MerchantFrame","QuestFrame","GossipFrame","MailFrame","TradeFrame",
"ProfessionsFrame","TradeSkillFrame","PlayerSpellsFrame","SpellBookFrame","WorldMapFrame","QuestLogFrame",
"CharacterFrame","AuctionHouseFrame"},
}
P.controlFrameNames, P.controlFrameSet = {}, {}
for _, group in ipairs(P.layoutPolicy.controls) do
for _, name in ipairs(group) do
P.controlFrameNames[#P.controlFrameNames+1] = name
P.controlFrameSet[name] = true
end
end
function P.ApplyChatDefaults()
-- Fresh installs only. Do not overwrite an existing player's font choice.
if RuenUICharacter.chatDefaultsVersion or RuenUICharacter.version then return end
if ChatFrame1 and ChatFrame1.GetFont and FCF_SetChatWindowFontSize then
local font,size,flags=ChatFrame1:GetFont()
RuenUICharacter.chatFontOriginal={font=font,size=size,flags=flags}
FCF_SetChatWindowFontSize(nil,ChatFrame1,P.layoutPolicy.chat.fontSize)
end
RuenUICharacter.chatDefaultsVersion=1
end
function P.RestoreChatDefaults()
local old=RuenUICharacter.chatFontOriginal
if not old or not ChatFrame1 or not ChatFrame1.GetFont then return end
local font,size=ChatFrame1:GetFont()
if font==old.font and size==P.layoutPolicy.chat.fontSize and FCF_SetChatWindowFontSize then
FCF_SetChatWindowFontSize(nil,ChatFrame1,old.size)
end
end

View File

@ -3,13 +3,13 @@ local _, P = ...
-- Notification space is reserved even when no toast is visible. Protected bars
-- never chase a popup during combat. Blizzard still owns every alert's content,
-- lifecycle, queue, click handler and bank transaction.
local gap = 12
local gap = P.layoutPolicy.gap
local hudNames = {
"MainActionBar", "MultiBarBottomLeft", "MultiBarBottomRight", "MultiBar5",
"MultiBarLeft", "MultiBarRight", "MultiBar6", "MultiBar7", "BagsBar", "MicroMenuContainer",
"DamageMeter",
"BuffFrame", "DebuffFrame", "MirrorTimer1", "MirrorTimer2", "MirrorTimer3",
"ChatFrame1", "MinimapCluster", "ObjectiveTrackerFrame", "PartyFrame", "CompactRaidFrameContainer",
"ChatFrame1", "ChatFrame1EditBox", "ChatFrame1Tab", "MinimapCluster", "ObjectiveTrackerFrame", "PartyFrame", "CompactRaidFrameContainer",
"PlayerFrame", "PetFrame", "TargetFrame", "TargetFrameToT", "RuenTargetTargetTarget", "FocusFrame",
"StanceBar", "PetActionBar", "MultiCastActionBarFrame", "PossessActionBar",
"MainMenuBarVehicleLeaveButton", "PlayerCastingBarFrame", "RuenSwingTimers", "ExtraAbilityContainer",
@ -17,10 +17,8 @@ local hudNames = {
"UIWidgetTopCenterContainerFrame", "UIWidgetBelowMinimapContainerFrame", "UIWidgetPowerBarContainerFrame",
"PlayerPowerBarAlt", "TotemFrame", "ClassNameplateBarRogueFrame", "ClassNameplateBarDruidFrame",
}
local blockMembers = {}
for _,name in ipairs({"MainActionBar","MultiBarBottomLeft","MultiBarBottomRight","MultiBar5",
"MultiBarLeft","MultiBarRight","MultiBar6","MultiBar7","BagsBar","MicroMenuContainer"}) do blockMembers[name]=true end
local panels = {"BankFrame", "GuildBankFrame", "MerchantFrame", "QuestFrame", "GossipFrame", "MailFrame", "TradeFrame"}
local blockMembers = P.controlFrameSet
local panels = P.layoutPolicy.panels
local hooked, queued, placing = {}, false, false
local place, edge, enabled, schedule
local alertHooks={}
@ -130,11 +128,7 @@ end
-- of individual buttons must never create a landing space for a bag or tooltip.
function P.ControlRegions()
local result={}
for _,group in ipairs({
{name="Center controls", "MainActionBar","MultiBarBottomLeft","MultiBarBottomRight","MultiBar5"},
{name="Right controls", "MultiBarLeft","MultiBarRight","BagsBar","MicroMenuContainer"},
{name="Left controls", "MultiBar6","MultiBar7"},
}) do
for _,group in ipairs(P.layoutPolicy.controls) do
local region
for _,name in ipairs(group) do
local r=rect(_G[name],true)
@ -516,7 +510,7 @@ function P.InitializeOverlayLayout(placeFrame,frameEdge,owns)
end
schedule=queue
local function watch()
for _,name in ipairs({"AlertFrame","GroupLootContainer","TalkingHeadFrame"}) do
for _,name in ipairs({"AlertFrame","GroupLootContainer","TalkingHeadFrame","ChatFrame1EditBox","ChatFrame1Tab"}) do
local f=_G[name]
if f and not hooked[f] then
hooked[f]=true

View File

@ -168,13 +168,14 @@ end
local function visuals(button)
local item = button.item
button:SetChecked(false)
if not item then
P.SetActionButtonSelected(button, false)
button.AutoCastOverlay:Hide()
button.cooldown:Clear()
return
end
if not button.actionSlot then
P.SetActionButtonSelected(button, false)
button.icon:SetVertexColor(.4,.4,.4)
button.AutoCastOverlay:Hide();button.cooldown:Clear()
return
@ -183,6 +184,7 @@ local function visuals(button)
-- through a stale slot; secure attributes are rebuilt after combat ends.
local info = C_SpellBook.GetSpellBookItemInfo(item.slot, bank)
if not info or (info.spellID or info.actionID) ~= item.id then
P.SetActionButtonSelected(button, false)
button.icon:SetVertexColor(.4, .4, .4)
button.AutoCastOverlay:Hide()
button.cooldown:Clear()
@ -190,12 +192,13 @@ local function visuals(button)
end
if item.command then
button.icon:SetVertexColor(1,1,1)
if C_ActionBar and C_ActionBar.IsCurrentAction then
button:SetChecked(C_ActionBar.IsCurrentAction(button.actionSlot))
end
local selected = false
if C_ActionBar and C_ActionBar.IsCurrentAction then selected = C_ActionBar.IsCurrentAction(button.actionSlot) end
P.SetActionButtonSelected(button, selected, item.command == "/petattack")
button.AutoCastOverlay:Hide();button.cooldown:Clear()
return
end
P.SetActionButtonSelected(button, false)
local usable = C_SpellBook.IsSpellBookItemUsable(item.slot, bank)
local inRange = C_SpellBook.IsSpellBookItemInRange(item.slot, bank, "target")
if inRange == false then button.icon:SetVertexColor(1, .25, .25)
@ -219,7 +222,9 @@ end
local function hotkeys()
for _, button in ipairs(buttons or {}) do
local key = GetBindingKey("CLICK " .. button:GetName() .. ":LeftButton")
local binding = "CLICK " .. button:GetName() .. ":LeftButton"
local key
if P.EffectiveBindingKey then key = P.EffectiveBindingKey(binding) else key = GetBindingKey(binding) end
button.HotKey:SetText(key and GetBindingText(key, true) or "")
end
end
@ -229,26 +234,6 @@ local function updateVisuals(self,dt)
if self.visualElapsed>=.2 then self.visualElapsed=0;visuals(self) end
end
local function copyArt(button, prototype, kind)
local getter=prototype["Get" .. kind .. "Texture"]
local setter=button["Set" .. kind .. "Texture"]
local targetGetter=button["Get" .. kind .. "Texture"]
if type(getter)~="function" or type(setter)~="function" or type(targetGetter)~="function" then return end
local source=getter(prototype)
if not source then return end
local atlas = source:GetAtlas()
local atlasSetter=button["Set" .. kind .. "Atlas"]
if atlas and type(atlasSetter)=="function" then atlasSetter(button,atlas)
else setter(button,source:GetTexture()) end
local target=targetGetter(button)
if not target then return end
target:ClearAllPoints()
target:SetPoint("CENTER")
target:SetSize(source:GetWidth() / prototype:GetWidth() * button:GetWidth(),
source:GetHeight() / prototype:GetHeight() * button:GetHeight())
target:SetTexCoord(source:GetTexCoord())
end
function P.RefreshPetExtras()
if not buttons or InCombatLockdown() then return end
if P.RecoverLegacyPetActions and not P.RecoverLegacyPetActions() then return end
@ -300,7 +285,7 @@ function P.RefreshPetExtras()
button:ClearAllPoints()
button:SetPoint("LEFT", previous, "RIGHT", gap * ratio, 0)
previous = button
for _, kind in ipairs({"Normal", "Pushed", "Highlight", "Checked"}) do copyArt(button, PetActionButton1, kind) end
P.StyleActionButton(button, PetActionButton1)
button:SetAttribute("type1", actionSlot and "action" or nil)
button:SetAttribute("action1", actionSlot)
button:SetAttribute("type2", nil) -- right-click is autocast, not a cast
@ -393,9 +378,6 @@ function P.InitializePetExtras(isEnabled)
end
if not down then visuals(self) end
end)
-- Some client button templates have no checked-texture getter.
-- Give our own check button a selected-state texture independently.
button:SetCheckedTexture("Interface\\Buttons\\CheckButtonHilight")
button.icon = button:CreateTexture(nil, "BACKGROUND")
button.icon:SetAllPoints()
button.cooldown = CreateFrame("Cooldown", nil, button, "CooldownFrameTemplate")

View File

@ -1,6 +1,6 @@
local _, P = ...
P.version = 5
P.release = "2026.11.21.5-beta.1"
P.release = "2026.11.21.6-beta.1"
P.graphicsVersion = 2
P.layoutName = "Ruen UI - Clear ESDF"
function P.IsOurLayout(layout)
@ -18,6 +18,10 @@ function P.SaveEditModeLayouts(info)
-- Saving persists the data; explicitly select it to refresh native systems
-- now, rather than showing their previous settings until the next reload.
if info.activeLayout then C_EditMode.SetActiveLayout(info.activeLayout) end
-- A native layout reload restores ALL saved anchors and tracker height,
-- even when the only change was an optional cooldown/meter setting.
-- Reconcile owned control geometry before placing those optional viewers.
if P.ReconcileControlGeometry then P.ReconcileControlGeometry() end
end
-- Values verified against Blizzard's Forever (Camelot) SettingsDefinitions.
-- Quality sliders are zero-based; do not set the master preset afterward.

View File

@ -1,7 +1,7 @@
## Interface: 16001
## Title: Ruen UI
## Notes: ESDF, mouse and menu controls, inventory layout and Spoken language controls. /ruen help
## Version: 2026.11.21.5-beta.1
## Version: 2026.11.21.6-beta.1
## Author: Ruen UI contributors
## SavedVariables: RuenUIDB
## SavedVariablesPerCharacter: RuenUICharacter
@ -12,8 +12,11 @@ Locale.lua
Brand.lua
LanguageDefaults.lua
Controls.lua
CharacterProfiles.lua
LayoutPolicy.lua
GunAudio.lua
ClassLayout.lua
ButtonStyle.lua
PetExtras.lua
SwingTimers.lua
ExtraBars.lua

View File

@ -46,6 +46,17 @@ luajit tests/check-gun-audio.lua /path/to/test-addons
These harnesses simulate engine state and execute selected native methods. They are not a substitute for live rendering or the secure game VM. Review changes against the exact client UI revision rather than making tests pass against a different branch.
The coordinated release runner requires all runtimes and fixtures explicitly, records each suite's exit status, and stops at the first failure:
```sh
python3 scripts/check_release.py --native-ui /path/to/matching-native-fixtures \
--audio-fixtures /path/to/test-addons --pwsh /path/to/pwsh --output /path/to/check-results
```
The two new standalone checks are `luajit tests/check-profiles.lua "$PWD/RuenUI/"` and `luajit tests/check-layout-policy.lua "$PWD/RuenUI/"`. The profile fixture executes the actual restricted binding snippet against a modeled engine, including native-control transitions in combat. It does not emulate the live secure VM or certify binding priority there.
For a pure geometry comparison, preserve the preceding `OverlayLayout.lua` and run `luajit tests/benchmark-layout.lua "$PWD/RuenUI/" /path/to/baseline/OverlayLayout.lua`. This measures only bounded rectangle searches, not live FPS, GPU load or allocations from the complete UI. A live `/ruen bench` comparison needs the same scene/settings and a continuously focused game window.
Build the downloadable installer:
```sh

View File

@ -1,7 +1,7 @@
# Установка Ruen UI — бета
1. Установите **WoW: Forever** через Battle.net и дождитесь окончания загрузки.
2. Откройте [Releases](https://scm.bstein.dev/bstein/ruen-ui/releases) и скачайте **Ruen-UI-2026.11.21.5-beta.1.zip**. Для скачивания регистрация не нужна.
2. Откройте [Releases](https://scm.bstein.dev/bstein/ruen-ui/releases) и скачайте **Ruen-UI-2026.11.21.6-beta.1.zip**. Для скачивания регистрация не нужна.
3. Полностью распакуйте ZIP. Закройте WoW.
4. Для русского варианта запустите **Install-Russian.cmd**. Обычная установка: **Ruen-Setup.exe**. Установщик сам ищет игру; если нужно, укажите папку `_forever_`, в которой находится `Wow.exe`.
5. В Battle.net выберите WoW: Forever → шестерёнка → изменение установки. Установите английские и русские файлы игры. Выберите русский язык текста и речи в настройках **игры**, а не приложения Battle.net. Дождитесь 100% загрузки.
@ -18,6 +18,20 @@
Аддоны и записи скачиваются непосредственно у их авторов. Английский + русский вариант требует примерно **2,26 ГБ загрузок**, а также место для распаковки и резервных копий. Файлы языка самой игры скачиваются отдельно через Battle.net.
Это первая публичная бета: чистая установка и работа на Windows ещё требуют проверки. Программа не меняет видеодрайверы. Исполняемый файл не подписан; его исходный код включён. Не отключайте защиту Windows ради установки.
Это публичная бета: чистая установка и работа на Windows ещё требуют проверки. Программа не меняет видеодрайверы. Исполняемый файл не подписан; его исходный код включён. Не отключайте защиту Windows ради установки.
Инструкции по обновлению, резервным копиям и оптимизации: [INSTALL.md](INSTALL.md). Ошибки: [Issues](https://scm.bstein.dev/bstein/ruen-ui/issues).
## Управление классами и обновление
Обновление сохраняет способности на панелях, свои назначения клавиш, язык и настройки графики. Не запускайте `/ruen apply` для обычного обновления: эта команда намеренно применяет стандартные настройки заново.
- Охотник и чернокнижник: **1–0, -, =** — питомец; **Ctrl + цифры** — нижняя правая дополнительная панель.
- Остальные классы: **цифры** — дополнительная панель, **Ctrl + цифры** — питомец, если он есть. Незаметность, формы и исчезновение питомца не меняют эти клавиши. Управление транспортом и одержимостью временно получает приоритет.
- `/ruen keys auto|pet|utility` — профиль цифровых клавиш для этого персонажа. Свои назначения сохраняются; `/ruen status` показывает исключения.
- `/ruen role auto|healer|tank|damage` — роль для автоматического применения заклинаний по наведению. Режим auto включает его только при достоверной роли лекаря. Если игра не сообщает роль, выберите её командой. `/ruen mouseover on|off` — прямой выбор. При обновлении сохраняется прежний эффективный режим.
- Режимы индикаторов перезарядки и урона теперь отдельные для каждого персонажа. `/ruen cooldowns show|hide|auto`; `/ruen meters auto|show|off`. У нового персонажа индикаторы перезарядки выключены, счётчик урона включается в подземельях и рейдах.
Панель питомца — это **10 стандартных ячеек и 2 расширения** с использованием свободных ячеек второй страницы панели действий. Игра не получает дополнительные стандартные ячейки питомца. Если свободных ячеек нет, Ruen сообщает об этом и не затирает существующие способности.
После обновления проверьте `/ruen status`, цифровые клавиши, смену защитной/пассивной стойки, вызов питомца и сумки при выбранной цели. Для сравнения FPS запустите `/ruen bench` и три минуты играйте, не переключаясь в другое окно: фоновое ограничение FPS иначе исказит результат. Подробные ограничения беты: [RELEASE-REVIEW.md](RELEASE-REVIEW.md).

View File

@ -2,7 +2,7 @@
## Windows
Download the named installer ZIP from [Releases](https://scm.bstein.dev/bstein/ruen-ui/releases), extract it completely, close WoW, and run `Ruen-Setup.exe`. Windows 10/11 x64 with Windows PowerShell 5.1 is the intended target. Native Windows testing is pending for this first beta; PowerShell filesystem tests have run on Linux.
Download the named installer ZIP from [Releases](https://scm.bstein.dev/bstein/ruen-ui/releases), extract it completely, close WoW, and run `Ruen-Setup.exe`. Windows 10/11 x64 with Windows PowerShell 5.1 is the intended target. Native Windows testing is pending for this beta; PowerShell filesystem tests have run on Linux.
The installer checks Program Files, common game folders and Blizzard registry entries. It prompts when discovery is ambiguous. A custom location can always be supplied:
@ -42,6 +42,20 @@ Do not run with sudo. Discovery checks common Wine, Steam compatibility and Game
Close WoW, extract the new release into a fresh folder, and run its installer against the same game. Existing narration files are reused; machine-specific hardware reports and language requests are preserved. A repeat install of identical files does not create another backup. The installer does not erase companion SavedVariables or unrelated addons.
## Class controls after updating
This update keeps existing actions, personal keybindings and saved language/graphics settings. It does not rerun the full preset on every character. Do not use `/ruen apply` just to update: that command deliberately reapplies defaults. Log in normally, or use `/reload` if only the addon files were updated during a running session.
- Hunters and Warlocks: **1–0, -, =** control pets; **Ctrl + numbers** controls the lower right utility bar.
- Other classes: **numbers** control that utility bar; **Ctrl + numbers** controls pets when present. Stealth, forms and pet dismissal do not change this mapping. Native vehicle/possession controls take over temporarily.
- `/ruen keys auto|pet|utility` chooses a character's number-key profile. Existing custom bindings win; `/ruen status` lists keys preserved instead of reassigned. `/ruen bindings` deliberately reapplies Ruen's mouse/menu/utility mappings.
- `/ruen role auto|healer|tank|damage` selects the role used for automatic mouseover casting. Auto enables it only when the native game reports a healing role. If this client does not report a role, choose one explicitly. `/ruen mouseover on|off` remains the direct override. Upgrades preserve the previous effective mouseover choice.
- Cooldown and meter modes are now per character. Existing choices migrate once; fresh characters start with duplicate cooldown viewers off and meters automatic in dungeons/raids. `/ruen cooldowns show|hide|auto` and `/ruen meters auto|show|off` change them.
The pet bar is **ten native pet slots plus two extensions**, backed by spare slots on unused action page 2. It cannot create native pet slots 11 and 12. If the backing page is full, Ruen reports the limitation and preserves the existing actions. The two extensions use the same selected-state artwork as native buttons; the game determines which stance is active.
Before relying on new bindings in combat, check `/ruen status`, press the number keys, and verify the indicated actions. On a pet character, test Defensive on an extra button, then Passive on a native button: only the active stance should remain selected. Check click/key activation, right-click autocast where supported, dismissal/resummon, bags with a selected target, and an item comparison tooltip. The release review distinguishes automated checks from live coverage.
## Optional optimization
Run while playing a representative area, with the laptop powered and cooled as you normally use it:
@ -54,7 +68,7 @@ Run while playing a representative area, with the laptop powered and cooled as y
python3 Ruen-Setup --wow '/path/to/_forever_' --optimize 30 --seconds 600
```
The FPS target defaults to 60 (accepted range 20–240). Type `/reload` afterward to import the local hardware report. World and raid settings learn separately; a quiet outdoor sample cannot establish raid performance. Missing temperature/throttling counters are reported as unavailable, not proof of safe temperatures. `/ruen optimize status`, `pause`, `resume`, and `restore` control in-game calibration. No stress test or driver installation is performed.
The FPS target defaults to 60 (accepted range 20–240). Type `/reload` afterward to import the local hardware report. `/ruen bench` collects 180 one-second FPS readings: keep WoW focused for the full three minutes, since the background FPS cap can otherwise contaminate the result. Compare the same route, graphics settings and window size. This is not a per-frame 1% low. World and raid settings learn separately; a quiet outdoor sample cannot establish raid performance. Missing temperature/throttling counters are reported as unavailable, not proof of safe temperatures. `/ruen optimize status`, `pause`, `resume`, and `restore` control in-game calibration. No stress test or driver installation is performed.
## Undo

View File

@ -1,8 +1,36 @@
# Release review — 2026.11.21.5-beta.1
# Release review — 2026.11.21.6-beta.1
Reviewed 21 November 2026. **Suitable for an opt-in public beta, not a general-availability certification.** The previous private bundle received targeted fixes and gameplay checks; this review adds the packaging, installer, dependency, privacy and rollback checks needed for sharing it.
Reviewed 21 November 2026. **Suitable for an opt-in public beta, not a general-availability certification.** This update coordinates pet presentation, character controls and layout reservations. Earlier gameplay confirmations apply to the earlier builds, not automatically to these changes. The current checks below were rerun against this candidate.
## Changes made for public distribution
## Coordinated update
- Custom pet extensions copy native named texture regions, including selected-state geometry, opacity and blend mode. They display the engine's active command, rather than remembering the last click; Passive/Defensive/Aggressive selections remain mutually exclusive. Attack gets its separate flash treatment.
- Number-key profiles are per character. Hunters/Warlocks default to pets on plain numbers; the other seven classes default to utility actions. Secure, non-priority overrides leave account bindings intact and hand off during possession/vehicles. Custom assignments win. Pet dismissal, rogue stealth and druid forms do not flip the profile.
- Role-aware mouseover defaults use a reported specialization/assigned role or an explicit choice. Unknown roles do not imply healing. Existing effective choices survive migration. Group-role changes are observed without polling.
- Cooldown/meter choices migrate from account defaults to character settings. New characters start with duplicate cooldown viewers off. Existing characters keep their selections; auto meters remain dungeon/raid only.
- Placement and diagnostics share the same ten-frame control reservations, common spacing and chat defaults. Chat tabs/input and native profession/spellbook/map/auction panels are additional obstacles. Fresh chat starts at font size 14; existing fonts are retained.
- Native layout saves now reconcile the owned control geometry immediately, including the tracker height. Changing optional cooldown/meter settings no longer leaves the saved tracker overlapping utility controls until another layout event.
- A fresh alt on an already-configured account no longer replays shared combat/menu defaults. Existing action assignments, settings and binding backups remain intact. The main preset revision stays unchanged to avoid a full reset; the targeted class-layout migration advances independently.
## Class-by-class result and remaining live checks
All rows below passed modeled geometry and binding behavior. None constitutes a complete live level-60/spec certification.
| Class | Main concern addressed or retained | Live test still needed |
| --- | --- | --- |
| Warrior | Numbers are useful utility keys; native stances/main-bar paging and swing lanes remain intact. | Swap all learned stances in combat; verify rage, off-hand and possession controls. |
| Paladin | Utility numbers; native aura controls; healing input follows role rather than class alone. | Aura changes, tank/damage/healer roles and party mouseover casts. |
| Hunter | Plain-number pet profile; centered ten-plus-two row; consistent stance selection and real backing actions. | Both extensions by key/click, native-to-extra stance transitions, autocast, pet death/swap. |
| Rogue | Numbers no longer default to an absent pet; native stealth paging and combo-point attachment are retained. | Enter/leave stealth and temporary override states; confirm ability paging and combo visibility. |
| Priest | Utility numbers; learned forms remain native; healing input is explicit or role-based. | Shadow/healing roles, forms, mouseover casts and possession return. |
| Shaman | Separate totem reservations; optional cooldowns do not replace totem controls; role-based mouseover. | Maximum totems/recall, melee/caster/healer roles and temporary pet overlap. |
| Mage | Utility numbers; petless specs do not reserve an unconditional pet row; acquired pets use a stable row. | Temporary pet acquisition/dismissal, cooldown availability and combat appearance. |
| Warlock | Plain-number demon controls; extra actions track pet knowledge/rank and preserve occupied player slots. | Swap demon types, two extra actions, autocast and resummon in combat. |
| Druid | Utility numbers remain stable across forms; native form paging/combo points; role-based input. | All learned forms, tank/healer/damage roles and changed native action pages. |
The common 96-button action layout is retained. It provides capacity, not automatic spell or rotation assignment. Class-only controls remain native wherever possible. `/ruen keys`, `/ruen role`, `/ruen mouseover`, cooldown and meter commands provide explicit exceptions without changing another character.
## Distribution protections retained
- A small first-party ZIP replaces redistribution of the private multi-gigabyte bundle. Installers fetch pinned companion releases directly from their authors. Download size, SHA-256, archive paths and expanded-size bounds are checked before game files change.
- Existing compatible companion addons and their SavedVariables are preserved. The old Windows installer could replace companion settings wholesale; it no longer does.
@ -17,11 +45,13 @@ Reviewed 21 November 2026. **Suitable for an opt-in public beta, not a general-a
| Area | Evidence and limits |
| --- | --- |
| Installer transactions | 14 automated tests: Linux fresh/repeat install, saved-setting/profile preservation, account-binding restore, legacy migration, partial-write rollback, locking, missing backups, incompatible companions, download failure, symlink rejection, package corruption and archive-path validation. PowerShell fixtures include fresh/repeat install, preservation, restore, corruption, download failure, missing backup and unsafe paths. |
| Windows scripts | PowerShell 7.7 on Linux executed filesystem fixtures. Syntax parsed successfully. The unsigned x64 executable was rebuilt from the included small PowerShell launcher source (no runtime behavior changes). **Native Windows PowerShell 5.1, SmartScreen and GUI execution remain untested.** |
| Dependencies | All four base archives downloaded, hashed and extracted successfully against the lock; the final ZIP also installed those actual archives through PowerShell into a disposable game path containing spaces and Cyrillic characters. English/Russian audio endpoints returned HTTPS 200 with the expected sizes. Large audio hashes retain prior verification records; the full audio payload was not downloaded again during this review. Every fresh installation independently checks its full downloads. |
| Windows scripts | PowerShell 7.7 on Linux executed filesystem fixtures. Syntax parsed successfully. The unchanged unsigned x64 executable and its included C source retain the preceding release review; this update does not change the launcher binary. **Native Windows PowerShell 5.1, SmartScreen and GUI execution remain untested.** |
| Dependencies | The previous distribution review downloaded, hashed and extracted all four base archives against the unchanged lock, and installed them through PowerShell in a disposable game path containing spaces and Cyrillic characters. All seven pinned download endpoints were rechecked for this candidate: HTTPS 200 and matching byte counts. This HEAD check does not replace archive hashing; current installations verify the full pinned downloads. Large audio hashes retain prior verification records; the full audio payload was not downloaded again during this review. Every fresh installation independently checks its full downloads. |
| Character profiles | Nine classes × 24 effective number/Ctrl-number mappings; underlying account bindings unchanged, personal edits preserved, actual restricted snippet executed in a modeled engine, combat handoff/deferred changes, role events, capability reservations, restore, and full new-alt login with customized shared keys. **Live secure VM/priority behavior remains unverified.** |
| Layout policy | Shared control reservations and chat font preservation/conditional restore; chat input/tabs and native panels counted without relocating their secure managers. |
| Layout matrix | 9 classes × 8 environments × 8 display/scale cases, repeated with native aura/cast/combo/BG-widget footprints: **1,152 scenarios, zero modeled unintended intersections, offscreen controls, undersized group frames or wrong meter visibility**. Prior restricted-aura stress fixtures are reset before the base matrix. This is geometry/API simulation, not screenshots of every live class. |
| Overlay regressions | 50 meter/bag/tooltip/loot scenarios, 200 cooldown/class/full-HUD scenarios, 120 restricted-aura inventory cases, and repeated late tooltip reanchors. Custom tooltip owners, combat deferral, editor handoff and comparison cards were exercised. |
| Pet controls | Native ten-button row plus two extras: actual native page map and secure-dispatch code used in a simulated client; tests cover spellbook discovery, command identity, localization, rank/pet changes, occupied slots and rejection. 1,200 opaque-cooldown refreshes passed; rejected placement remains one attempt through 500 events/reload. This does not establish every action in the live secure VM. |
| Pet controls | Native ten-button row plus two extras: actual native page map and secure-dispatch code used in a simulated client; tests cover spellbook discovery, command identity, localization, rank/pet changes, occupied slots and rejection. Native selected artwork, opacity/layer/blend parity, mutual stance state and 500 visual-only transitions passed. 1,200 opaque-cooldown refreshes passed; rejected placement remains one attempt through 500 events/reload. This does not establish every action in the live secure VM. |
| Damage meter | Native timer/visibility code with tracked-taint simulation passed 1,000 combat starts; no direct writes to native visibility state or calls to its refresh methods. PvE auto, PvP exclusion, manual modes, no-room recovery and combat deferral passed. The previous live error was also reported resolved after reload. |
| Audio | 94 checks against the pinned Gun Silencer Forever code and Ruen bridge passed, including default volume, existing choices, off/restore, failed playback and missing dependency. |
| Timers/optimization | Swing lanes, idle sleep, secret values, world/raid separation, frame sampling, thermal input, pause and undo tests passed. No native Windows hardware/thermal validation is claimed. |
@ -35,6 +65,10 @@ Layout work is event-driven and coalesced; there is no idle geometry-search loop
These are code and simulation findings. They do **not** guarantee an FPS budget, memory-leak freedom or safe temperature on every laptop. Missing hardware counters remain unknown. The installer changes no drivers and installs no persistent service.
The added character profile and style helpers have no idle polling loop. Native button changes and role/binding events drive their work; repeated bindings use a cached signature. Selected-state updates do not write action slots. A pure Lua geometry microbenchmark is retained in `tests/benchmark-layout.lua`; it is not a game FPS benchmark and does not establish GPU/thermal behavior.
The focused local pre-update sample reported **56.1 FPS average, 47.5 minimum, 52.9 at the tenth percentile, and 0/180 readings below 30**. A preceding sample with uncertain window focus reached the configured 15 FPS background cap and was excluded as a reliable baseline. These are user-reported, one-second FPS readings, not per-frame lows. A matched post-update sample is pending; no FPS improvement is claimed. A hardware snapshot showed heavy GPU utilization without active GPU thermal slowdown; one snapshot cannot rule out intermittent throttling.
## Intentional overlap and capacity limits
1. An oversized item-comparison group can cover other bag contents while keeping the hovered item accessible. Very large tooltips may use chat/notification space after clear positions are exhausted.
@ -46,7 +80,7 @@ These are code and simulation findings. They do **not** guarantee an FPS budget,
## Remaining beta checks
- Clean Windows 10/11 installation, launcher double-click, custom game path, narration downloads and real rollback on the destination machine.
- Live pet activation/autocast on both extra buttons across pet types, including combat and pet swaps. Earlier bugs demonstrate why native simulation alone is insufficient.
- Live confirmation of this update's pet artwork, character binding overrides, activation/autocast on both extra buttons across pet types, including combat and pet swaps. Earlier bugs demonstrate why native simulation alone is insufficient.
- Live level-60 class/spec coverage and crowded raids/BGs, particularly healer mouseover workflows and low-resolution displays.
- Sustained performance and available thermal telemetry on the destination laptop.
- Other addon combinations, arbitrary aspect ratios, accessibility font sizes and all simultaneous window combinations.

13
docs/UPDATE-PLAN.md Normal file
View File

@ -0,0 +1,13 @@
# Coordinated update stages
This sequence is the release checklist for the class-controls update. The [release review](RELEASE-REVIEW.md) records the actual coverage; a simulated pass is never recorded as live gameplay or native Windows validation.
1. **Preserve the baseline.** Record the current commit/release, installed addon, account/character binding files, relevant SavedVariables and native layout/config files. Keep the preceding public release available. Request a focused, representative FPS baseline without changing graphics.
2. **Correct pet presentation and behavior.** Keep ten native slots plus two real action-backed extensions. Share native visual treatment, test mutually exclusive stance state and Attack flashing, and exercise activation, autocast, ranks, pet changes, occupied slots and rejected placements. Never fill visible player bars with fallback copies.
3. **Isolate character controls.** Add explicit pet/utility profiles and role preferences. Preserve shared and personal bindings; hand off to native vehicle/possession controls. Migrate existing effective preferences once and verify undo and new-alt login. Keep form/stealth paging native.
4. **Use shared placement reservations.** Centralize control footprints, spacing and chat defaults. Treat bags, tooltips, input tabs, native panels and social notifications together. Keep low-resolution controls readable, and report unavoidable or player-created overlap rather than claiming every configuration can fit.
5. **Verify each class and scenario.** Run the nine-class matrix across solo/party/dungeon/raid/BG and 720p–4K scale fixtures. Run actual native methods in the harness where available. Separately check real pet visuals/actions, stealth/forms, roles, bags/target tooltips and populated group frames. Record unavailable live classes/specs explicitly.
6. **Review cost and installation.** Check idle/event behavior and bounded update rates; compare a matched focused FPS sample when available. Run Linux and PowerShell installer transactions, preservation, corruption, lock and rollback checks. Native Windows launcher/SmartScreen/driver/thermal behavior requires a real destination-machine test.
7. **Publish a reversible beta.** Build the first-party allowlisted ZIP with file manifest and ZIP checksum; verify its contents and reproducibility. Publish a new Gitea prerelease and English/Russian instructions without replacing the previous tag/assets. Download the assets anonymously and verify their checksums. A release remains beta while the material native Windows/live-class checks are open.
Public distribution does not certify every laptop, third-party addon combination or level-60 specialization. A failure in automated controls/installer checks blocks the candidate; unavailable live coverage is disclosed prominently and is not a pass. Reproduce automated checks using [DEVELOPMENT.md](DEVELOPMENT.md). Install/update/restore using [INSTALL.md](INSTALL.md).

View File

@ -7,7 +7,7 @@ from pathlib import Path
import zipfile
ROOT = Path(__file__).resolve().parents[1]
VERSION = '2026.11.21.5-beta.1'
VERSION = '2026.11.21.6-beta.1'
FILES = ['Ruen-Setup', 'Ruen-Setup.exe', 'Install-Ruen-UI.ps1', 'Install-Ruen-UI.cmd',
'Install-Ruen-UI-Russian.cmd', 'Install-Windows.cmd', 'Install-Russian.cmd',
'Optimize-Ruen-UI.ps1', 'dependencies.lock.json', 'README.md', 'LICENSE',

48
scripts/check_release.py Normal file
View File

@ -0,0 +1,48 @@
#!/usr/bin/env python3
"""Reproduce release checks, with explicit required fixture/runtime inputs."""
import argparse
import json
import os
from pathlib import Path
import subprocess
import sys
ROOT = Path(__file__).resolve().parents[1]
def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('--native-ui', required=True, type=Path)
parser.add_argument('--audio-fixtures', required=True, type=Path)
parser.add_argument('--pwsh', required=True, type=Path)
parser.add_argument('--output', required=True, type=Path)
args = parser.parse_args()
args.output.mkdir(parents=True, exist_ok=True)
env = dict(os.environ, RUEN_NATIVE_UI=str(args.native_ui.resolve()),
RUEN_PWSH=str(args.pwsh.resolve()), PYTHONDONTWRITEBYTECODE='1')
addon = str(ROOT / 'RuenUI') + '/'
checks = [
('profiles', ['luajit', 'tests/check-profiles.lua', addon]),
('layout-policy', ['luajit', 'tests/check-layout-policy.lua', addon]),
('pets', ['luajit', 'tests/check-pet-actions.lua', addon]),
('layout', ['luajit', 'tests/check-layout.lua', addon, 'unused', str(args.output.resolve() / 'matrix.txt')]),
('meter', ['luajit', 'tests/check-meter.lua', addon]),
('timers-optimizer', ['luajit', 'tests/check-timers-optimizer.lua', addon]),
('audio', ['luajit', 'tests/check-gun-audio.lua', str(args.audio_fixtures.resolve())]),
('installers', [sys.executable, '-m', 'unittest', 'discover', '-s', 'tests', '-v']),
]
results = {'platform': sys.platform, 'nativeWindowsTested': False, 'liveGameTested': False, 'checks': []}
for name, command in checks:
with (args.output / (name + '.log')).open('w') as log:
result = subprocess.run(command, cwd=ROOT, env=env, stdout=log, stderr=subprocess.STDOUT)
results['checks'].append({'name': name, 'exitCode': result.returncode})
(args.output / 'results.json').write_text(json.dumps(results, indent=2) + '\n')
print(name, 'PASS' if result.returncode == 0 else 'FAIL', flush=True)
if result.returncode:
print((args.output / (name + '.log')).read_text()[-4000:])
return result.returncode
return 0
if __name__ == '__main__':
raise SystemExit(main())

View File

@ -0,0 +1,26 @@
-- Pure geometry benchmark. This measures neither live FPS nor secure/UI work.
local root,baseline=assert(arg[1]),assert(arg[2])
local function loadPlacement(path)
local p={};assert(loadfile(root..'LayoutPolicy.lua'))('RuenUI',p)
assert(loadfile(path))('RuenUI',p);return p.FindOverlayPosition
end
local old,new=loadPlacement(baseline),loadPlacement(root..'OverlayLayout.lua')
local crowded={}
for i=1,16 do
local x=(i-1)%4*330;local y=math.floor((i-1)/4)*180
crowded[#crowded+1]={left=x,right=x+210,bottom=y,top=y+115}
end
local function measure(fn,obstacles)
for i=1,200 do fn(240,100,900,350,obstacles,1366,768)end
local runs={}
for n=1,7 do
collectgarbage('collect');local start=os.clock()
for i=1,1500 do fn(240,100,900,350,obstacles,1366,768)end
runs[n]=(os.clock()-start)*1000/1500
end
table.sort(runs);return runs[4],runs[7]
end
for _,case in ipairs({{'clear',{}},{'crowded',crowded}})do
local before=measure(old,case[2]);local after,worst=measure(new,case[2])
print(string.format('%s search: baseline median %.4f ms; candidate median %.4f ms; slowest run %.4f ms',case[1],before,after,worst))
end

View File

@ -0,0 +1,16 @@
local root=assert(arg[1])
local P={}
assert(loadfile(root..'LayoutPolicy.lua'))('RuenUI',P)
local font,size,flags='native-cyrillic-capable-font',12,'OUTLINE'
local changes=0
ChatFrame1={GetFont=function()return font,size,flags end}
function FCF_SetChatWindowFontSize(_,frame,value)assert(frame==ChatFrame1);size=value;changes=changes+1 end
RuenUICharacter={};P.ApplyChatDefaults()
assert(size==14 and changes==1 and RuenUICharacter.chatFontOriginal.size==12)
P.ApplyChatDefaults();assert(changes==1,'font defaults reapplied')
size=16;P.RestoreChatDefaults();assert(size==16,'restore overwrote later font choice')
size=14;P.RestoreChatDefaults();assert(size==12,'font restore failed')
RuenUICharacter={version=5};size=18;P.ApplyChatDefaults();assert(size==18,'upgrade changed existing font')
local count=0;for _ in pairs(P.controlFrameSet)do count=count+1 end
assert(count==10 and #P.controlFrameNames==10,'control declarations inconsistent/duplicated')
print('PASS: shared ten-frame reservations, readable fresh-install chat font, idempotency, custom font and upgrade preservation, conditional restore')

View File

@ -82,6 +82,7 @@ for i=1,12 do bindings[tostring(i)]='ACTIONBUTTON'..i end
local initialBindings=CopyTable(bindings)
function GetBindingKey(action) local k={}; for key,a in pairs(bindings) do if a==action then k[#k+1]=key end end; return unpack(k) end
function GetBindingAction(k) return bindings[k] or '' end
local profileEngine=dofile('tests/secure-binding-fixture.lua')
function SetBinding(k,a) bindings[k]=a; return true end
function SaveBindings() end
function GetCurrentBindingSet() return 1 end
@ -247,9 +248,11 @@ C_Container={GetContainerNumSlots=function(bag) return bag==0 and 4 or 0 end,Get
local P={Translate=function(s) return s end, Localized=function(en) return en end}
assert(loadfile(root..'Profile.lua'))('RuenUI',P)
assert(loadfile(root..'Controls.lua'))('RuenUI',P)
assert(loadfile(root..'CharacterProfiles.lua'))('RuenUI',P)
assert(loadfile(root..'LayoutPolicy.lua'))('RuenUI',P)
assert(loadfile(root..'Brand.lua'))('RuenUI',P)
assert(loadfile(root..'ClassLayout.lua'))('RuenUI',P)
for _,file in ipairs({'PetExtras.lua','SwingTimers.lua','ExtraBars.lua','OverlayLayout.lua','DamageMeters.lua','ClassAssist.lua','HardwareProfile.lua','Optimizer.lua','GunAudio.lua'}) do assert(loadfile(root..file))('RuenUI',P) end
for _,file in ipairs({'ButtonStyle.lua','PetExtras.lua','SwingTimers.lua','ExtraBars.lua','OverlayLayout.lua','DamageMeters.lua','ClassAssist.lua','HardwareProfile.lua','Optimizer.lua','GunAudio.lua'}) do assert(loadfile(root..file))('RuenUI',P) end
local available={'JUMP','TARGETNEARESTENEMY','TARGETPREVIOUSENEMY'}
for _,entry in ipairs(P.menuBindings) do available[#available+1]=entry[2] end
function GetNumBindings() return #available end
@ -287,7 +290,7 @@ local numberKeys={'1','2','3','4','5','6','7','8','9','0','-','='}
for _,r in ipairs({{'CTRL-','4'},{'SHIFT-','3'},{'ALT-','6'},{'CTRL-SHIFT-','7'}}) do for i,key in ipairs(numberKeys) do assert(bindings[r[1]..key]=='MULTIACTIONBAR'..r[2]..'BUTTON'..i,'missing utility binding') end end
assert(modified=='NONE' and cvars.autoSelfCast=='1','Alt abilities must not force self-cast')
assert(bindings.F1=='TARGETSELF')
for i=1,10 do assert(bindings[numberKeys[i]]=='BONUSACTIONBUTTON'..i,'missing direct pet shortcut') end
for i=1,10 do assert(GetBindingAction(numberKeys[i],true)=='MULTIACTIONBAR4BUTTON'..i,'non-pet class needs utility numbers'); assert(GetBindingAction('CTRL-'..numberKeys[i],true)=='BONUSACTIONBUTTON'..i) end
assert(actions[37][1]=='spell' and actions[37][2]==999,'existing click slot overwritten')
assert(actions[3][2]==117,'original food shortcut moved')
assert(actions[38][2]==6948 and actions[39][2]==117 and actions[40][2]==453,'hearth/food copies missing')
@ -337,7 +340,7 @@ local scenarios={
possessed={'PossessActionBar','PetActionBar','MainMenuBarVehicleLeaveButton'},
maximum={'StanceBar','PetActionBar','PetFrame','MultiCastActionBarFrame','PossessActionBar','MainMenuBarVehicleLeaveButton'},
}
assert(RuenUIDB.classLayoutVersion==7 and classSaves==2,'class migration missing or repeated')
assert(RuenUIDB.classLayoutVersion==8 and classSaves==2,'class migration missing or repeated')
for _,name in ipairs({'PartyFrame','CompactRaidFrameContainer'}) do
_G[name].shown=true;UIParent.scripts.OnSizeChanged()
assert(not intersects(_G[name],MultiBar7),'group overlaps reserve bars')
@ -789,7 +792,9 @@ SlashCmdList.RUENUI('help');SlashCmdList.RUENUI('language')
local before=changes
eventFrame.scripts.OnEvent(eventFrame,'PLAYER_ENTERING_WORLD')
assert(changes==before,'subsequent login reapplied settings')
-- Existing installs must upgrade despite already having the 96-slot binding migration.
-- Profile migration on both account/character binding sets preserves persisted
-- keys, custom keys, action assignments and graphics while changing only the
-- current character's effective number controls.
local savedBindings,savedCharacter,savedDB=CopyTable(bindings),CopyTable(RuenUICharacter),CopyTable(RuenUIDB)
local originalSet=GetCurrentBindingSet
local activeSet=1
@ -797,48 +802,35 @@ function GetCurrentBindingSet()return activeSet end
for _,bindingSet in ipairs({1,2}) do
activeSet=bindingSet
RuenUIDB=CopyTable(savedDB);RuenUICharacter=CopyTable(savedCharacter)
RuenUICharacter.numberBindingBases=nil;RuenUICharacter.numberProfile='utility'
local scope=bindingSet==1 and RuenUIDB or RuenUICharacter
scope.petBindingsVersion=nil;scope.extraBindingsVersion=1
scope.petBindingsVersion=2;scope.extraBindingsVersion=1
for i,key in ipairs(numberKeys) do
bindings[key]='MULTIACTIONBAR4BUTTON'..i
bindings['CTRL-'..key]=i<=10 and 'BONUSACTIONBUTTON'..i or nil
bindings[key]=i<=10 and 'BONUSACTIONBUTTON'..i or 'CLICK RuenPetExtraButton'..i..':LeftButton'
bindings['CTRL-'..key]='MULTIACTIONBAR4BUTTON'..i
end
bindings['ALT-Q']='MY_ALT_SPELL';bindings['SHIFT-1']='MY_SHIFT_SPELL'
bindings['-']='PERSONAL_MINUS'
bindings['ALT-Q']='MY_ALT_SPELL';bindings['SHIFT-1']='MY_SHIFT_SPELL';bindings['-']='PERSONAL_MINUS'
local persistent=CopyTable(bindings)
local actionSnapshot=CopyTable(actions);local graphicsBefore=changes
combat=true;P.ApplyExtraBindings(false)
assert(not scope.petBindingsVersion and bindings['1']=='MULTIACTIONBAR4BUTTON1','combat migration was not deferred')
assert(not RuenUICharacter.numberBindingBases,'combat migration was not deferred')
combat=false;P.ApplyExtraBindings(false)
for i,key in ipairs(numberKeys) do
assert(bindings['CTRL-'..key]=='MULTIACTIONBAR4BUTTON'..i,'missed utility migration')
if i<=10 then assert(bindings[key]=='BONUSACTIONBUTTON'..i,'missed pet migration') end
for i=1,10 do
assert(GetBindingAction(numberKeys[i],true)=='MULTIACTIONBAR4BUTTON'..i)
assert(GetBindingAction('CTRL-'..numberKeys[i],true)=='BONUSACTIONBUTTON'..i)
end
assert(bindings['-']=='CLICK RuenPetExtraButton11:LeftButton' and bindings['=']=='CLICK RuenPetExtraButton12:LeftButton','missing extra-pet keys')
assert(bindings['ALT-Q']=='MY_ALT_SPELL' and bindings['SHIFT-1']=='MY_SHIFT_SPELL','migration reset unrelated rows')
assert(GetBindingAction('-',true)=='PERSONAL_MINUS','custom minus stolen')
for k,v in pairs(persistent)do assert(bindings[k]==v,'profile mutated persisted binding '..k)end
assert(changes==graphicsBefore,'binding migration changed graphics')
for slot,a in pairs(actionSnapshot) do assert(actions[slot][1]==a[1] and actions[slot][2]==a[2],'binding migration moved a slot')end
assert(scope.petBindingsVersion==2)
bindings['1']='PERSONAL_PET_KEY';bindings['CTRL-2']='PERSONAL_UTILITY_KEY'
for _,class in ipairs({'HUNTER','SHAMAN','WARLOCK','MAGE','DRUID','WARRIOR','PALADIN','PRIEST','ROGUE'}) do
currentClass=class;PetActionBar.shown=not PetActionBar.shown
P.ApplyExtraBindings(false)
assert(bindings['1']=='PERSONAL_PET_KEY' and bindings['CTRL-2']=='PERSONAL_UTILITY_KEY','reload/class/pet transition overwrote custom bindings')
end
end
for _,bindingSet in ipairs({1,2}) do
activeSet=bindingSet
local scope=bindingSet==1 and RuenUIDB or RuenUICharacter
scope.petBindingsVersion=1
bindings['1']='PERSONAL_PET_KEY';bindings['CTRL-2']='PERSONAL_UTILITY_KEY'
bindings['-']='OLD_MINUS';bindings['=']='OLD_EQUALS'
P.ApplyPetBindings(false)
assert(bindings['1']=='PERSONAL_PET_KEY' and bindings['CTRL-2']=='PERSONAL_UTILITY_KEY','two-key upgrade reset existing controls')
assert(bindings['-']=='CLICK RuenPetExtraButton11:LeftButton' and bindings['=']=='CLICK RuenPetExtraButton12:LeftButton')
bindings['-']='CUSTOM_MINUS';P.ApplyPetBindings(false)
assert(bindings['-']=='CUSTOM_MINUS','reload reset customized extra-pet key')
for slot,a in pairs(actionSnapshot) do assert(actions[slot][1]==a[1] and actions[slot][2]==a[2],'binding migration changed actions')end
bindings['1']='PERSONAL_KEY';P.ApplyPetBindings(false)
assert(GetBindingAction('1',true)=='PERSONAL_KEY','later manual change was overridden')
P.ClearCharacterBindings()
assert(GetBindingAction('CTRL-1',true)=='MULTIACTIONBAR4BUTTON1','profile restore left override')
end
GetCurrentBindingSet=originalSet;bindings=savedBindings;RuenUICharacter=savedCharacter;RuenUIDB=savedDB
print('PASS: one-time pet/utility swap on account and character bindings; combat deferral, personal keys, action slots, no-pet class consistency and later customizations')
P.ApplyCharacterBindings(false)
print('PASS: account/character base bindings unchanged by profile migration; custom keys, action slots, combat deferral and override restoration')
-- A graphics-only upgrade must not replace the existing UI layout or custom keys.
RuenUIDB.graphicsVersion=1
@ -1025,7 +1017,9 @@ for _,l in ipairs(manager.layoutInfo.layouts)do
for i=1,4 do l.systems[#l.systems+1]={system=Enum.EditModeSystem.CooldownViewer,systemIndex=i,settings={}}end
end
spellSet({6,5,3,2})
SlashCmdList.RUENUI('apply');C_EditMode.SetActiveLayout(2)
SlashCmdList.RUENUI('apply')
assert(gap(ObjectiveTrackerFrame,MultiBarRight)>=23.9,'native cooldown configuration restored tracker over utility controls')
C_EditMode.SetActiveLayout(2)
P.RefreshClassAssist();assert(not RuenUICharacter.classAssistError,RuenUICharacter.classAssistError)
assert(cvars.cooldownViewerEnabled=='1')
for _,name in ipairs(cdNames)do assert(not _G[name]:IsShown(),'auto viewer visible out of combat')end
@ -1036,6 +1030,7 @@ P.ClassAssistCommand('cooldowns','off');assert(classSaves==saveCount and Essenti
combat=false;P.classAssistListener.scripts.OnEvent(nil,'PLAYER_REGEN_ENABLED')
for _,name in ipairs(cdNames)do assert(not _G[name]:IsShown(),'off visibility')end
P.ClassAssistCommand('cooldowns','show');assert(EssentialCooldownViewer:IsShown())
assert(gap(ObjectiveTrackerFrame,MultiBarRight)>=23.9,'cooldown mode change restored tracker over utility controls')
assert(#EssentialCooldownViewer:GetCooldownIDs()==6,'unknown spells leaked into native category')
assert(#P.classAssistReserved==4 and #RuenUICharacter.classAssistUnplaced==0)
-- Geometry stress is deliberately synthetic; lists remain native, not Ruen spell lists.
@ -1101,6 +1096,23 @@ P.RefreshClassAssist();assert(RuenUICharacter.classAssistError)
C_CooldownViewer.IsCooldownViewerAvailable=getAvail;P.RefreshClassAssist();assert(not RuenUICharacter.classAssistError)
print('PASS: native cooldown selection/unknown filtering, combat visibility, empty categories, talent/learned changes, settings handoff, error recovery; '..cdSamples..' class/resolution/full-HUD cooldown+meter+tooltip clearance cases')
-- Display choices belong to each character; changing one does not change the
-- legacy account defaults inherited by an unvisited alt.
do
local original=RuenUICharacter
local dbCooldown,dbMeter=RuenUIDB.cooldownsMode,RuenUIDB.damageMeterMode
RuenUIDB.cooldownsMode='auto';RuenUIDB.damageMeterMode='auto'
P.ClassAssistCommand('cooldowns','off');P.DamageMeterCommand('off')
local first=RuenUICharacter
RuenUICharacter={version=5,original={}};P.EnsureCharacterProfile()
assert(RuenUICharacter.cooldownsMode=='auto' and RuenUICharacter.damageMeterMode=='auto')
P.ClassAssistCommand('cooldowns','show');P.DamageMeterCommand('show')
assert(first.cooldownsMode=='off' and first.damageMeterMode=='off')
assert(RuenUIDB.cooldownsMode=='auto' and RuenUIDB.damageMeterMode=='auto')
RuenUICharacter=original;RuenUIDB.cooldownsMode=dbCooldown;RuenUIDB.damageMeterMode=dbMeter
P.ClassAssistCommand('cooldowns','off');P.DamageMeterCommand('auto')
end
-- Class defaults, native modifiers, account/character transitions and overrides.
function IsMouseoverCastSupported()return true end
local nativeSetting=Settings.SetValue
@ -1110,7 +1122,7 @@ local guid='player-1';function UnitGUID()return guid end
local chars={};local keysBefore=CopyTable(bindings);local selfBefore=modified
for _,class in ipairs({'PRIEST','DRUID','PALADIN','SHAMAN','HUNTER','WARLOCK','MAGE','ROGUE','WARRIOR'})do
currentClass=class;guid='player-'..class
RuenUICharacter={original={}};chars[class]=RuenUICharacter
RuenUICharacter={original={},rolePreference=({PRIEST=true,DRUID=true,PALADIN=true,SHAMAN=true})[class] and 'HEALER' or 'DAMAGER'};chars[class]=RuenUICharacter
cvars.enableMouseoverCast='0';mouseModifier='SHIFT'
P.ApplyMouseover(false)
local expected=({PRIEST=true,DRUID=true,PALADIN=true,SHAMAN=true})[class] and '1' or '0'
@ -1418,7 +1430,7 @@ P.OverlayObstacles(true) -- forbidden child is never read
for _,class in ipairs({'WARRIOR','PALADIN','HUNTER','ROGUE','PRIEST','SHAMAN','MAGE','WARLOCK','DRUID'})do
currentClass=class;spellSet({1,1,0,0})
P.ClassAssistCommand('cooldowns','show');assert(cvars.cooldownViewerEnabled=='1')
P.ClassAssistCommand('cooldowns','hide');assert(cvars.cooldownViewerEnabled=='0' and RuenUIDB.cooldownsMode=='off')
P.ClassAssistCommand('cooldowns','hide');assert(cvars.cooldownViewerEnabled=='0' and RuenUICharacter.cooldownsMode=='off')
for _,name in ipairs(cdNames)do assert(not _G[name]:IsShown(),'hide left '..name..' visible')end
end
print('PASS: '..cases..' restricted-aura bag cases (target/focus/bank, 720p-4K, three pet/totem classes), no control overlaps; forbidden frames skipped; show/hide in all nine classes')
@ -1439,7 +1451,7 @@ TargetFrame.GetAuraContainer=nil;FocusFrame.GetAuraContainer=nil
local function rectangle(f) local l,b,w,h=f:rect();return {left=l,bottom=b,right=l+w,top=b+h} end
local function hit(a,b) return a.left<b.right-1 and a.right>b.left+1 and a.bottom<b.top-1 and a.top>b.bottom+1 end
local controlsList={'MainActionBar','MultiBarBottomLeft','MultiBarBottomRight','MultiBar5','MultiBarLeft','MultiBarRight','MultiBar6','MultiBar7','BagsBar','MicroMenuContainer','ChatFrame1','PlayerFrame','TargetFrame','FocusFrame','PetFrame','TargetFrameToT','RuenTargetTargetTarget','StanceBar','PetActionBar','MultiCastActionBarFrame','PossessActionBar','MainMenuBarVehicleLeaveButton','PlayerCastingBarFrame','RuenSwingTimers','PartyFrame','CompactRaidFrameContainer','MinimapCluster','ObjectiveTrackerFrame'}
RuenUIDB.cooldownsMode='off';RuenUIDB.damageMeterMode='auto';inEdit=false;combat=false
RuenUICharacter.cooldownsMode='off';RuenUICharacter.damageMeterMode='auto';inEdit=false;combat=false
activeAlerts={}
for _,f in ipairs({roll,talking,loot1,loot2,achievement,breath,buffs,ContainerFrameCombinedBags,GameTooltip,ShoppingTooltip1,ShoppingTooltip2,unpack(rolls)})do f.shown=false end
for _,display in ipairs(configs)do
@ -1509,7 +1521,7 @@ end)()
local function rectangle(f) local l,b,w,h=f:rect();return {left=l,bottom=b,right=l+w,top=b+h} end
local function hit(a,b) return a.left<b.right-1 and a.right>b.left+1 and a.bottom<b.top-1 and a.top>b.bottom+1 end
local controlsList={'MainActionBar','MultiBarBottomLeft','MultiBarBottomRight','MultiBar5','MultiBarLeft','MultiBarRight','MultiBar6','MultiBar7','BagsBar','MicroMenuContainer','ChatFrame1','PlayerFrame','TargetFrame','FocusFrame','PetFrame','TargetFrameToT','RuenTargetTargetTarget','StanceBar','PetActionBar','MultiCastActionBarFrame','PossessActionBar','MainMenuBarVehicleLeaveButton','PlayerCastingBarFrame','RuenSwingTimers','PartyFrame','CompactRaidFrameContainer','MinimapCluster','ObjectiveTrackerFrame','AuditTargetCast','AuditFocusCast','AuditFocusTarget','AuditTargetAuras','AuditFocusAuras','AuditCombo1','AuditCombo2','AuditCombo3','AuditCombo4','AuditCombo5','UIWidgetTopCenterContainerFrame'}
RuenUIDB.cooldownsMode='off';RuenUIDB.damageMeterMode='auto';inEdit=false;combat=false
RuenUICharacter.cooldownsMode='off';RuenUICharacter.damageMeterMode='auto';inEdit=false;combat=false
activeAlerts={}
for _,f in ipairs({roll,talking,loot1,loot2,achievement,breath,buffs,ContainerFrameCombinedBags,GameTooltip,ShoppingTooltip1,ShoppingTooltip2,unpack(rolls)})do f.shown=false end
for _,display in ipairs(configs)do
@ -1550,3 +1562,51 @@ end)()
report:write('CASES ',cases,'; FINDINGS ',issues,'\n');report:close()
print('AUDIT MATRIX',cases,issues);assert(issues==0,'Matrix findings require review')
end)()
-- Whole-login regression: a new alt using shared bindings must not replay
-- account defaults over another character's custom combat/menu keys.
do
local previousCharacter=RuenUICharacter
local previousBindings=CopyTable(bindings)
local previousClass=currentClass
RuenUIDB.disabled=nil;RuenUIDB.combatBindingsVersion=2
RuenUIDB.controlsVersion=1;RuenUIDB.extraBindingsVersion=1
bindings.Q='CUSTOM_SHARED_COMBAT';bindings.N='CUSTOM_SHARED_MENU'
bindings['1']='CUSTOM_SHARED_NUMBER';bindings['ALT-Q']='CUSTOM_SHARED_UTILITY'
local before=CopyTable(bindings)
RuenUICharacter={original={}};currentClass='ROGUE'
combat=false;inEdit=false
UIParent.w,UIParent.h,UIParent.scale=1920,1080,1
inside=false;kind='none';activeAlerts={}
for _,f in ipairs({ContainerFrameCombinedBags,GameTooltip,ShoppingTooltip1,ShoppingTooltip2,CompactRaidFrameContainer,PartyFrame,PetActionBar,MultiCastActionBarFrame,unpack(rolls)})do f.shown=false end
ObjectiveTrackerFrame.h=300
eventFrame.scripts.OnEvent(eventFrame,'PLAYER_ENTERING_WORLD')
assert(RuenUICharacter.version==P.version,'fresh-alt setup did not finish')
for key,value in pairs(before)do assert(bindings[key]==value,'fresh alt rewrote shared key '..key)end
assert(GetBindingAction('1',true)=='CUSTOM_SHARED_NUMBER')
RuenUICharacter=previousCharacter;bindings=previousBindings;currentClass=previousClass
P.ApplyCharacterBindings(false)
print('PASS: full first-login setup on a new alt preserves shared combat/menu/utility/custom number bindings')
end
-- The same obstacle policy protects chat entry and newly included native
-- windows. This is placement coverage, not permission to move native panels.
do
local edit=CreateFrame('Frame','ChatFrame1EditBox');edit.w,edit.h=360,28
edit:SetPoint('BOTTOMLEFT',UIParent,'BOTTOMLEFT',20,8);edit.shown=true
local tab=CreateFrame('Frame','ChatFrame1Tab');tab.w,tab.h=140,20
tab:SetPoint('BOTTOMLEFT',ChatFrame1,'TOPLEFT',0,0);tab.shown=true
for _,name in ipairs({'ProfessionsFrame','PlayerSpellsFrame','WorldMapFrame','CharacterFrame','AuctionHouseFrame'})do
local panel=CreateFrame('Frame',name);panel.w,panel.h=460,350
panel:SetPoint('TOPLEFT',UIParent,'TOPLEFT',20,-45);panel.shown=true
local found={}
for _,r in ipairs(P.OverlayObstacles(true))do found[r.name]=r end
assert(found[name] and found.ChatFrame1EditBox and found.ChatFrame1Tab,'missing panel/chat reservation '..name)
local anchor=CopyTable(panel.point)
P.PositionOverlayFrames()
assert(eq(panel.point,anchor),'overlay moved native panel '..name)
panel.shown=false
end
edit.shown=false;tab.shown=false
print('PASS: shared obstacle reservations cover chat input/tabs and native profession/spellbook/map/character/auction panels without moving them')
end

View File

@ -29,6 +29,11 @@ local function frame(name,parent)
function f:SetTexture(t)self.texture=t end
function f:GetTexture()return self.texture end
function f:GetAtlas()return nil end
function f:SetAlpha(v)self.alpha=v end
function f:GetBlendMode()return self.blend or 'BLEND'end
function f:SetBlendMode(v)self.blend=v end
function f:GetDrawLayer()return 'OVERLAY',1 end
function f:SetDrawLayer(a,b)self.layer={a,b}end
function f:GetTexCoord()return 0,1,0,1 end
function f:SetTexCoord()end
function f:SetVertexColor(...)self.color={...}end
@ -47,7 +52,7 @@ local function frame(name,parent)
function f:SetCooldown(...)self.cd={...}end
for _,kind in ipairs({'Normal','Pushed','Highlight','Checked'})do
f['Get'..kind..'Texture']=function(self)return self[kind]end
f['Set'..kind..'Texture']=function(self,t)self[kind]=frame(nil,self);self[kind].texture=t end
f['Set'..kind..'Texture']=function(self,t)self[kind]=frame(nil,self);self[kind].texture=t;self[kind..'Texture']=self[kind] end
end
frames[#frames+1]=f;if name then _G[name]=f end;return f
end
@ -55,6 +60,9 @@ CreateFrame=function(_,name,parent)return frame(name,parent)end
UIParent=frame('UIParent');PetActionBar=frame('PetActionBar',UIParent);PetActionBar.w=408
for i=1,10 do frame('PetActionButton'..i,PetActionBar)end
for _,kind in ipairs({'Normal','Pushed','Highlight','Checked'})do PetActionButton1['Set'..kind..'Texture'](PetActionButton1,'native-'..kind)end
PetActionButton1.Flash=frame();PetActionButton1.Flash:SetTexture('native-Flash')
function UIFrameFlash(f)f.flashing=true end
function UIFrameFlashStop(f)f.flashing=false end
EditModeManagerFrame=frame('EditModeManagerFrame',UIParent)
RuenUIDB={};RuenUICharacter={}
Enum={SpellBookSpellBank={Pet=1},SpellBookItemType={Spell=1,PetAction=3},ActionBarSet={Mkb=0,Gamepad=1}}
@ -89,6 +97,12 @@ function GetBindingKey(action)return action:find('11:') and '-' or '='end
function GetBindingText(k)return k end
local actions={[25]={'spell',99999},[1]={'spell',100},[37]={'item',6948},[145]={'spell',222}}
local places,uses,toggles=0,{},0
local activeStance,activeOrder,attacking
local function activate(id)
if id>=100663296 and id<=100663300 then activeStance=id
elseif id==117440514 then attacking=true
elseif id==117440512 or id==117440513 then activeOrder=id;attacking=false end
end
local engineActions={}
local rejectPlacement=false
storedType='engine_pet'
@ -101,7 +115,7 @@ function PlaceAction(slot)
end
C_ActionBar={IsAutoCastPetAction=function(slot)local k,id=GetActionInfo(slot);return k==storedType and id<100000 end,
ToggleAutoCastPetAction=function(slot)assert(C_ActionBar.IsAutoCastPetAction(slot));auto=not auto;toggles=toggles+1 end,
IsCurrentAction=function(slot)return uses[#uses]==slot end,
IsCurrentAction=function(slot)local a=actions[slot];return a and (a[2]==activeStance or a[2]==activeOrder or (a[2]==117440514 and attacking)) or false end,
GetBonusBarIndexForSlot=function()return nil end,
GetActionBarPage=function()return currentPage end,
FindPetActionButtons=function(id)
@ -140,6 +154,7 @@ SpellFlyout={Hide=function()end}
function UseAction(slot,unit,button,isKeyPress)
assert(button=='LeftButton');assert(actions[slot][1]==storedType,'no native pet action')
uses[#uses+1]=slot
activate(actions[slot][2])
end
C_Macro={RunMacroText=function()error('must not use macrotext for pet activation')end}
assert(loadfile((assert(os.getenv('RUEN_NATIVE_UI'))..'/SecureTemplates.lua')))()
@ -159,6 +174,7 @@ local function click(button,mouse)
button.scripts.OnClick(button,mouse,false);if button.scripts.PostClick then button.scripts.PostClick(button,mouse,false)end
end
local P={Localized=function(en)return en end}
assert(loadfile(root..'ButtonStyle.lua'))('RuenUI',P)
assert(loadfile(root..'PetExtras.lua'))('RuenUI',P)
pet('Bear',5)
local choices=P.PetExtraChoices();assert(#choices==1 and choices[1].id==9005,'missing bear ability was not found')
@ -178,7 +194,9 @@ assert(not b.attrs.type1 and not b.attrs.macrotext1)
assert(a.scripts.OnUpdate and not b.scripts.OnUpdate,'empty pet slot still polling')
assert(a.HotKey.text=='-' and b.HotKey.text=='=')
assert(a.AutoCastOverlay.auto and a.cooldown.cd[2]==5)
assert(a.Normal.texture=='native-Normal' and a.Checked.texture,'missing native art accessor must not break setup')
assert(a.Normal.texture=='native-Normal' and a.Checked.texture=='native-Checked','missing getter must use native named selected region, not generic glow')
assert(a.Checked.alpha==1 and a.Checked.blend==PetActionButton1.Checked:GetBlendMode(),'selected artwork opacity/blending mismatch')
assert(a.Checked.points[1][1]=='TOPLEFT' and a.Checked.layer[1]=='OVERLAY','native artwork anchor/layer mismatch')
assert(a.clicks[1]=='AnyDown' and a.clicks[2]=='AnyUp')
PetActionBar:Hide();assert(not a:IsShown() and not b:IsShown(),'petless/vehicle visibility must follow native bar');PetActionBar:Show()
local listener
@ -339,6 +357,7 @@ end
assert(places==before+1,'rejected placement wrote more than once')
assert(actions[25] and actions[25][1]=='spell' and actions[25][2]==99999,'visible page 3 changed')
local Q={Localized=P.Localized}
assert(loadfile(root..'ButtonStyle.lua'))('RuenUI',Q)
assert(loadfile(root..'PetExtras.lua'))('RuenUI',Q)
Q.InitializePetExtras(function()return true end)
assert(places==before+1,'reload retried rejected placement')
@ -362,6 +381,20 @@ assert(GetActionInfo(c.actionSlot)=='spell' and select(2,GetActionInfo(c.actionS
for _,button in ipairs({c,d}) do
local count=#uses;click(button,'LeftButton');assert(#uses==count+1 and uses[#uses]==button.actionSlot)
end
-- State belongs to the engine, not the last extra button clicked. Native
-- Passive (slot 0), a macro or a pet change must clear a selected extra stance.
click(c,'LeftButton');c.scripts.OnUpdate(c,.2);d.scripts.OnUpdate(d,.2)
assert(c.checked and not d.checked and c.Checked.alpha==1)
activate(100663296);c.scripts.OnUpdate(c,.2);d.scripts.OnUpdate(d,.2)
assert(not c.checked and not d.checked,'native Passive did not clear extra stance highlight')
click(d,'LeftButton');c.scripts.OnUpdate(c,.2);d.scripts.OnUpdate(d,.2)
assert(not c.checked and d.checked,'mutually exclusive stance highlights')
local startPlaces=places
for i=1,500 do activate(i%2==0 and 100663300 or 100663296);c.scripts.OnUpdate(c,.2)end
assert(places==startPlaces,'visual refresh altered action assignments')
print('PASS: native selected artwork without getters, alpha/blend/layer parity, native/extra mutually exclusive stance state and 500 visual-only transitions')
P.SetActionButtonSelected(c,true,true);assert(c.Flash.flashing and c.Checked.alpha==.5,'attack indication missing')
P.SetActionButtonSelected(c,true,false);assert(not c.Flash.flashing and c.Checked.alpha==1,'stance inherited attack flashing')
local slot=c.actionSlot;actions[slot]={storedType,100663298}
Q.RefreshPetExtras();assert(not c.actionSlot and actions[slot][2]==100663298,'another command with spell/0/pet was treated as owned')
print('PASS: observed spell/0/pet payload activates both stance commands through native dispatcher and cannot confuse ownership of different commands')

100
tests/check-profiles.lua Normal file
View File

@ -0,0 +1,100 @@
local root=assert(arg[1], 'Pass addon directory with trailing slash')
local base,saves,combat,class,role,spec={},0,false,'HUNTER','NONE',nil
local frames={}
UIParent={}
function CreateFrame(_,name)
local frame={events={},scripts={}}
function frame:RegisterEvent(e)self.events[e]=true end
function frame:SetScript(k,v)self.scripts[k]=v end
function frame:HookScript(k,v)self.scripts[k]=v end
frames[#frames+1]=frame
if name then _G[name]=frame end
return frame
end
function InCombatLockdown()return combat end
function UnitClass()return class,class end
function UnitName()return 'Test' end
function UnitGUID()return 'player-'..class end
function UnitGroupRolesAssigned()return role end
function GetSpecialization()return spec end
function GetSpecializationRole()return role end
function GetCurrentBindingSet()return 1 end
function GetBindingAction(key)return base[key] or '' end
function GetBindingKey(action)for k,v in pairs(base)do if v==action then return k end end end
function GetBindingText(key)return key end
function SaveBindings()saves=saves+1 end
function hooksecurefunc(object,key,fn)local old=object[key];object[key]=function(...)old(...);fn(...)end end
C_Timer={After=function(_,fn)fn()end}
PetActionBar={IsShown=function()return false end}
function UnitExists(unit)return unit=='pet' and PetActionBar:IsShown()end
local fixture=dofile('tests/secure-binding-fixture.lua')
local P={Localized=function(en)return en end}
assert(loadfile(root..'CharacterProfiles.lua'))('RuenUI',P)
RuenUIDB={petBindingsVersion=2,cooldownsMode='off',damageMeterMode='auto'}
local numbers={'1','2','3','4','5','6','7','8','9','0','-','='}
for i,key in ipairs(numbers)do
base[key]=i<=10 and 'BONUSACTIONBUTTON'..i or 'CLICK RuenPetExtraButton'..i..':LeftButton'
base['CTRL-'..key]='MULTIACTIONBAR4BUTTON'..i
end
base.Q='ACTIONBUTTON1';base.F1='TARGETSELF'
local function font()return {SetText=function(self,s)self.text=s end,Show=function(self)self.shown=true end,Hide=function(self)self.shown=false end}end
PetActionButton1={HotKey=font(),SetHotkeys=function()end}
MultiBarLeftButton1={HotKey=font(),UpdateHotkeys=function()end}
RuenPetExtraButton11={HotKey=font()}
local chars={}
for _,value in ipairs({'HUNTER','WARLOCK','ROGUE','WARRIOR','MAGE','DRUID','PALADIN','SHAMAN','PRIEST'})do
class=value;RuenUICharacter={version=5};chars[class]=RuenUICharacter
P.InitializeCharacterProfiles();P.ApplyCharacterBindings(false)
local pet=class=='HUNTER' or class=='WARLOCK'
for i,key in ipairs(numbers)do
local action=i<=10 and 'BONUSACTIONBUTTON'..i or 'CLICK RuenPetExtraButton'..i..':LeftButton'
assert(GetBindingAction(key,true)==(pet and action or 'MULTIACTIONBAR4BUTTON'..i))
assert(GetBindingAction('CTRL-'..key,true)==(pet and 'MULTIACTIONBAR4BUTTON'..i or action))
end
assert(PetActionButton1.HotKey.text==(pet and '1' or 'CTRL-1'))
assert(MultiBarLeftButton1.HotKey.text==(pet and 'CTRL-1' or '1'))
assert(RuenPetExtraButton11.HotKey.text==(pet and '-' or 'CTRL--'))
assert(base['1']=='BONUSACTIONBUTTON1' and base['CTRL-1']=='MULTIACTIONBAR4BUTTON1' and saves==0,'profile rewrote shared bindings')
assert(RuenUICharacter.cooldownsMode=='off' and RuenUICharacter.damageMeterMode=='auto')
end
-- Manual changes after a profile was applied immediately supersede it.
base['1']='CUSTOM';P.ApplyCharacterBindings(false)
assert(GetBindingAction('1',true)=='CUSTOM' and RuenUICharacter.numberBindingConflicts[1]=='1')
base['1']='BONUSACTIONBUTTON1';P.ApplyCharacterBindings(false)
assert(GetBindingAction('1',true)=='BONUSACTIONBUTTON1','reclaimed a customized key automatically')
P.ApplyCharacterBindings(true);assert(GetBindingAction('1',true)=='MULTIACTIONBAR4BUTTON1')
-- Config changes defer in combat; native handoff still executes its secure
-- snippet immediately, without an insecure SetAttribute call.
combat=true
P.CharacterProfileCommand('keys','pet')
assert(GetBindingAction('1',true)=='MULTIACTIONBAR4BUTTON1')
fixture.transition(true);assert(next(fixture.active())==nil,'native control handoff retained overrides')
fixture.transition(false);assert(GetBindingAction('1',true)=='MULTIACTIONBAR4BUTTON1')
combat=false;P.ApplyCharacterBindings(false);assert(GetBindingAction('1',true)=='BONUSACTIONBUTTON1')
-- Mage capability: no unconditional empty pet shelf, but no disappearing row
-- after a temporary pet dies during the same session.
class='MAGE';RuenUICharacter=chars.MAGE;P.ApplyCharacterBindings(false)
assert(not P.NeedsPetRow())
PetActionBar.IsShown=function()return true end;assert(P.NeedsPetRow())
PetActionBar.IsShown=function()return false end;assert(P.NeedsPetRow())
spec=2;assert(not P.NeedsPetRow());spec=nil
-- Roles do not follow forms or class guesses, and manual choices win.
RuenUICharacter={};P.EnsureCharacterProfile();assert(P.CharacterRole()=='UNKNOWN' and RuenUICharacter.cooldownsMode=='off')
role='HEALER';assert(P.CharacterRole()=='HEALER')
P.CharacterProfileCommand('role','damage');assert(P.CharacterRole()=='DAMAGER' and RuenUICharacter.mouseoverMode=='auto')
role='TANK';assert(P.CharacterRole()=='DAMAGER')
P.CharacterProfileCommand('role','auto');assert(P.CharacterRole()=='TANK')
-- Assigned roles can change without a specialization change on this client.
local roleSeen
P.ApplyMouseover=function()roleSeen=P.CharacterRole()end
role='HEALER'
for _,frame in ipairs(frames)do
if frame.events.PLAYER_ROLES_ASSIGNED then frame.scripts.OnEvent(frame,'PLAYER_ROLES_ASSIGNED')end
end
assert(roleSeen=='HEALER','assigned role changes must refresh the auto input preference')
RuenUIDB.disabled=true;P.ApplyCharacterBindings(false)
assert(next(fixture.active())==nil and GetBindingAction('1',true)==base['1'])
RuenUIDB.disabled=nil;P.ApplyCharacterBindings(false)
assert(next(fixture.active())~=nil)
P.ClearCharacterBindings();assert(next(fixture.active())==nil and saves==0)
print('PASS: nine-class 24-key profiles, no account writes, actual secure snippet combat handoff, manual key preservation, effective hotkeys, deferred changes, role/capability defaults, migration and restore')

View File

@ -0,0 +1,51 @@
-- Executes Ruen's actual restricted snippet against a modeled binding engine.
-- This does not claim to reproduce the live secure VM or native priority rules.
local frames, active, special = {}, {}, false
local create, getAction = CreateFrame, GetBindingAction
CreateFrame = function(kind,name,parent,template)
local frame = create(kind,name,parent,template)
if template == "SecureHandlerStateTemplate" then
frames[#frames+1]=frame
frame.profileAttributes={}
function frame:SetAttribute(key,value)
assert(not InCombatLockdown(),'insecure profile attribute write in combat')
self.profileAttributes[key]=value
end
function frame:GetAttribute(key)return self.profileAttributes[key]end
function frame:SetBinding(priority,key,action)
assert(self.inSecureSnippet and priority==false,'must use non-priority secure binding')
active[key]=action
end
function frame:ClearBindings()
assert(self.inSecureSnippet,'clear must execute through secure snippet')
active={}
end
function frame:Execute(body)
self.inSecureSnippet=true
local fn=assert(loadstring(body));setfenv(fn,{self=self});fn()
self.inSecureSnippet=false
end
end
return frame
end
function RegisterStateDriver(frame,key,conditions)
assert(not InCombatLockdown())
assert(conditions=='[vehicleui][overridebar][possessbar] special; normal')
frame.profileState=key
frame.profileAttributes['state-'..key]=special and 'special' or 'normal'
frame:Execute(frame.profileAttributes['_onstate-'..key])
end
function UnregisterStateDriver(frame,key)frame.profileState=nil end
GetBindingAction=function(key,withOverrides)
if withOverrides and active[key] then return active[key] end
return getAction(key,withOverrides)
end
return {transition=function(value)
special=value
for _,frame in ipairs(frames)do
if frame.profileState then
frame.profileAttributes['state-'..frame.profileState]=value and 'special' or 'normal'
frame:Execute(frame.profileAttributes['_onstate-'..frame.profileState])
end
end
end, active=function()return active end}