Honor native chat margins during resizing and verify current bar geometry
This commit is contained in:
parent
cf55b161dc
commit
0cd12cc595
@ -1,4 +1,4 @@
|
||||
Ruen UI - ESDF key map (2026.11.22.5-beta.1)
|
||||
Ruen UI - ESDF key map (2026.11.22.6-beta.1)
|
||||
|
||||
MOVEMENT
|
||||
Q W [E] R T
|
||||
|
||||
@ -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.22.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.22.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
|
||||
|
||||
|
||||
@ -49,12 +49,14 @@ local function makePlan(base)
|
||||
}
|
||||
-- Compact rows stay inside the space between player/target subframes. Known
|
||||
-- class controls retain their slot when temporarily hidden during combat.
|
||||
local rows, row = {}, {width = 0, height = 30}
|
||||
-- Measure each occupied row. A 30-unit minimum inflated native 24-unit
|
||||
-- stance/aspect rows, needlessly pushing pets, casts and group frames up.
|
||||
local rows, row = {}, {width = 0, height = 0}
|
||||
for _, group in ipairs(groups) do
|
||||
if group.active then
|
||||
local gap = #row > 0 and 10 or 0
|
||||
if #row > 0 and row.width + gap + group.width > 300 then
|
||||
rows[#rows + 1] = row; row = {width = 0, height = 30}; gap = 0
|
||||
rows[#rows + 1] = row; row = {width = 0, height = 0}; gap = 0
|
||||
end
|
||||
row[#row + 1] = group
|
||||
row.width = row.width + gap + group.width
|
||||
|
||||
@ -320,8 +320,9 @@ local function fitChat()
|
||||
-- instead survives a display change. Both still represent an untouched
|
||||
-- default. Any other size/anchor belongs to the player's manual edit.
|
||||
local function same(w,h) return w and h and math.abs(current-w)<.5 and math.abs(height-h)<.5 end
|
||||
chatUsesDefaults=P.IsDefaultChatSystem(chat.systemInfo) and math.abs(left-20)<.5
|
||||
and math.abs((frameEdge(chat,"GetBottom") or 0)-45)<.5
|
||||
local defaultLeft,defaultBottom=P.DefaultChatOrigin()
|
||||
chatUsesDefaults=P.IsDefaultChatSystem(chat.systemInfo) and math.abs(left-defaultLeft)<.5
|
||||
and math.abs((frameEdge(chat,"GetBottom") or 0)-defaultBottom)<.5
|
||||
and (same(saved.width,saved.height) or (chatUsesDefaults and same(chatAppliedWidth,chatAppliedHeight)))
|
||||
if chatUsesDefaults then
|
||||
chatBaseWidth,height=P.DefaultChatSize()
|
||||
|
||||
@ -21,6 +21,10 @@ end
|
||||
|
||||
local function leftDock(edge, rows, saved)
|
||||
local x=edge(ChatFrame1,"GetLeft") or 20
|
||||
-- Keep the shelf on the layout margin, not the text inset introduced by
|
||||
-- native chat clamping. Those extra 12 units matter to a compact raid grid.
|
||||
local chatOrigin=P.DefaultChatOrigin()
|
||||
x=math.max(P.layoutPolicy.gap,x-math.max(0,chatOrigin-20))
|
||||
local width=(rows or leftRows())==1 and 495 or 252
|
||||
local y=P.SocialNotificationSpace(edge).top+12
|
||||
-- During first installation Blizzard's player frame may still be at the
|
||||
|
||||
@ -34,11 +34,30 @@ function P.DefaultChatSize()
|
||||
return math.floor(width/10)*10,math.floor(height/10)*10
|
||||
end
|
||||
|
||||
function P.DefaultChatOrigin()
|
||||
-- The native chat selection includes its tabs/buttons. The engine clamps
|
||||
-- the requested 20-unit anchor to 32 on this client; that is not a manual
|
||||
-- move. Read native insets so another client/scale can use its own margin.
|
||||
local frame=ChatFrame1
|
||||
local x,y=20,45
|
||||
if frame and frame.GetClampRectInsets then
|
||||
local left,right,top,bottom=frame:GetClampRectInsets()
|
||||
local scale=frame:GetEffectiveScale()/UIParent:GetEffectiveScale()
|
||||
x=math.max(x,-(left or 0)*scale)
|
||||
y=math.max(y,-(bottom or 0)*scale)
|
||||
end
|
||||
return x,y
|
||||
end
|
||||
|
||||
function P.IsDefaultChatSystem(system)
|
||||
local saved=RuenUIDB.chatDefaultSize
|
||||
local a=system and system.anchorInfo
|
||||
if not saved or not a or a.point~="BOTTOMLEFT" or a.relativeTo~="UIParent"
|
||||
or a.relativePoint~="BOTTOMLEFT" or a.offsetX~=20 or a.offsetY~=45 then return false end
|
||||
or a.relativePoint~="BOTTOMLEFT" then return false end
|
||||
local x,y=P.DefaultChatOrigin()
|
||||
-- Native saves can retain either the requested or the clamped origin.
|
||||
if not (a.offsetX==20 or (a.offsetX and math.abs(a.offsetX-x)<.5))
|
||||
or not (a.offsetY==45 or (a.offsetY and math.abs(a.offsetY-y)<.5)) then return false end
|
||||
local S=Enum.EditModeChatFrameSetting
|
||||
local values={}
|
||||
for _,v in ipairs(system.settings or {}) do values[v.setting]=v.value end
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
local _, P = ...
|
||||
P.version = 5
|
||||
P.release = "2026.11.22.5-beta.1"
|
||||
P.release = "2026.11.22.6-beta.1"
|
||||
P.graphicsVersion = 2
|
||||
P.layoutName = "Ruen UI - Clear ESDF"
|
||||
function P.IsOurLayout(layout)
|
||||
|
||||
@ -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.22.5-beta.1
|
||||
## Version: 2026.11.22.6-beta.1
|
||||
## Author: Ruen UI contributors
|
||||
## SavedVariables: RuenUIDB
|
||||
## SavedVariablesPerCharacter: RuenUICharacter
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
|
||||
Панель питомца — это **10 стандартных ячеек и 2 расширения** с использованием свободных ячеек второй страницы панели действий. Игра не получает дополнительные стандартные ячейки питомца. Если свободных ячеек нет, Ruen сообщает об этом и не затирает существующие способности.
|
||||
|
||||
Чтобы отменить увеличение или перемещение чата, закройте режим редактирования, выйдите из боя и введите `/ruen chat reset`. Команда восстановит удобный размер чата внизу слева с учётом доступного места и переместит соседние панели. Ширина занимает до 30% доступной области интерфейса (не более 620 единиц), не перекрывая центральные панели; высота — 190–260 единиц. Например, для области интерфейса 1920×1080 размер чата будет 570×230, а для 2133×1200 — 620×260. Масштаб интерфейса учитывается. Размер по умолчанию автоматически подстраивается при изменении доступного места. Ручное изменение размера или положения отключает эту подстройку; ширина по-прежнему ограничивается, чтобы не закрывать центральные панели. Выбранный шрифт сохраняется. Обе команды сброса используют одинаковые размеры по умолчанию. `/ruen layout reset` сбрасывает положение всех элементов режима редактирования WoW, включая эффекты, питомца, боссов, арену и предупреждения рейда, затем применяет расположение и размеры Ruen. Также пересчитываются сумки, подсказки и уведомления, перемещаются открытые стандартные окна, сбрасывается положение окон Spoken/Compendium и карты Leatrix Maps. Неподдерживаемые элементы перечисляются в чате; сторонние аддоны вне комплекта управляют своим расположением самостоятельно. Графика, клавиши, способности, шрифт и фильтры чата, режимы перезарядок и счётчиков сохраняются. Другие расположения не меняются. Сохранённое расположение Ruen используется всеми персонажами, выбравшими его. Предыдущая строка экспорта хранится в `RuenUICharacter.layoutBeforeReset`. `/reload` загружает обновлённый код, но не отменяет сохранённые изменения расположения.
|
||||
Чтобы отменить увеличение или перемещение чата, закройте режим редактирования, выйдите из боя и введите `/ruen chat reset`. Команда восстановит удобный размер чата внизу слева с учётом доступного места и переместит соседние панели. Ширина занимает до 30% доступной области интерфейса (не более 620 единиц), не перекрывая центральные панели; высота — 190–260 единиц. Например, для области интерфейса 1920×1080 размер чата будет 570×230, а для 2133×1200 — 620×260. Масштаб интерфейса учитывается. Проверены доступные области интерфейса от 1280×720, включая форматы 16:10, 4:3 и сверхширокие экраны. Более крупный масштаб, оставляющий меньше места, не проверен; Ruen не уменьшает шрифт или общий масштаб автоматически. Размер по умолчанию автоматически подстраивается при изменении доступного места. Ручное изменение размера или положения отключает эту подстройку; ширина по-прежнему ограничивается, чтобы не закрывать центральные панели. Выбранный шрифт сохраняется. Обе команды сброса используют одинаковые размеры по умолчанию. `/ruen layout reset` сбрасывает положение всех элементов режима редактирования WoW, включая эффекты, питомца, боссов, арену и предупреждения рейда, затем применяет расположение и размеры Ruen. Также пересчитываются сумки, подсказки и уведомления, перемещаются открытые стандартные окна, сбрасывается положение окон Spoken/Compendium и карты Leatrix Maps. Неподдерживаемые элементы перечисляются в чате; сторонние аддоны вне комплекта управляют своим расположением самостоятельно. Графика, клавиши, способности, шрифт и фильтры чата, режимы перезарядок и счётчиков сохраняются. Другие расположения не меняются. Сохранённое расположение Ruen используется всеми персонажами, выбравшими его. Предыдущая строка экспорта хранится в `RuenUICharacter.layoutBeforeReset`. `/reload` загружает обновлённый код, но не отменяет сохранённые изменения расположения.
|
||||
|
||||
После обновления проверьте `/ruen status`, цифровые клавиши, смену защитной/пассивной стойки, вызов питомца и сумки при выбранной цели. Для сравнения FPS запустите `/ruen bench` и три минуты играйте, не переключаясь в другое окно: фоновое ограничение FPS иначе исказит результат. Следующая строка показывает время CPU Ruen, если встроенный профилировщик доступен. При рывках сообщите обе строки; измерение не меняет настройки графики. Подробные ограничения беты: [RELEASE-REVIEW.md](RELEASE-REVIEW.md).
|
||||
|
||||
|
||||
@ -54,7 +54,7 @@ This update keeps existing actions, personal keybindings and saved language/grap
|
||||
|
||||
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.
|
||||
|
||||
To undo an enlarged or moved chatbox, close Edit Mode and leave combat, then use `/ruen chat reset`. This restores a readable, screen-sized chatbox at the lower left and repositions the nearby bars. The default uses up to 30% of the usable UI width (capped at 620), fits clear of the center action bars, and is 190–260 UI units tall depending on screen space. For example, a 1920×1080 usable UI gets 570×230; 2133×1200 gets 620×260. Larger UI scales reduce the usable space, so high-resolution displays with large UI elements still get an appropriate fit. An untouched default follows viewport changes automatically. Manual size/position edits opt out of that automatic sizing; width still fits clear of the center bars. Font preferences are preserved. Both chat reset and full layout reset use this same sizing policy. `/ruen layout reset` restores every native Edit Mode system position (including buffs/debuffs, pet/boss/arena frames, raid warnings and hidden class elements), then applies Ruen's default controls and sizes. It also resets bag/tooltip/alert placement caches, repositions the current native panels, restores Spoken narration/Compendium positions and invokes Leatrix Maps' own map-position reset. Frames that are not currently visible receive their saved native positions when they appear. Unsupported native systems or changed companion APIs are reported explicitly instead of silently claiming success; unrelated third-party addons retain their own layout controls. Both save the result without changing graphics, keybindings, assigned abilities, chat font/filter preferences or the selected cooldown/meter modes. Other Edit Mode layouts are retained. Ruen layouts are shared, so their saved geometry also applies to other characters using that layout. The previous layout export is retained in `RuenUICharacter.layoutBeforeReset` for recovery. `/reload` loads updated code; it does not itself undo your saved layout edits. `/ruen apply` reapplies gameplay/key defaults and selects the existing saved layout, so it is not the command for undoing a chat resize.
|
||||
To undo an enlarged or moved chatbox, close Edit Mode and leave combat, then use `/ruen chat reset`. This restores a readable, screen-sized chatbox at the lower left and repositions the nearby bars. The default uses up to 30% of the usable UI width (capped at 620), fits clear of the center action bars, and is 190–260 UI units tall depending on screen space. For example, a 1920×1080 usable UI gets 570×230; 2133×1200 gets 620×260. Larger UI scales reduce the usable space. Layout checks cover usable UI areas of at least 1280×720, including 16:10, 4:3 and ultrawide displays; larger UI scales that leave less space are not validated. Ruen respects your UI scale and font instead of shrinking text automatically. An untouched default follows viewport changes automatically. Manual size/position edits opt out of that automatic sizing; width still fits clear of the center bars. Font preferences are preserved. Both chat reset and full layout reset use this same sizing policy. `/ruen layout reset` restores every native Edit Mode system position (including buffs/debuffs, pet/boss/arena frames, raid warnings and hidden class elements), then applies Ruen's default controls and sizes. It also resets bag/tooltip/alert placement caches, repositions the current native panels, restores Spoken narration/Compendium positions and invokes Leatrix Maps' own map-position reset. Frames that are not currently visible receive their saved native positions when they appear. Unsupported native systems or changed companion APIs are reported explicitly instead of silently claiming success; unrelated third-party addons retain their own layout controls. Both save the result without changing graphics, keybindings, assigned abilities, chat font/filter preferences or the selected cooldown/meter modes. Other Edit Mode layouts are retained. Ruen layouts are shared, so their saved geometry also applies to other characters using that layout. The previous layout export is retained in `RuenUICharacter.layoutBeforeReset` for recovery. `/reload` loads updated code; it does not itself undo your saved layout edits. `/ruen apply` reapplies gameplay/key defaults and selects the existing saved layout, so it is not the command for undoing a chat resize.
|
||||
|
||||
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.
|
||||
|
||||
|
||||
@ -1,10 +1,18 @@
|
||||
# Release review — 2026.11.22.5-beta.1
|
||||
# Release review — 2026.11.22.6-beta.1
|
||||
|
||||
## Chat resolution follow-up (2026-11-22)
|
||||
|
||||
- Kept the user-approved sizing limits: up to 30% of usable UI width (620 maximum), 190–260 height, with width fitted against the combat bars. The cap keeps long lines manageable on wide screens; the shorter laptop default leaves room for notifications and group controls. This is a balanced default, not a claim of one optimal size for every reader/font.
|
||||
- Corrected a real native compatibility gap: the chat selection extends 32 units to the left, so the engine clamps a requested x=20 to x=32. The former exact x=20 ownership check interpreted this as a manual move and stopped adaptive sizing. The default origin now reads the frame's clamp insets, accounts for scale and accepts both requested and clamped saved origins. Deliberate size/position edits still opt out. Native selection geometry and clamp behavior were checked against the [client's UI source](https://github.com/Gethe/wow-ui-source/blob/bebcb6bf309cf41b41bd74f8ca651e6a105b2676/Interface/AddOns/Blizzard_EditMode/Shared/EditModeSystemTemplates.xml#L171).
|
||||
- The left control shelf follows the layout margin rather than the chat's extra text inset. Class rows now reserve their measured height instead of imposing a 30-unit floor on 24-unit stance/aspect controls. This recovers six vertical units for the full hunter HUD at 720p while preserving button size and the cast-label/swing gap.
|
||||
- Regression fixtures now model native chat clamping and current Forever bar dimensions: 505.8×40.5 center rows and 252×82.8 side bars. The full matrix covers 20 display/scale/reset configurations, including 16:10, 4:3, ultrawide and 4K at multiple scales. Repeated shrink/grow cycles, combat deferral, clamped native save/reload and custom-size preservation are exercised separately. The previous simplified unclamped fixture missed the resize bug; it is no longer used for the matrix.
|
||||
- The user confirmed the roomier chat looks better before this follow-up. These compatibility fixes still require a live reload; repeated live monitor/scale switching and every class/raid combination have not been observed. No per-frame layout work was added.
|
||||
|
||||
## Readable chat defaults (2026-11-22)
|
||||
|
||||
- New layouts and both reset commands replace the fixed 380×150 chatbox with a default based on usable UI dimensions: up to 30% width, capped at 620, and 190–260 height. Width still fits against the actual center action row. Examples: 570×230 at 1920×1080 UI units; 620×260 at 2133×1200. High UI scales are accounted for without relying on physical resolution alone.
|
||||
- Placement remains at the lower left, with notification space and the compact utility bars reflowed above it. An untouched default also adapts on viewport changes; saved native geometry is read without modification and a bounded account record identifies the default. Manual size/position edits opt out of automatic sizing (width still respects the center-bar clearance), and font preferences are retained. No polling, new hooks or additional idle work were added.
|
||||
- Checks cover fresh installation, both explicit resets, native layout reactivation, all nine classes, custom dimensions, unrelated settings, and the largest saved default surviving a switch to 720p. Existing installations receive the new size with `/reload` followed by `/ruen chat reset` (or full layout reset). Live confirmation of the larger chat remains pending.
|
||||
- Checks cover fresh installation, both explicit resets, native layout reactivation, all nine classes, custom dimensions, unrelated settings, and the largest saved default surviving a switch to 720p. Existing installations receive the new size with `/reload` followed by `/ruen chat reset` (or full layout reset). The user confirmed the larger chat is better.
|
||||
|
||||
## Complete layout recovery follow-up (2026-11-22)
|
||||
|
||||
@ -73,7 +81,7 @@ The common 96-button action layout is retained. It provides capacity, not automa
|
||||
| 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. The preceding beta8 review checked all seven unchanged pinned download endpoints: 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, responsive chat size, fresh/reset/persistence/manual-size checks and chat font preservation/conditional restore; chat input/tabs and native panels counted without relocating their secure managers. |
|
||||
| Layout matrix | 9 classes × 8 environments × 10 display/scale/reset cases, repeated with native aura/cast/combo/BG-widget footprints: **1,440 scenarios, zero modeled unintended intersections, offscreen controls, undersized group frames or wrong meter visibility**. Each display exercises its new chat defaults, plus a large saved chat on a smaller display without resetting it. Prior restricted-aura stress fixtures are reset before the base matrix. This is geometry/API simulation, not screenshots of every live class. |
|
||||
| Layout matrix | 9 classes × 8 environments × 20 display/scale/reset cases, repeated with native aura/cast/combo/BG-widget footprints: **2,880 scenarios, zero modeled unintended intersections, offscreen controls, undersized group frames or wrong meter visibility**. Each display exercises its new chat defaults, plus a large saved chat on a smaller display without resetting it. 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. 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. |
|
||||
@ -82,7 +90,7 @@ The common 96-button action layout is retained. It provides capacity, not automa
|
||||
| Benchmark diagnostics | Simulated 60 FPS readings with repeated 200 ms frame stalls expose the old blind spot. Per-frame capture, tail calculation, long stalls, loading/pause exclusion, five-report bounds and mutual exclusion passed alongside native profiler API availability/opaque values, per-run slow-tick deltas, 180-snapshot bound and graphics-change warnings. Recent timing is a rolling 60-tick mean, not an exact per-frame maximum. |
|
||||
| Privacy/package | First-party allowlist, blank hardware defaults, dependency-license review and scan for local paths/account data. Only legacy migration identifiers retain the former addon name. Release ZIP has a per-file SHA-256 manifest and a separate ZIP checksum. |
|
||||
|
||||
Environments: solo, outdoor party, dungeon, 10/20/40-player raid and 10/40-player battleground. Displays: 1280×720 (fresh default and retained large-screen chat), 1366×768, 1920×1080 at two scales, 2133×1200, 2560×1440 at two scales and 3840×2160 at two scales.
|
||||
Environments: solo, outdoor party, dungeon, 10/20/40-player raid and 10/40-player battleground. Displays: 1280×720 (fresh default and retained large-screen chat), 1366×768, 1920×1080 at two scales, 2133×1200, 2560×1440 at two scales, 3840×2160 at three scales, 1280×800, 1440×900, 1600×900, 1920×1200, 2560×1600, 1280×1024, 3440×1440 at two scales and 5120×1440. The smallest tested usable UI area is 1280×720; a high UI scale that leaves less space is outside this matrix. Ruen does not change UI scale or shrink text to claim a fit.
|
||||
|
||||
## Performance review
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ from pathlib import Path
|
||||
import zipfile
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
VERSION = '2026.11.22.5-beta.1'
|
||||
VERSION = '2026.11.22.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',
|
||||
|
||||
@ -10,6 +10,23 @@ for _,case in ipairs({{1280,720,380,190},{1366,768,400,190},
|
||||
local w,h=P.DefaultChatSize()
|
||||
assert(w==case[3] and h==case[4],'incorrect chat size for '..width..'x'..height)
|
||||
end
|
||||
-- Native selection margins clamp chat without the player moving it. Accept
|
||||
-- both native serializations, scale the margin, and reject actual saved moves.
|
||||
UIParent.GetEffectiveScale=function()return .64 end
|
||||
ChatFrame1={GetClampRectInsets=function()return -32,25,60,-32 end,
|
||||
GetEffectiveScale=function()return .64 end}
|
||||
local x,y=P.DefaultChatOrigin();assert(x==32 and y==45)
|
||||
Enum={EditModeChatFrameSetting={WidthHundreds=0,WidthTensAndOnes=1,HeightHundreds=2,HeightTensAndOnes=3}}
|
||||
RuenUIDB={chatDefaultSize={width=620,height=260}}
|
||||
local system={anchorInfo={point='BOTTOMLEFT',relativeTo='UIParent',relativePoint='BOTTOMLEFT',offsetX=20,offsetY=45},
|
||||
settings={{setting=0,value=6},{setting=1,value=20},{setting=2,value=2},{setting=3,value=60}}}
|
||||
assert(P.IsDefaultChatSystem(system));system.anchorInfo.offsetX=32;assert(P.IsDefaultChatSystem(system))
|
||||
system.anchorInfo.offsetX=60;assert(not P.IsDefaultChatSystem(system),'custom anchor misidentified as default')
|
||||
ChatFrame1.GetEffectiveScale=function()return .96 end
|
||||
x,y=P.DefaultChatOrigin();assert(x==48 and y==48,'native margins were not scaled')
|
||||
system.anchorInfo.offsetX=48;system.anchorInfo.offsetY=48;assert(P.IsDefaultChatSystem(system))
|
||||
system.settings[4].value=10;assert(not P.IsDefaultChatSystem(system),'custom height misidentified as default')
|
||||
ChatFrame1.GetClampRectInsets=nil;x,y=P.DefaultChatOrigin();assert(x==20 and y==45,'missing margin API fallback')
|
||||
local font,size,flags='native-cyrillic-capable-font',12,'OUTLINE'
|
||||
local changes=0
|
||||
ChatFrame1={GetFont=function()return font,size,flags end}
|
||||
|
||||
@ -169,7 +169,13 @@ local function enrich(f,name)
|
||||
if not self.point then return 0,0,w,h end
|
||||
local p,relative,rp,x,y=unpack(self.point)
|
||||
local l,b,rw,rh=relative:rect()
|
||||
return l+rw*fraction(rp,'x')+x*scale-w*fraction(p,'x'),b+rh*fraction(rp,'y')+y*scale-h*fraction(p,'y'),w,h
|
||||
l,b=l+rw*fraction(rp,'x')+x*scale-w*fraction(p,'x'),b+rh*fraction(rp,'y')+y*scale-h*fraction(p,'y')
|
||||
if self.clampInsets then
|
||||
local cl,cr,ct,cb=unpack(self.clampInsets)
|
||||
l=math.max(-cl*scale,math.min(l,UIParent.w-w-cr*scale))
|
||||
b=math.max(-cb*scale,math.min(b,UIParent.h-h-ct*scale))
|
||||
end
|
||||
return l,b,w,h
|
||||
end
|
||||
function f:GetLeft() local l=self:rect();return l/(self:GetEffectiveScale()/UIParent.scale) end
|
||||
function f:GetBottom() local _,b=self:rect();return b/(self:GetEffectiveScale()/UIParent.scale) end
|
||||
@ -184,6 +190,10 @@ for _,name in ipairs(barNames) do enrich(_G[name],name) end
|
||||
for _,name in ipairs({'ChatFrame1','PartyFrame','CompactRaidFrameContainer','UIParent','MinimapCluster','BagsBar','MicroMenuContainer','ObjectiveTrackerFrame','GameTooltip','StanceBar','PetActionBar','PossessActionBar','MultiCastActionBarFrame','MainMenuBarVehicleLeaveButton','ExtraAbilityContainer','PlayerCastingBarFrame','PlayerFrame','PetFrame','TargetFrame','TargetFrameToT','FocusFrame'}) do CreateFrame('Frame',name) end
|
||||
UIParent.w,UIParent.h,UIParent.scale=1706.4,960,1.25
|
||||
ChatFrame1.w,ChatFrame1.h=380,150;ChatFrame1:SetPoint('BOTTOMLEFT',UIParent,'BOTTOMLEFT',20,45)
|
||||
-- Native EditModeChatFrameSystemTemplate.Selection extends beyond the text
|
||||
-- area (-32, +25, +60, -32). UpdateClampOffsets uses those actual bounds.
|
||||
ChatFrame1.clampInsets={-32,25,60,-32}
|
||||
function ChatFrame1:GetClampRectInsets()return unpack(self.clampInsets)end
|
||||
PartyFrame.w,PartyFrame.h=230,300;CompactRaidFrameContainer.w,CompactRaidFrameContainer.h=360,304
|
||||
PartyFrame.shown=false;CompactRaidFrameContainer.shown=false
|
||||
GameTooltip.w,GameTooltip.h=220,120;GameTooltip.shown=false
|
||||
@ -205,6 +215,7 @@ local byKind={[Enum.EditModeSystem.ActionBar]={MainActionBar,MultiBarBottomLeft,
|
||||
local function setting(s,k) for _,v in ipairs(s.settings) do if v.setting==k then return v.value end end end
|
||||
byKind[Enum.EditModeSystem.ActionBar][Enum.EditModeActionBarSystemIndices.PetActionBar]=PetActionBar
|
||||
byKind[Enum.EditModeSystem.ChatFrame]={ChatFrame1}
|
||||
local actualBarGeometry=false
|
||||
C_EditMode.SetActiveLayout=function(i)
|
||||
manager.layoutInfo.activeLayout=i
|
||||
for _,s in ipairs(manager:GetActiveLayoutInfo().systems) do
|
||||
@ -214,6 +225,7 @@ C_EditMode.SetActiveLayout=function(i)
|
||||
if s.system==Enum.EditModeSystem.ActionBar and (s.systemIndex or 1)<=8 then
|
||||
local rows=setting(s,Enum.EditModeActionBarSetting.NumRows) or 1
|
||||
f.w=(rows==1 and 495 or 252);f.h=rows*36+(rows-1)*2
|
||||
if actualBarGeometry then f.w=(rows==1 and 505.8 or 252);f.h=rows*40.5+(rows-1)*1.8 end
|
||||
elseif f==PetActionBar then
|
||||
local scale=(50+10*(setting(s,Enum.EditModeActionBarSetting.IconSize) or 3))/100
|
||||
-- Native small buttons are 30px; padding is between containers.
|
||||
@ -888,7 +900,7 @@ do
|
||||
local width,height=P.DefaultChatSize()
|
||||
assert(ChatFrame1:GetHeight()==height,'chat reset did not restore responsive height')
|
||||
assert(ChatFrame1:GetWidth()<=width and ChatFrame1:GetWidth()>=P.layoutPolicy.chat.minimumWidth,'chat reset did not fit responsive width')
|
||||
assert(ChatFrame1:GetLeft()==20 and ChatFrame1:GetBottom()==45,'chat reset did not restore anchor')
|
||||
assert(ChatFrame1:GetLeft()==32 and ChatFrame1:GetBottom()==45,'chat reset did not restore native-clamped anchor')
|
||||
end
|
||||
SlashCmdList.RUENUI('chat reset');assertChat()
|
||||
assert(equal(shared,prior),'chat reset mutated shared layout data')
|
||||
@ -900,10 +912,35 @@ do
|
||||
assert(not intersects(ChatFrame1,MultiBar6) and not intersects(ChatFrame1,MultiBar7),'reset left chat/bar overlap')
|
||||
assert(RuenUICharacter.layoutBeforeReset=='simulation-export','missing recovery export')
|
||||
C_EditMode.SetActiveLayout(manager.layoutInfo.activeLayout);assertChat()
|
||||
-- Resolution changes must work repeatedly, with the real native chat clamp,
|
||||
-- without another reset/save. Also accept native serialization of the clamp.
|
||||
local originalDisplay={UIParent.w,UIParent.h,UIParent.scale}
|
||||
for _,s in ipairs(manager:GetActiveLayoutInfo().systems)do
|
||||
if s.system==Enum.EditModeSystem.ChatFrame then s.anchorInfo.offsetX=32 end
|
||||
end
|
||||
C_EditMode.SetActiveLayout(manager.layoutInfo.activeLayout);hooks.UpdateSystems()
|
||||
local savedLayout=CopyTable(manager.layoutInfo)
|
||||
for round=1,3 do
|
||||
for _,display in ipairs({{1920,1080,1,570,230},{1280,720,1,344.5,190},
|
||||
{3440,1440,1.875,550,190},{3840,2160,2,570,230},
|
||||
{2560,1440,2,344.5,190},{2133,1200,1,620,260}})do
|
||||
UIParent.w,UIParent.h,UIParent.scale=display[1]/display[3],display[2]/display[3],display[3]
|
||||
UIParent.scripts.OnSizeChanged()
|
||||
assert(math.abs(ChatFrame1:GetWidth()-display[4])<.1 and ChatFrame1:GetHeight()==display[5],
|
||||
'chat did not follow viewport '..table.concat(display,','))
|
||||
assert(ChatFrame1:GetLeft()==32 and ChatFrame1:GetBottom()==45,'native chat margin lost')
|
||||
assert(equal(manager.layoutInfo,savedLayout),'display resize wrote shared native layout state')
|
||||
end
|
||||
end
|
||||
local w,h=ChatFrame1:GetSize()
|
||||
combat=true;UIParent.w,UIParent.h=1280,720;UIParent.scripts.OnSizeChanged()
|
||||
assert(ChatFrame1:GetWidth()==w and ChatFrame1:GetHeight()==h,'chat resize ignored combat deferral')
|
||||
combat=false;hooks.UpdateSystems();assert(ChatFrame1:GetHeight()==190,'deferred chat resize lost')
|
||||
UIParent.w,UIParent.h,UIParent.scale=unpack(originalDisplay);hooks.UpdateSystems()
|
||||
-- Routine reflow must not turn a responsive default into a mandatory size.
|
||||
ChatFrame1:SetSize(330,210);ChatFrame1:SetPoint('BOTTOMLEFT',UIParent,'BOTTOMLEFT',25,45)
|
||||
ChatFrame1:SetSize(330,210);ChatFrame1:SetPoint('BOTTOMLEFT',UIParent,'BOTTOMLEFT',60,45)
|
||||
hooks.UpdateSystems();hooks.UpdateSystems()
|
||||
assert(ChatFrame1:GetWidth()==330 and ChatFrame1:GetHeight()==210 and ChatFrame1:GetLeft()==25,
|
||||
assert(ChatFrame1:GetWidth()==330 and ChatFrame1:GetHeight()==210 and ChatFrame1:GetLeft()==60,
|
||||
'ordinary refresh replaced the player\'s chat size/position')
|
||||
-- An actual saved custom size also wins after native layout activation.
|
||||
for _,s in ipairs(manager:GetActiveLayoutInfo().systems)do
|
||||
@ -943,7 +980,7 @@ do
|
||||
combat=false;manager.IsShown=shown;manager.overrideLayoutInfo=nil;RuenUIDB.disabled=nil
|
||||
manager:GetActiveLayoutInfo().layoutName=savedName
|
||||
end
|
||||
print('PASS: saved chat and nine-class layout reset, detached native state, persistence, unrelated layout/CVar/key/action preservation, combat/edit/override/disabled guards')
|
||||
print('PASS: native-clamped chat resize cycles at six viewport/scales, normalized saved anchors, combat deferral, manual size preservation; saved chat and nine-class layout reset, detached native state, persistence, unrelated layout/CVar/key/action preservation and reset guards')
|
||||
end
|
||||
bindings.Z='USER_NEW_ACTION';actions[39]={'item',888}
|
||||
SlashCmdList.RUENUI('restore')
|
||||
@ -1270,7 +1307,7 @@ for _,case in ipairs({{2133,1200,1,2},{1920,1080,1,2},{1920,1080,1.40625,2},{136
|
||||
P.MigrateLeftBars();hooks.UpdateSystems();UIParent.scripts.OnSizeChanged()
|
||||
assert(RuenUIDB.leftBarRows==case[4],'wrong responsive row count')
|
||||
assert(MultiBar6.h==(case[4]==1 and 36 or 74) and MultiBar7.h==MultiBar6.h,'wrong native shape')
|
||||
assert(math.abs(MultiBar6:GetLeft()-ChatFrame1:GetLeft())<.01,'left shelf not aligned with chat')
|
||||
assert(math.abs(MultiBar6:GetLeft()-(ChatFrame1:GetLeft()-12))<.01,'left shelf not aligned with the chat layout margin')
|
||||
assert(math.abs(MultiBar6:GetLeft()-MultiBar7:GetLeft())<.01 and math.abs(MultiBar6:GetRight()-MultiBar7:GetRight())<.01)
|
||||
assert(gap(MultiBar7,MultiBar6)>=5.9,'left row gap')
|
||||
local dockPoint=CopyTable(MultiBar6.point);MultiBar6:SetPoint('BOTTOMLEFT',UIParent,'BOTTOMLEFT',20,215)
|
||||
@ -1540,10 +1577,14 @@ print('PASS: '..cases..' restricted-aura bag cases (target/focus/bank, 720p-4K,
|
||||
end)()
|
||||
|
||||
-- Reset the prior restricted-aura stress fixture before the base matrix.
|
||||
-- Earlier compatibility fixtures use smaller buttons. This full matrix uses
|
||||
-- Forever's measured 90% native geometry: 505.8x40.5 center rows and 252x82.8
|
||||
-- side bars. The compact legacy model understated the vertical HUD footprint.
|
||||
actualBarGeometry=true
|
||||
TargetFrame.GetAuraContainer=nil;FocusFrame.GetAuraContainer=nil
|
||||
;(function()
|
||||
local report=assert(io.open(arg[3] or '/tmp/ruen-audit-matrix.txt','w'))
|
||||
local configs={{1366,768,1},{1920,1080,1.40625},{1920,1080,1},{2560,1440,1.875},{2560,1440,1},{3840,2160,2.8125},{3840,2160,1.5},{1280,720,1},{2133,1200,1},{1280,720,1,true}}
|
||||
local configs={{1366,768,1},{1920,1080,1.40625},{1920,1080,1},{2560,1440,1.875},{2560,1440,1},{3840,2160,2.8125},{3840,2160,1.5},{1280,720,1},{2133,1200,1},{1280,720,1,true},{1280,800,1},{1440,900,1},{1600,900,1},{1920,1200,1},{2560,1600,1.5},{3440,1440,1},{3440,1440,1.875},{5120,1440,1.875},{3840,2160,2},{1280,1024,1}}
|
||||
local envs={{'solo',false,'none',0},{'party',false,'none',5},{'dungeon',true,'party',5},{'raid10',true,'raid',10},{'raid20',true,'raid',20},{'raid40',true,'raid',40},{'bg10',true,'pvp',10},{'bg40',true,'pvp',40}}
|
||||
local seen,issues,cases={},0,0
|
||||
local function note(text)
|
||||
@ -1618,7 +1659,7 @@ end)()
|
||||
end)()
|
||||
;(function()
|
||||
local report=assert(io.open((arg[3] or '/tmp/ruen-audit-matrix.txt')..'.native','w'))
|
||||
local configs={{1366,768,1},{1920,1080,1.40625},{1920,1080,1},{2560,1440,1.875},{2560,1440,1},{3840,2160,2.8125},{3840,2160,1.5},{1280,720,1},{2133,1200,1},{1280,720,1,true}}
|
||||
local configs={{1366,768,1},{1920,1080,1.40625},{1920,1080,1},{2560,1440,1.875},{2560,1440,1},{3840,2160,2.8125},{3840,2160,1.5},{1280,720,1},{2133,1200,1},{1280,720,1,true},{1280,800,1},{1440,900,1},{1600,900,1},{1920,1200,1},{2560,1600,1.5},{3440,1440,1},{3440,1440,1.875},{5120,1440,1.875},{3840,2160,2},{1280,1024,1}}
|
||||
local envs={{'solo',false,'none',0},{'party',false,'none',5},{'dungeon',true,'party',5},{'raid10',true,'raid',10},{'raid20',true,'raid',20},{'raid40',true,'raid',40},{'bg10',true,'pvp',10},{'bg40',true,'pvp',40}}
|
||||
local seen,issues,cases={},0,0
|
||||
local function note(text)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user