Files
benilla-octo/crates/benilla-app/assets/ui/OptionsFrame.xml
T
Sam SungandClaude Opus 5.5 55729baff9 Message fades and scroll ranges run in the walk; OnUpdateModel gates (#913)
Hidden chat frames kept fading their lines, a scroll frame recomputed its range on every read and fired `OnScrollRangeChanged` on every `UpdateScrollChildRect`, hidden or not, and `OnUpdateModel` fired for panes with no size or off screen.

In the reference, each of these runs in the frame's own update slot, only while shown: message frames trim and fade there; a scroll frame recomputes a range its writers marked, stores it and notifies only on a real move. The model paint fires only for a resolved rect whose screen-clamped viewport has size.

Message frames and scroll frames are now walk kinds, the range is stored and marked, and the paint applies the rect and viewport gates. benilla's options scroll measures its body's own overhang.

Tests pin the hidden fades, the stored range and its notify, and the paint gates.

Fixes #182
Fixes #175
Fixes #892

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 00:25:14 +07:00

3115 lines
215 KiB
XML

<Ui>
<!--
The Options window the game menu opens. Deviation: the 1.15 era client's single settings
window replaces the 1.12 four-panel family, which is much worse to use; the 1.12 frames
still load, hidden, for addons. Every art byte is 1.12-native or a colour fill, so era
names below cite geometry only. Hiding discards pending edits and Apply commits outright.
A slider shows the 1.12 range; an out-of-range value displays clamped, not written back.
-->
<!-- The era's 14 and 20 white fonts, outside Fonts.xml's 1.12 set; MasterFont's shadow. -->
<Font name="BenillaOptionsFontHighlightMedium" font="Fonts\FRIZQT__.TTF" virtual="true">
<Shadow>
<Offset><AbsDimension x="1" y="-1"/></Offset>
<Color r="0" g="0" b="0"/>
</Shadow>
<FontHeight><AbsValue val="14"/></FontHeight>
<Color r="1.0" g="1.0" b="1.0"/>
</Font>
<Font name="BenillaOptionsFontHighlightHuge" font="Fonts\FRIZQT__.TTF" virtual="true">
<Shadow>
<Offset><AbsDimension x="1" y="-1"/></Offset>
<Color r="0" g="0" b="0"/>
</Shadow>
<FontHeight><AbsValue val="20"/></FontHeight>
<Color r="1.0" g="1.0" b="1.0"/>
</Font>
<Script><![CDATA[
-- UIOptionsFrame.xml loads first and owns the uvars; each row captures its default at
-- OnLoad.
-- Deviation: AUTO_QUEST_WATCH is the string "1". 1.12 assigns the number 1 (l.122) but
-- every consumer compares against "1" (QuestLogFrame.lua:64/68); 1 ~= "1" in Lua 5.0.
AUTO_QUEST_WATCH = "1"
RegisterForSave("AUTO_QUEST_WATCH")
-- UIOptionsFrame.lua:370-376: Blizzard_CombatText is LoadOnDemand, so the master loads it.
function BenillaCombatText_UpdateOrLoad()
if ( SHOW_COMBAT_TEXT == "1" ) then
UIParentLoadAddOn("Blizzard_CombatText")
end
if ( CombatText_UpdateDisplayedMessages ) then
CombatText_UpdateDisplayedMessages()
end
end
-- The Remove Chat Hover Delay row's applyFunc (UIOptionsFrame.lua:216).
function BenillaChatFrame_ApplyMouseOverDelay()
if SetChatMouseOverDelay then -- nil in a VM loaded without the chat files
SetChatMouseOverDelay(REMOVE_CHAT_DELAY)
end
end
-- Show Tutorials' setter (UIOptionsFrame.lua:318-327); there is no tutorial CVar. The `~=`
-- guard is the reference's: re-ticking an on row must not re-arm dismissed tutorials.
function BenillaOptionsFrame_SetTutorialsEnabled(value)
if ( tonumber(value) ~= TutorialsEnabled() ) then
if ( value == "1" ) then
ResetTutorials()
TutorialFrameCheckButton:SetChecked(1)
else
ClearTutorials()
end
TutorialFrame_HideAllAlerts()
end
end
-- The two plate rows' store: FrameXML's own NAMEPLATES_ON/FRIENDNAMEPLATES_ON, the number 1
-- or nil (a "0" would be truthy), applied through the verbs as the bindings do.
function BenillaOptionsFrame_GetEnemyPlates()
return NAMEPLATES_ON
end
function BenillaOptionsFrame_SetEnemyPlates(value)
if ( value == "1" ) then
NAMEPLATES_ON = 1
ShowNameplates()
else
NAMEPLATES_ON = nil
HideNameplates()
end
end
function BenillaOptionsFrame_GetFriendlyPlates()
return FRIENDNAMEPLATES_ON
end
function BenillaOptionsFrame_SetFriendlyPlates(value)
if ( value == "1" ) then
FRIENDNAMEPLATES_ON = 1
ShowFriendNameplates()
else
FRIENDNAMEPLATES_ON = nil
HideFriendNameplates()
end
end
-- The category tree in list order; keys are the row name suffixes.
BENILLA_OPTIONS_CATEGORY_KEYS = {
"Controls", "Interface", "ActionBars", "Combat", "Chat", "Keybindings", "Nameplates",
"Graphics", "Audio",
}
-- The era UIParent draws smaller than our 768-unit canvas; a chosen value, not the
-- reference's.
BENILLA_ERA_WINDOW_SCALE = 0.78
function BenillaOptionsFrame_UpdateScale()
-- The era panel's checkFit: it also shrinks to fit the screen.
local k = BENILLA_ERA_WINDOW_SCALE
local wFit = GetScreenWidth() / 940
local hFit = GetScreenHeight() / 744
if wFit < k then k = wFit end
if hFit < k then k = hFit end
BenillaOptionsFrame:SetScale(k)
end
-- The era tab width, label + 40, measured after the window's OnShow sets the scale:
-- the tabs' own OnShows run before it, children first.
function BenillaOptionsTab_FitWidth(tab)
tab:SetWidth(getglobal(tab:GetName() .. "Text"):GetStringWidth() + 40)
end
-- The wash at the era atlas size, in the 1.14 hover steel-blue.
function BenillaOptionsCategoryRow_OnLoad(row, key, label)
row.categoryKey = key
row.pageTitle = label
row:SetText(label)
local bg = getglobal(row:GetName() .. "Bg")
bg:SetWidth(187)
bg:SetHeight(21)
bg:SetVertexColor(0.196, 0.388, 0.8)
end
-- 1.14's OptionsList_SelectButton. SetText("") ends a search and re-enters here.
function BenillaOptionsFrame_SelectCategory(key)
BenillaOptionsFrame.selectedCategory = key
if BenillaOptionsFrameSearchBox:GetText() ~= "" then
BenillaOptionsFrameSearchBox:SetText("")
return -- the restore re-entered with this key and finished
end
for _, k in ipairs(BENILLA_OPTIONS_CATEGORY_KEYS) do
local row = getglobal("BenillaOptionsFrameCategoryListRow" .. k)
local bg = getglobal("BenillaOptionsFrameCategoryListRow" .. k .. "Bg")
if k == key then
bg:SetVertexColor(1, 1, 0)
bg:Show()
row:SetTextFontObject("GameFontHighlight")
BenillaOptionsFrameContainerTitle:SetText(row.pageTitle)
else
bg:SetVertexColor(0.196, 0.388, 0.8)
bg:Hide()
row:SetTextFontObject("GameFontNormal")
end
end
for k in pairs(BENILLA_OPTIONS_PAGE_ROWS) do
local body = getglobal("BenillaOptionsFrameContainerBody" .. k)
if k == key then body:Show() else body:Hide() end
end
-- A category switch starts at the top, as the era ScrollBox does per category.
BenillaOptionsFrameContainerScroll:SetVerticalScroll(0)
-- Leaving Keybindings disarms a pending capture, which must never outlive the page.
local kb = getglobal("BenillaOptionsFrameContainerBodyKeybindings")
if key == "Keybindings" then
kb:Show()
BenillaKeyBindingsPage_Refresh()
BenillaOptionsFrameContainerUnbind:Show()
BenillaOptionsFrameContainerDefaults:Enable()
else
kb:Hide()
BenillaKeyBindings_SetSelected(nil)
BenillaKeyBindings_Output("")
BenillaOptionsFrameContainerUnbind:Hide()
if BENILLA_OPTIONS_PAGE_ROWS[key] then
BenillaOptionsPage_Refresh(key)
BenillaOptionsFrameContainerDefaults:Enable()
else
BenillaOptionsFrameContainerDefaults:Disable()
end
end
end
-- ── Search: the era SettingsPanel search ──
-- Tags are labels uppercased, matched by plain substring and scored by matched length.
-- Results are the live rows, so writes work mid-search.
function BenillaOptionsSearch_Words(text)
local up = string.upper(text)
local words = { up }
for w in string.gfind(up, "([^, ]+)") do
table.insert(words, w)
end
return words
end
-- The era's MatchesSearchTags score, with a plain find.
function BenillaOptionsSearch_Score(tag, words)
for _, w in ipairs(words) do
local first, last = string.find(tag, w, 1, true)
if first then return last - first end
end
return nil
end
function BenillaOptionsSearch_FindMatches(text)
local words = BenillaOptionsSearch_Words(text)
local buckets, scores = {}, {}
for _, key in ipairs(BENILLA_OPTIONS_CATEGORY_KEYS) do
if BENILLA_OPTIONS_PAGE_ROWS[key] then
for _, rkey in ipairs(BENILLA_OPTIONS_PAGE_ROWS[key]) do
local row = getglobal("BenillaOptionsFrameContainerBody" .. key .. rkey)
local s = BenillaOptionsSearch_Score(row.searchTag, words)
if s then
if not buckets[s] then
buckets[s] = {}
table.insert(scores, s)
end
table.insert(buckets[s], { key = key, rkey = rkey })
end
end
end
end
-- Keybinding matches join the buckets; their rkey is the binding index.
for _, m in ipairs(BenillaKeyBindings_SearchMatches(words)) do
if not buckets[m.score] then
buckets[m.score] = {}
table.insert(scores, m.score)
end
table.insert(buckets[m.score], { key = "Keybindings", rkey = m.index })
end
table.sort(scores, function(a, b) return a > b end)
local groups, order = {}, {}
for _, s in ipairs(scores) do
for _, m in ipairs(buckets[s]) do
if not groups[m.key] then
groups[m.key] = {}
table.insert(order, m.key)
end
table.insert(groups[m.key], m.rkey)
end
end
return order, groups
end
-- ── The page scroll ──
-- Only frames hung off the body's top are measured, so the size converges.
function BenillaOptionsScroll_ContentBottom()
local bottom = nil
local function take(name)
local f = getglobal(name)
if f and f:IsVisible() then
local b = f:GetBottom()
if b and (not bottom or b < bottom) then bottom = b end
end
end
for _, key in ipairs(BENILLA_OPTIONS_CATEGORY_KEYS) do
if BENILLA_OPTIONS_PAGE_ROWS[key] then
take("BenillaOptionsFrameContainerBodySearchHead" .. key)
for _, rkey in ipairs(BENILLA_OPTIONS_PAGE_ROWS[key]) do
take("BenillaOptionsFrameContainerBody" .. key .. rkey)
end
end
end
take("BenillaOptionsFrameContainerBodySearchHeadKeybindings")
for i = 1, BENILLA_KEYBINDINGS_SEARCH_ROWS do
take("BenillaOptionsFrameContainerBodyKeybindSearch" .. i)
end
return bottom
end
-- The page's range is the body's overhang, the content Fit measures: the engine's range
-- also counts the Keybindings list's faux scroll child, which is sized to every row.
function BenillaOptionsScroll_Range(sf)
local range = BenillaOptionsFrameContainerBody:GetHeight() - sf:GetHeight()
if range > 0 then return range end
return 0
end
-- From OnUpdate, off the previous frame's rects; SetWidth and SetHeight invalidate layout.
function BenillaOptionsScroll_Fit()
local sf = BenillaOptionsFrameContainerScroll
local body = BenillaOptionsFrameContainerBody
local fw, fh = sf:GetWidth(), sf:GetHeight()
if not fw or fw <= 0 or not fh or fh <= 0 then return end
if math.abs(body:GetWidth() - fw) >= 0.5 then body:SetWidth(fw) end
local h = fh
local top, bottom = body:GetTop(), BenillaOptionsScroll_ContentBottom()
if top and bottom then
local content = (top - bottom) + BENILLA_SCROLL_PAD
if content > h then h = content end
end
if math.abs(body:GetHeight() - h) >= 0.5 then
body:SetHeight(h)
sf:UpdateScrollChildRect()
-- The bar follows the body, which the range notify misses when the engine's range,
-- a whole-subtree union, does not move.
BenillaScroll_SyncBar(sf)
end
end
-- The era SettingsList layout: the head at (10,-12), each next at (0,-9), as in the XML.
function BenillaOptionsSearch_Place(name, prev)
local f = getglobal(name)
f:ClearAllPoints()
if prev then
f:SetPoint("TOPLEFT", prev, "BOTTOMLEFT", 0, -9)
f:SetPoint("TOPRIGHT", prev, "BOTTOMRIGHT", 0, -9)
else
f:SetPoint("TOPLEFT", "BenillaOptionsFrameContainerBody", "TOPLEFT", 10, -12)
f:SetPoint("TOPRIGHT", "BenillaOptionsFrameContainerBody", "TOPRIGHT", -20, -12)
end
end
-- Back on the XML chain after a search; a test holds the two equal.
function BenillaOptionsPage_Layout(key)
local prev = nil
for _, rkey in ipairs(BENILLA_OPTIONS_PAGE_ROWS[key]) do
local name = "BenillaOptionsFrameContainerBody" .. key .. rkey
BenillaOptionsSearch_Place(name, prev)
getglobal(name):Show()
prev = name
end
end
-- The title and no-match strings are ours: the era's are not in its UI source.
function BenillaOptionsSearch_Display(text)
BenillaOptionsFrameContainerScroll:SetVerticalScroll(0)
for k in pairs(BENILLA_OPTIONS_PAGE_ROWS) do
getglobal("BenillaOptionsFrameContainerBody" .. k):Show()
for _, rkey in ipairs(BENILLA_OPTIONS_PAGE_ROWS[k]) do
getglobal("BenillaOptionsFrameContainerBody" .. k .. rkey):Hide()
end
getglobal("BenillaOptionsFrameContainerBodySearchHead" .. k):Hide()
end
getglobal("BenillaOptionsFrameContainerBodyKeybindings"):Hide()
getglobal("BenillaOptionsFrameContainerBodySearchHeadKeybindings"):Hide()
for i = 1, BENILLA_KEYBINDINGS_SEARCH_ROWS do
getglobal("BenillaOptionsFrameContainerBodyKeybindSearch" .. i):Hide()
end
BenillaKeyBindingsPage.searchPainted = nil
BenillaKeyBindings_SetSelected(nil)
BenillaOptionsFrameContainerUnbind:Hide()
BenillaOptionsFrameContainerTitle:SetText("Search Results")
BenillaOptionsFrameContainerDefaults:Hide()
local order, groups = BenillaOptionsSearch_FindMatches(text)
if table.getn(order) == 0 then
BenillaOptionsFrameContainerBodyNoResults:Show()
return
end
BenillaOptionsFrameContainerBodyNoResults:Hide()
local prev = nil
for _, key in ipairs(order) do
local head = "BenillaOptionsFrameContainerBodySearchHead" .. key
BenillaOptionsSearch_Place(head, prev)
getglobal(head):Show()
prev = head
if key == "Keybindings" then
BenillaKeyBindingsPage.searchPainted = {}
local shown = 0
for _, index in ipairs(groups[key]) do
if shown < BENILLA_KEYBINDINGS_SEARCH_ROWS then
shown = shown + 1
local name = "BenillaOptionsFrameContainerBodyKeybindSearch" .. shown
BenillaKeyBindings_PaintBindRow(name, index)
BenillaOptionsSearch_Place(name, prev)
getglobal(name):Show()
BenillaKeyBindingsPage.searchPainted[name] = index
prev = name
end
end
else
local placed = {}
for _, rkey in ipairs(groups[key]) do
local row = getglobal("BenillaOptionsFrameContainerBody" .. key .. rkey)
if row.parentRow and not placed[row.parentRow] then
placed[row.parentRow] = 1
local pname = "BenillaOptionsFrameContainerBody" .. key .. row.parentRow
BenillaOptionsSearch_Place(pname, prev)
getglobal(pname):Show()
prev = pname
end
if not placed[rkey] then
placed[rkey] = 1
local name = "BenillaOptionsFrameContainerBody" .. key .. rkey
BenillaOptionsSearch_Place(name, prev)
row:Show()
prev = name
end
end
BenillaOptionsPage_Refresh(key)
end
end
end
function BenillaOptionsSearch_Restore()
BenillaOptionsFrameContainerScroll:SetVerticalScroll(0)
for k in pairs(BENILLA_OPTIONS_PAGE_ROWS) do
BenillaOptionsPage_Layout(k)
getglobal("BenillaOptionsFrameContainerBodySearchHead" .. k):Hide()
end
for i = 1, BENILLA_KEYBINDINGS_SEARCH_ROWS do
getglobal("BenillaOptionsFrameContainerBodyKeybindSearch" .. i):Hide()
end
getglobal("BenillaOptionsFrameContainerBodySearchHeadKeybindings"):Hide()
BenillaKeyBindingsPage.searchPainted = nil
BenillaOptionsFrameContainerBodyNoResults:Hide()
BenillaOptionsFrameContainerDefaults:Show()
BenillaOptionsFrame_SelectCategory(BenillaOptionsFrame.selectedCategory or "Controls")
end
function BenillaOptionsSearch_OnTextChanged(text)
if text == BenillaOptionsFrame.searchText then return end
local had = BenillaOptionsFrame.searchText and BenillaOptionsFrame.searchText ~= ""
BenillaOptionsFrame.searchText = text
if text == "" then
if had then BenillaOptionsSearch_Restore() end
else
BenillaOptionsSearch_Display(text)
end
end
-- ── The setting pages: 1.12 rows in the era Settings grammar ──
-- Descriptions 1.12 lacks take a BENILLA_ prefix.
BENILLA_TOOLTIP_RENDER_SCALE =
"Draws the 3D world at a fraction of the window's resolution, or larger than it. "
.. "The interface is unaffected at any setting.\n\n"
.. "Below 100% trades sharpness for frame rate; above 100% is supersampling, which "
.. "smooths edges at the cost of frame rate. Applies when you click Apply."
-- 1.12 has no such checkbox.
BENILLA_TOOLTIP_BACKGROUND_SOUND =
"Keeps the game's sound playing while you are working in another window.\n\n"
.. "With this off, switching away silences the game and switching back restores it. "
.. "Sounds keep running while they are silenced, so a long one may have finished by "
.. "the time you return."
-- 1.12's WINDOWED_MODE text describes a checkbox and exclusive-mode gamma.
BENILLA_TOOLTIP_DISPLAY_MODE =
"Windowed (Fullscreen) fills the screen with a borderless window; Windowed runs in "
.. "an ordinary one.\n\n"
.. "There is no exclusive fullscreen mode. WoW itself removed one in 8.0.1, and "
.. "modern Classic offers these same two."
-- 1.12's GAMMA text points at gray-bar art this page does not have.
BENILLA_TOOLTIP_BRIGHTNESS =
"Lightens or darkens the whole picture — nights, caves and interiors are what it is "
.. "for.\n\n"
.. "This is the same correction 1.12 applied through the display's own gamma ramp, "
.. "which it could only do in exclusive fullscreen. benilla applies it to the "
.. "finished image instead, so it works in both display modes."
BENILLA_OPTIONS_PAGE_ROWS = {
-- The era Controls order first; the rest follow their 1.12 box's columns.
Controls = {
"RowStickyTarget", "RowAssistAttack", "RowClearAFK",
"RowBlockTrades", "RowAutoSelfCast",
"RowAutoLoot", "RowInvertMouse", "RowMouseSpeed", "RowClickToMove",
"RowCameraFollowStyle", "RowFollowTerrain", "RowHeadBob",
"RowAutoFollowSpeed", "RowWaterCollision", "RowSmartPivot",
"RowMouseLookSpeed", "RowMaxCameraDistance",
},
Audio = {
"RowEnableAll", "RowMaster", "RowSound", "RowMusic", "RowAmbience",
"RowEnableMusic", "RowEnableAmbience", "RowEnableErrorSpeech",
"RowBackgroundSound",
},
Graphics = {
"RowUiScale", "RowFarclip", "RowWorldDetail", "RowSpellDetail", "RowBrightness",
"RowWeatherDensity",
"RowDisplayMode", "RowVerticalSync", "RowRenderScale",
},
-- Guild Names and Player Titles are children of Player Names
-- (UIOptionsFrame.lua:703-709).
Nameplates = {
"RowEnemyPlates", "RowFriendlyPlates",
"RowPlayerNames", "RowGuildNames", "RowPlayerTitles", "RowNpcNames", "RowOwnName",
},
-- 1.12's Display box by column, then Help; target-of-target sits under Status Text.
Interface = {
"RowEnhancedTooltips", "RowStatusText", "RowTargetOfTarget", "RowTargetOfTargetMode",
"RowShowCloak", "RowShowHelm",
"RowInstantQuestText", "RowBuffDurations", "RowAutoQuestWatch",
"RowProfanityFilter",
"RowShowTutorials", "RowTipOfTheDay", "RowNewbieTips",
},
-- 1.12's chat box (UIOptionsFrame.xml:751-840). Not shipped: Simple Chat, which needs
-- FCF_Set_SimpleChat's re-layout, Lock Chat Settings and Guild Recruitment.
Chat = {
"RowGuildMemberAlert", "RowRemoveChatDelay", "RowChatBubbles", "RowLootSpam",
"RowPartyChatBubbles", "RowSpamFilter",
},
-- Deviation: the bar toggles precede the lock, which 1.12's box leads with, so what is
-- on screen reads first.
ActionBars = {
"RowMultiBar1", "RowMultiBar2", "RowMultiBar3", "RowMultiBar4",
"RowAlwaysShowMultibars", "RowLockActionBar",
},
-- The combat-text box in its anchor-chain order.
Combat = {
"RowCombatText", "RowFloatMode", "RowLowHealthMana", "RowAuras", "RowAuraFade",
"RowCombatState", "RowDodgeParryMiss", "RowResistances", "RowReputation",
"RowReactives", "RowFriendlyNames", "RowComboPoints", "RowEnergyGains",
"RowHonorGained",
-- Under their own master (UIOptionsFrame.lua:710-716).
"RowShowDamage", "RowPeriodicDamage", "RowPetDamage",
},
}
-- `tip` is a GlobalStrings key, resolved at hover as UIOptionsFrame.lua:265 does.
function BenillaOptionsRow_OnLoad(row, cvar, label, tip, child)
row.cvar = cvar
row.tip = tip
row.searchTag = string.upper(label)
-- BenillaOptionsRow_SetEnabled's disabled font must keep the child size.
row.child = child
local l = getglobal(row:GetName() .. "Label")
l:SetText(label)
if child then
l:SetFontObject("GameFontNormalSmall")
l:ClearAllPoints()
l:SetPoint("LEFT", row:GetName(), "LEFT", 52, 0)
l:SetPoint("RIGHT", row:GetName(), "CENTER", -85, 0)
end
end
-- ── The row's store ──
-- 1.12's `cvar`, `uvar` or `func`/`setFunc` (UIOptionsFrame.lua:230-377), all strings. Keep
-- BenillaOptionsRow_HasStore in BenillaOptionsRow_Set's order.
function BenillaOptionsRow_HasStore(row)
return row.uvar or row.setFunc or row.cvar
end
function BenillaOptionsRow_Get(row)
if row.uvar then return getglobal(row.uvar) end
if row.getFunc then
-- OptionsFrame.lua:110/135, formatted like the slider's write so strings compare
-- equal.
if row.numeric then
return (string.gsub(string.format("%.2f", row.getFunc()), "%.?0+$", ""))
end
if row.getFunc() then return "1" else return "0" end
end
return GetCVar(row.cvar)
end
-- A uvar row applies on the click; `cvarEvent` is CVAR_UPDATE's arg1.
function BenillaOptionsRow_Set(row, value)
if row.uvar then
setglobal(row.uvar, value)
-- Looked up when applied: most definers load after this file.
local apply = row.applyFunc
if type(apply) == "string" then apply = getglobal(apply) end
if apply then apply() end
return
end
-- The "1"/"0" string, as UIOptionsFrame.lua:291-297.
if row.setFunc then
-- A number, as OptionsFrame.lua:206-226.
if row.numeric then
row.setFunc(tonumber(value))
else
row.setFunc(value)
end
return
end
SetCVar(row.cvar, value, row.cvarEvent)
BenillaOptionsRow_WritePartner(row, value)
end
-- UIOptionsFrame_Save's partner writes: Pet Melee Damage also writes PetSpellDamage
-- (l.334-336); the camera speeds write their pitch twin at yaw/4 and yaw/2 (l.351-356).
function BenillaOptionsRow_WritePartner(row, value)
if not row.partner then return end
local v = value
if row.partner.scale then
v = string.gsub(
string.format("%.2f", tonumber(value) * row.partner.scale), "%.?0+$", "")
end
SetCVar(row.partner.cvar, v)
end
-- A uvar's default is captured at OnLoad, before the saved-variables chunk runs.
function BenillaOptionsRow_Default(row)
if row.uvar then return row.udefault end
if row.getFunc then return row.fdefault end
return GetCVarDefault(row.cvar)
end
-- BenillaOptionsRow_OnLoad's signature with the global's name in the cvar seat.
function BenillaOptionsGlobalRow_OnLoad(row, uvar, label, tip, child)
BenillaOptionsRow_OnLoad(row, nil, label, tip, child)
row.uvar = uvar
row.udefault = getglobal(uvar)
end
-- Stated, as UIOptionsFrame_SetDefaults hand-writes it (l.631-634).
function BenillaOptionsFuncRow_OnLoad(row, getFunc, setFunc, default, label, tip, child)
BenillaOptionsRow_OnLoad(row, nil, label, tip, child)
row.getFunc = getFunc
row.setFunc = setFunc
row.fdefault = default
end
-- `default` is still a string, since rows compare strings.
function BenillaOptionsNumFuncRow_OnLoad(row, getFunc, setFunc, default, label, tip, child)
BenillaOptionsFuncRow_OnLoad(row, getFunc, setFunc, default, label, tip, child)
row.numeric = 1
end
-- UIOptionsFrame.lua:193-227 re-applies saved uvars, so this window has no load ladder.
-- OptionsFrameSliders is the stock table (OptionsFrame.lua:24-34), which addons write.
-- Holes at 4, 5 and 7, so the OnShow loop uses the pairs form: ipairs would stop at 3.
BENILLA_GRAPHICS_SLIDER_ROWS = {
"RowUiScale", "RowFarclip", "RowWorldDetail",
[6] = "RowBrightness", [8] = "RowSpellDetail", [9] = "RowWeatherDensity",
}
-- SetMinMaxValues re-clamps and fires OnValueChanged, which must not write back.
function BenillaOptionsSliderRow_Setup(row, min, max, step, fmt, stops)
local slider = getglobal(row:GetName() .. "ControlSlider")
row.fmt = fmt
-- Kept for the "travel" readout, a share of the row's own range.
row.minv, row.maxv = min, max
-- Deviation: a named ladder reads out its stop; 1.12's slider labels only its ends, and
-- a bare index would mean nothing to a player.
row.stops = stops
row.refreshing = 1
slider:SetMinMaxValues(min, max)
slider:SetValueStep(step)
row.refreshing = nil
end
-- ── The dropdown rows: the 1.12 UIDropDownMenu kit ──
function BenillaOptionsDropdownRow_Setup(row, entries)
row.entries = entries
local dd = getglobal(row:GetName() .. "Dropdown")
UIDropDownMenu_SetWidth(180, dd)
UIDropDownMenu_Initialize(dd, BenillaOptionsDropdownRow_InitMenu)
-- The capsule's button steals hover from the row, so it carries the row wash too.
local btn = getglobal(dd:GetName() .. "Button")
btn:SetScript("OnEnter", function() BenillaOptionsRow_Hover(this:GetParent():GetParent(), 1) end)
btn:SetScript("OnLeave", function() BenillaOptionsRow_Hover(this:GetParent():GetParent(), nil) end)
end
function BenillaOptionsDropdownRow_InitMenu()
local dd = getglobal(UIDROPDOWNMENU_INIT_MENU)
local row = dd:GetParent()
for _, e in ipairs(row.entries) do
local info = {}
info.text = e.text
info.value = e.value
info.func = BenillaOptionsDropdownEntry_OnClick
UIDropDownMenu_AddButton(info)
end
end
-- `this` is the list button; the kit closes the list and plays the click.
function BenillaOptionsDropdownEntry_OnClick()
local dd = UIDropDownMenu_GetCurrentDropDown()
local row = dd:GetParent()
BenillaOptionsRow_Set(row, this.value)
BenillaOptionsDropdown_ShowValue(row)
end
-- A field, not SetSelectedValue, whose Refresh walks the shared DropDownList1. An off-grid
-- value shows the nearest entry.
function BenillaOptionsDropdown_ShowValue(row)
local dd = getglobal(row:GetName() .. "Dropdown")
local v = BenillaOptionsRow_Get(row)
local match
for _, e in ipairs(row.entries) do
-- `alt`: a stored "3" shows as Never, where the nearest value would show Always.
if e.value == v or (e.alt ~= nil and e.alt == v) then match = e end
end
if not match and tonumber(v) then
local best
for _, e in ipairs(row.entries) do
local d = tonumber(e.value) and math.abs(tonumber(e.value) - tonumber(v))
if d and (not best or d < best) then
best = d
match = e
end
end
end
if match then
dd.selectedValue = match.value
UIDropDownMenu_SetText(match.text, dd)
-- As UIOptionsFrameCameraDropDown_OnClick retargets OPTION_TOOLTIP_CAMERA<id>.
if match.tip then row.tip = match.tip end
else
dd.selectedValue = v
UIDropDownMenu_SetText(v, dd)
end
end
function BenillaOptionsRow_FormatValue(row, value)
if row.fmt == "raw" then
return string.format("%d", math.floor(value + 0.5))
end
-- The clamp guards a short stops table.
if row.stops then
local i = math.floor(value + 0.5) + 1
if i < 1 then i = 1 end
if i > table.getn(row.stops) then i = table.getn(row.stops) end
return row.stops[i]
end
-- "travel": the thumb's share of the groove. Brightness stores the reference's
-- `1 - gamma` (-0.5 to +0.5, default 0) and reads 0 to 100% with the default at 50.
if row.fmt == "travel" and row.minv and row.maxv and row.maxv > row.minv then
return string.format("%d%%",
math.floor((value - row.minv) / (row.maxv - row.minv) * 100 + 0.5))
end
-- "yards": cameraDistanceMaxFactor over the 15 yd base.
if row.fmt == "yards" then
return string.format("%d yd", math.floor(value * 15 + 0.5))
end
return string.format("%d%%", math.floor(value * 100 + 0.5))
end
-- Crossing controls does not blink: OnLeave fires before OnEnter within a move.
function BenillaOptionsRow_Hover(row, on)
local hover = getglobal(row:GetName() .. "Hover")
if on then
hover:Show()
BenillaOptionsRow_ShowTooltip(row)
else
hover:Hide()
GameTooltip:Hide()
end
end
-- 1.12's per-option string alone in gold (OptionsFrameTemplates.xml:52-64).
function BenillaOptionsRow_ShowTooltip(row)
local text = row.tip and getglobal(row.tip)
if text then
GameTooltip:SetOwner(getglobal(row:GetName() .. "Tip"), "ANCHOR_RIGHT", -10, 0)
GameTooltip:SetText(text, nil, nil, nil, nil, 1)
else
-- Deviation: 1.12 returns early here; a mute row hides the last plate, so a
-- neighbour's text cannot stand when its OnLeave was missed.
GameTooltip:Hide()
end
end
function BenillaOptionsCheckbox_OnClick(box)
local row = box:GetParent()
local checked = box:GetChecked()
-- The 1.12 panels disagree: the interface panel plays CheckBoxOn when checked
-- (OptionsFrame.lua:509-515), the sound panel CheckBoxOff; Audio rows carry soundQuirk.
local kitOn = checked
if row.soundQuirk then kitOn = not kitOn end
if kitOn then
PlaySound("igMainMenuOptionCheckBoxOn")
else
PlaySound("igMainMenuOptionCheckBoxOff")
end
-- An inverted row (Sticky Targeting, Disable Spam Filter) writes the opposite.
local on = checked
if row.invert then on = not on end
if on then
BenillaOptionsRow_Set(row, "1")
else
BenillaOptionsRow_Set(row, "0")
end
BenillaOptionsPage_UpdateDependencies(BenillaOptionsFrame.selectedCategory)
end
function BenillaOptionsSlider_OnValueChanged(slider, value)
local control = slider:GetParent()
local row = control:GetParent()
if not row.refreshing then
-- Snaps to the grid from the minimum (farclip's is 177+n*60); a refresh sets it
-- raw.
local step = slider:GetValueStep()
if step and step > 0 then
local minv = slider:GetMinMaxValues()
local snapped = minv + math.floor((value - minv) / step + 0.5) * step
if math.abs(snapped - value) > 0.00001 then
slider:SetValue(snapped) -- re-enters once with the snapped value
return
end
value = snapped -- the clean grid number, not the f32-rounded echo
end
end
getglobal(control:GetName() .. "Value"):SetText(BenillaOptionsRow_FormatValue(row, value))
if BenillaOptionsRow_HasStore(row) and not row.refreshing then
-- Trailing zeros stripped, so a value at its default stays out of the config file.
local str = string.gsub(string.format("%.2f", value), "%.?0+$", "")
if row.deferred then
-- Stored on Apply; a pending equal to the committed value is dropped.
if str == BenillaOptionsRow_Get(row) then
row.pending = nil
else
row.pending = str
end
BenillaOptionsApply_Update()
else
BenillaOptionsRow_Set(row, str)
end
end
end
function BenillaOptionsPage_Refresh(key)
local base = "BenillaOptionsFrameContainerBody" .. key
for _, rkey in ipairs(BENILLA_OPTIONS_PAGE_ROWS[key]) do
local row = getglobal(base .. rkey)
local box = getglobal(base .. rkey .. "Check")
if box then
-- "0" unchecks; an inverted row checks on "0".
if row.invert then
local checked
if BenillaOptionsRow_Get(row) == "0" then checked = 1 end
box:SetChecked(checked)
else
box:SetChecked(BenillaOptionsRow_Get(row))
end
elseif row.entries then
BenillaOptionsDropdown_ShowValue(row)
else
local slider = getglobal(base .. rkey .. "ControlSlider")
row.refreshing = 1
-- A staged value shows first, as the era's GetValue returns it.
slider:SetValue(tonumber(row.pending or BenillaOptionsRow_Get(row) or "0") or 0)
row.refreshing = nil
-- SetValue fires only on a change, so the readout is written here.
getglobal(base .. rkey .. "ControlValue"):SetText(
BenillaOptionsRow_FormatValue(row, slider:GetValue()))
end
end
BenillaOptionsPage_UpdateDependencies(key)
BenillaOptionsApply_Update()
end
-- Each page's dependency rules, the 1.12 panel's own.
function BenillaOptionsPage_UpdateDependencies(key)
if key == "Combat" then
-- Combo Points is for rogues and druids only.
local on = SHOW_COMBAT_TEXT ~= "0"
local _, class = UnitClass("player")
class = class and string.upper(class)
local combo = class == "ROGUE" or class == "DRUID"
-- The damage-number trio is not under this master.
local damage = {
RowShowDamage = 1, RowPeriodicDamage = 1, RowPetDamage = 1,
}
for _, rkey in ipairs(BENILLA_OPTIONS_PAGE_ROWS.Combat) do
if rkey ~= "RowCombatText" and not damage[rkey] then
local live = on
if rkey == "RowComboPoints" and not combo then live = nil end
BenillaOptionsRow_SetEnabled(
getglobal("BenillaOptionsFrameContainerBodyCombat" .. rkey), live)
end
end
-- UIOptionsFrame.lua:710-716: Show Target Damage off greys Periodic and Pet Damage.
local dmg = GetCVar("CombatDamage") ~= "0"
BenillaOptionsRow_SetEnabled(BenillaOptionsFrameContainerBodyCombatRowPeriodicDamage, dmg)
BenillaOptionsRow_SetEnabled(BenillaOptionsFrameContainerBodyCombatRowPetDamage, dmg)
return
end
if key == "Controls" then
-- UIOptionsFrame.lua:717-721: dead while the style is Never, "0" or a stray "3".
local style = GetCVar("cameraSmoothStyle")
BenillaOptionsRow_SetEnabled(BenillaOptionsFrameContainerBodyControlsRowAutoFollowSpeed,
style ~= "0" and style ~= "3")
return
end
if key == "Nameplates" then
-- UIOptionsFrame.lua:703-709: Player Names off greys Player Guild Names and
-- Player Titles.
local on = GetCVar("UnitNamePlayer") ~= "0"
BenillaOptionsRow_SetEnabled(
BenillaOptionsFrameContainerBodyNameplatesRowGuildNames, on)
BenillaOptionsRow_SetEnabled(
BenillaOptionsFrameContainerBodyNameplatesRowPlayerTitles, on)
return
end
if key == "Interface" then
-- UIOptionsFrame.lua:697-701: the mode is dead while its switch is off.
BenillaOptionsRow_SetEnabled(BenillaOptionsFrameContainerBodyInterfaceRowTargetOfTargetMode,
SHOW_TARGET_OF_TARGET ~= "0")
return
end
if key == "ActionBars" then
-- UIOptionsFrame.lua:722-726: Right ActionBar 2 needs Right ActionBar.
BenillaOptionsRow_SetEnabled(BenillaOptionsFrameContainerBodyActionBarsRowMultiBar4,
SHOW_MULTI_ACTIONBAR_3)
return
end
if key ~= "Audio" then return end
-- SoundOptionsFrame_UpdateDependencies; Enable Music stays live, as in 1.12.
local on = GetCVar("MasterSoundEffects") ~= "0"
for _, row in {"RowEnableAmbience", "RowEnableErrorSpeech"} do
local box = getglobal("BenillaOptionsFrameContainerBodyAudio"..row.."Check")
local label = getglobal("BenillaOptionsFrameContainerBodyAudio"..row.."Label")
if on then
box:Enable()
label:SetFontObject("GameFontNormal")
else
box:Disable()
label:SetFontObject("GameFontDisable")
end
end
end
-- As OptionsFrame_DisableDropDown; 1.12 has no UIDropDownMenu_DisableDropDown.
function BenillaOptionsRow_SetEnabled(row, on)
local name = row:GetName()
local box = getglobal(name .. "Check")
local dd = getglobal(name .. "Dropdown")
-- As OptionsFrame_DisableSlider (l.481-486); a press on the track would seat the value.
local sl = getglobal(name .. "ControlSlider")
if box then
if on then box:Enable() else box:Disable() end
elseif sl then
local thumb = getglobal(name .. "ControlSliderThumb")
local value = getglobal(name .. "ControlValue")
if on then
sl:EnableMouse(true)
thumb:Show()
value:SetTextColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g,
NORMAL_FONT_COLOR.b)
else
sl:EnableMouse(false)
thumb:Hide()
value:SetTextColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b)
end
elseif dd then
local text = getglobal(dd:GetName() .. "Text")
if on then
getglobal(dd:GetName() .. "Button"):Enable()
text:SetTextColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g,
HIGHLIGHT_FONT_COLOR.b)
else
getglobal(dd:GetName() .. "Button"):Disable()
text:SetTextColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b)
end
end
local label = getglobal(name .. "Label")
if on then
label:SetFontObject(row.child and "GameFontNormalSmall" or "GameFontNormal")
else
label:SetFontObject(row.child and "GameFontDisableSmall" or "GameFontDisable")
end
end
-- Pending edits dropped.
function BenillaOptionsPage_Defaults(key)
local base = "BenillaOptionsFrameContainerBody" .. key
for _, rkey in ipairs(BENILLA_OPTIONS_PAGE_ROWS[key]) do
local row = getglobal(base .. rkey)
row.pending = nil
BenillaOptionsRow_Set(row, BenillaOptionsRow_Default(row))
end
BenillaOptionsPage_Refresh(key)
end
-- ── The Apply flow ──
-- Pending edits survive a category switch; hiding discards them.
function BenillaOptionsApply_Update()
local pending
for key, rows in pairs(BENILLA_OPTIONS_PAGE_ROWS) do
local base = "BenillaOptionsFrameContainerBody" .. key
for _, rkey in ipairs(rows) do
if getglobal(base .. rkey).pending then pending = 1 end
end
end
if pending then
BenillaOptionsFrameApplyButton:Enable()
BenillaOptionsFrameApplyButton:Show()
else
BenillaOptionsFrameApplyButton:Disable()
BenillaOptionsFrameApplyButton:Hide()
end
end
function BenillaOptionsPage_Apply()
for key, rows in pairs(BENILLA_OPTIONS_PAGE_ROWS) do
local base = "BenillaOptionsFrameContainerBody" .. key
for _, rkey in ipairs(rows) do
local row = getglobal(base .. rkey)
if row.pending then
BenillaOptionsRow_Set(row, row.pending)
row.pending = nil
end
end
end
BenillaOptionsApply_Update()
end
function BenillaOptionsPage_DiscardPending()
for key, rows in pairs(BENILLA_OPTIONS_PAGE_ROWS) do
local base = "BenillaOptionsFrameContainerBody" .. key
for _, rkey in ipairs(rows) do
getglobal(base .. rkey).pending = nil
end
end
BenillaOptionsApply_Update()
end
]]></Script>
<!-- A copy of the stock GameMenuButtonTemplate (UIPanelTemplates.xml:403) at the era's
96x22. -->
<Button name="BenillaOptionsRedButtonTemplate" virtual="true">
<Size><AbsDimension x="96" y="22"/></Size>
<ButtonText name="$parentText"/>
<NormalTexture file="Interface\Buttons\UI-Panel-Button-Up"><TexCoords left="0" right="0.625" top="0" bottom="0.6875"/></NormalTexture>
<PushedTexture file="Interface\Buttons\UI-Panel-Button-Down"><TexCoords left="0" right="0.625" top="0" bottom="0.6875"/></PushedTexture>
<DisabledTexture file="Interface\Buttons\UI-Panel-Button-Disabled"><TexCoords left="0" right="0.625" top="0" bottom="0.6875"/></DisabledTexture>
<HighlightTexture file="Interface\Buttons\UI-Panel-Button-Highlight" alphaMode="ADD"><TexCoords left="0" right="0.625" top="0" bottom="0.6875"/></HighlightTexture>
<NormalFont inherits="GameFontHighlight"/>
<HighlightFont inherits="GameFontHighlight"/>
<DisabledFont inherits="GameFontDisable"/>
</Button>
<!-- The wash is 1.14's OptionsListButtonTemplate: blue on hover, gold when selected. -->
<Button name="BenillaOptionsCategoryRowTemplate" virtual="true">
<Size><AbsDimension x="199" y="20"/></Size>
<Layers>
<Layer level="BACKGROUND">
<Texture name="$parentBg" file="Interface\QuestFrame\UI-QuestLogTitleHighlight" alphaMode="ADD" hidden="true">
<Anchors><Anchor point="CENTER"/></Anchors>
</Texture>
</Layer>
</Layers>
<!-- The label box spans the row, so the text centres vertically but not across. -->
<ButtonText name="$parentText" justifyH="LEFT">
<Anchors>
<Anchor point="TOPLEFT"><Offset><AbsDimension x="36" y="1"/></Offset></Anchor>
<Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="1"/></Offset></Anchor>
</Anchors>
</ButtonText>
<NormalFont inherits="GameFontNormal"/>
<HighlightFont inherits="GameFontHighlight"/>
<DisabledFont inherits="GameFontDisable"/>
<Scripts>
<OnClick>BenillaOptionsFrame_SelectCategory(this.categoryKey)</OnClick>
<!-- The selected row keeps its locked gold. -->
<OnEnter>
if BenillaOptionsFrame.selectedCategory ~= this.categoryKey then
getglobal(this:GetName() .. "Bg"):Show()
end
</OnEnter>
<OnLeave>
if BenillaOptionsFrame.selectedCategory ~= this.categoryKey then
getglobal(this:GetName() .. "Bg"):Hide()
end
</OnLeave>
</Scripts>
</Button>
<!-- A category header; the era's wash has no 1.12 art. -->
<Frame name="BenillaOptionsCategoryHeaderTemplate" virtual="true">
<Size><AbsDimension x="199" y="30"/></Size>
<Layers>
<Layer level="OVERLAY">
<FontString name="$parentLabel" inherits="BenillaOptionsFontHighlightMedium">
<Anchors><Anchor point="LEFT"><Offset><AbsDimension x="20" y="-1"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
</Frame>
<!-- A search group head; a click selects the category, ending the search. -->
<Button name="BenillaOptionsSearchHeadTemplate" virtual="true" hidden="true">
<Size><AbsDimension y="45"/></Size>
<Layers>
<Layer level="BACKGROUND">
<Texture name="$parentHover" hidden="true">
<Anchors>
<Anchor point="TOPLEFT"/>
<Anchor point="BOTTOMRIGHT"/>
</Anchors>
<Color r="1" g="1" b="1" a="0.1"/>
</Texture>
</Layer>
<Layer level="ARTWORK">
<FontString name="$parentLabel" inherits="GameFontNormalLarge" justifyH="LEFT">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="16" y="-16"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnClick>BenillaOptionsFrame_SelectCategory(this.categoryKey)</OnClick>
<OnEnter>getglobal(this:GetName() .. "Hover"):Show()</OnEnter>
<OnLeave>getglobal(this:GetName() .. "Hover"):Hide()</OnLeave>
</Scripts>
</Button>
<!-- A checkbox row with the 1.12 UI-CheckBox set; the row-wide wash is the hover. -->
<Frame name="BenillaOptionsCheckboxRowTemplate" virtual="true" enableMouse="true">
<Size><AbsDimension y="26"/></Size>
<Layers>
<Layer level="BACKGROUND">
<Texture name="$parentHover" hidden="true">
<Anchors>
<Anchor point="TOPLEFT"><Offset><AbsDimension x="-10" y="0"/></Offset></Anchor>
<Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="-5" y="0"/></Offset></Anchor>
</Anchors>
<Color r="1" g="1" b="1" a="0.1"/>
</Texture>
</Layer>
<Layer level="OVERLAY">
<FontString name="$parentLabel" inherits="GameFontNormal" justifyH="LEFT">
<Anchors>
<Anchor point="LEFT"><Offset><AbsDimension x="37" y="0"/></Offset></Anchor>
<Anchor point="RIGHT" relativePoint="CENTER"><Offset><AbsDimension x="-85" y="0"/></Offset></Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
<!-- The tooltip seat, the label half; mouse-less so it never steals the row's
hover. -->
<Frame name="$parentTip">
<Anchors>
<Anchor point="TOPLEFT"/>
<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOM"><Offset><AbsDimension x="-80" y="0"/></Offset></Anchor>
</Anchors>
</Frame>
<CheckButton name="$parentCheck">
<Size><AbsDimension x="30" y="29"/></Size>
<Anchors><Anchor point="LEFT" relativePoint="CENTER"><Offset><AbsDimension x="-80" y="0"/></Offset></Anchor></Anchors>
<NormalTexture file="Interface\Buttons\UI-CheckBox-Up"/>
<PushedTexture file="Interface\Buttons\UI-CheckBox-Down"/>
<CheckedTexture file="Interface\Buttons\UI-CheckBox-Check"/>
<DisabledCheckedTexture file="Interface\Buttons\UI-CheckBox-Check-Disabled"/>
<Scripts>
<OnClick>BenillaOptionsCheckbox_OnClick(this)</OnClick>
<OnEnter>BenillaOptionsRow_Hover(this:GetParent(), 1)</OnEnter>
<OnLeave>BenillaOptionsRow_Hover(this:GetParent(), nil)</OnLeave>
</Scripts>
</CheckButton>
</Frames>
<Scripts>
<OnEnter>BenillaOptionsRow_Hover(this, 1)</OnEnter>
<OnLeave>BenillaOptionsRow_Hover(this, nil)</OnLeave>
</Scripts>
</Frame>
<!-- 1.12's OptionsSliderTemplate groove (OptionsFrameTemplates.xml:74); no steppers, as in
1.12. The +3 seats the art, so the readout stays level with the label. -->
<Frame name="BenillaOptionsSliderRowTemplate" virtual="true" enableMouse="true">
<Size><AbsDimension y="26"/></Size>
<Layers>
<Layer level="BACKGROUND">
<Texture name="$parentHover" hidden="true">
<Anchors>
<Anchor point="TOPLEFT"><Offset><AbsDimension x="-10" y="0"/></Offset></Anchor>
<Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="-5" y="0"/></Offset></Anchor>
</Anchors>
<Color r="1" g="1" b="1" a="0.1"/>
</Texture>
</Layer>
<Layer level="OVERLAY">
<FontString name="$parentLabel" inherits="GameFontNormal" justifyH="LEFT">
<Anchors>
<Anchor point="LEFT"><Offset><AbsDimension x="37" y="0"/></Offset></Anchor>
<Anchor point="RIGHT" relativePoint="CENTER"><Offset><AbsDimension x="-85" y="0"/></Offset></Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
<!-- The tooltip seat: one column keeps the plate still down a page. -->
<Frame name="$parentTip">
<Anchors>
<Anchor point="TOPLEFT"/>
<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOM"><Offset><AbsDimension x="-80" y="0"/></Offset></Anchor>
</Anchors>
</Frame>
<Frame name="$parentControl">
<Size><AbsDimension x="250" y="40"/></Size>
<Anchors><Anchor point="LEFT" relativePoint="CENTER"><Offset><AbsDimension x="-80" y="0"/></Offset></Anchor></Anchors>
<Layers>
<Layer level="OVERLAY">
<FontString name="$parentValue" inherits="GameFontNormal">
<Anchors><Anchor point="LEFT" relativePoint="RIGHT"><Offset><AbsDimension x="6" y="0"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
<!-- The groove, declared before the Slider so the thumb draws above it. -->
<Frame name="$parentGroove">
<Size><AbsDimension y="17"/></Size>
<Anchors>
<Anchor point="LEFT"><Offset><AbsDimension x="19" y="3"/></Offset></Anchor>
<Anchor point="RIGHT"><Offset><AbsDimension x="-19" y="3"/></Offset></Anchor>
</Anchors>
<Backdrop bgFile="Interface\Buttons\UI-SliderBar-Background" edgeFile="Interface\Buttons\UI-SliderBar-Border" tile="true">
<EdgeSize><AbsValue val="8"/></EdgeSize>
<TileSize><AbsValue val="8"/></TileSize>
<BackgroundInsets><AbsInset left="3" right="3" top="6" bottom="6"/></BackgroundInsets>
</Backdrop>
</Frame>
<Slider name="$parentSlider" orientation="HORIZONTAL" minValue="0" maxValue="1" valueStep="0.05">
<Anchors>
<Anchor point="TOPLEFT"><Offset><AbsDimension x="19" y="3"/></Offset></Anchor>
<Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="-19" y="3"/></Offset></Anchor>
</Anchors>
<ThumbTexture name="$parentThumb" file="Interface\Buttons\UI-SliderBar-Button-Horizontal">
<Size><AbsDimension x="32" y="32"/></Size>
</ThumbTexture>
<Scripts>
<OnValueChanged>BenillaOptionsSlider_OnValueChanged(this, arg1)</OnValueChanged>
<OnEnter>BenillaOptionsRow_Hover(this:GetParent():GetParent(), 1)</OnEnter>
<OnLeave>BenillaOptionsRow_Hover(this:GetParent():GetParent(), nil)</OnLeave>
</Scripts>
</Slider>
</Frames>
</Frame>
</Frames>
<Scripts>
<OnEnter>BenillaOptionsRow_Hover(this, 1)</OnEnter>
<OnLeave>BenillaOptionsRow_Hover(this, nil)</OnLeave>
</Scripts>
</Frame>
<!-- At CENTER-71, so the capsule's ink opens at the groove's column. -->
<Frame name="BenillaOptionsDropdownRowTemplate" virtual="true" enableMouse="true">
<Size><AbsDimension y="26"/></Size>
<Layers>
<Layer level="BACKGROUND">
<Texture name="$parentHover" hidden="true">
<Anchors>
<Anchor point="TOPLEFT"><Offset><AbsDimension x="-10" y="0"/></Offset></Anchor>
<Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="-5" y="0"/></Offset></Anchor>
</Anchors>
<Color r="1" g="1" b="1" a="0.1"/>
</Texture>
</Layer>
<Layer level="OVERLAY">
<FontString name="$parentLabel" inherits="GameFontNormal" justifyH="LEFT">
<Anchors>
<Anchor point="LEFT"><Offset><AbsDimension x="37" y="0"/></Offset></Anchor>
<Anchor point="RIGHT" relativePoint="CENTER"><Offset><AbsDimension x="-85" y="0"/></Offset></Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
<!-- The tooltip seat, as on the checkbox row. -->
<Frame name="$parentTip">
<Anchors>
<Anchor point="TOPLEFT"/>
<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOM"><Offset><AbsDimension x="-80" y="0"/></Offset></Anchor>
</Anchors>
</Frame>
<Frame name="$parentDropdown" inherits="UIDropDownMenuTemplate">
<Anchors><Anchor point="LEFT" relativePoint="CENTER"><Offset><AbsDimension x="-71" y="-2"/></Offset></Anchor></Anchors>
</Frame>
</Frames>
<Scripts>
<OnEnter>BenillaOptionsRow_Hover(this, 1)</OnEnter>
<OnLeave>BenillaOptionsRow_Hover(this, nil)</OnLeave>
</Scripts>
</Frame>
<!-- The era SettingsPanel's size and strata, HIGH, where 1.12's OptionsFrame is DIALOG;
toplevel as 1.12's OptionsFrame.xml:5. -->
<Frame name="BenillaOptionsFrame" parent="UIParent" frameStrata="HIGH" toplevel="true" enableMouse="true" hidden="true">
<Size><AbsDimension x="920" y="724"/></Size>
<Anchors><Anchor point="CENTER"/></Anchors>
<!-- The 1.14 System window backdrop, BACKDROP_DIALOG_32_32. -->
<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
<TileSize><AbsValue val="32"/></TileSize>
<EdgeSize><AbsValue val="32"/></EdgeSize>
<BackgroundInsets><AbsInset left="11" right="12" top="12" bottom="11"/></BackgroundInsets>
</Backdrop>
<Layers>
<Layer level="BACKGROUND">
<!-- 0.88 combined with the tile, so labels read over bright terrain. Inset 15:
regions draw over the border, whose ink ends by texel 14. -->
<Texture name="$parentGroundDim">
<Anchors>
<Anchor point="TOPLEFT"><Offset><AbsDimension x="15" y="-15"/></Offset></Anchor>
<Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="-15" y="15"/></Offset></Anchor>
</Anchors>
<Color r="0" g="0" b="0" a="0.7"/>
</Texture>
</Layer>
<Layer level="ARTWORK">
<Texture name="$parentHeader" file="Interface\DialogFrame\UI-DialogBox-Header">
<Size><AbsDimension x="300" y="68"/></Size>
<Anchors><Anchor point="TOP"><Offset><AbsDimension x="0" y="12"/></Offset></Anchor></Anchors>
</Texture>
</Layer>
<Layer level="OVERLAY">
<!-- Not BenillaGameFontNormalMed1: GameMenuAdapters.xml declares it later. -->
<FontString name="$parentTitleText" inherits="GameFontNormal" text="Options">
<Anchors>
<Anchor point="TOP" relativeTo="$parentHeader"><Offset><AbsDimension x="0" y="-14"/></Offset></Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
<!-- 1.14's OptionsFrameListTemplate outlines, declared first so siblings draw above;
tops at -52 to clear the search box. -->
<Frame name="$parentCategoryBox">
<Anchors>
<Anchor point="TOPLEFT"><Offset><AbsDimension x="10" y="-52"/></Offset></Anchor>
<Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="-695" y="38"/></Offset></Anchor>
</Anchors>
<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
<EdgeSize><AbsValue val="16"/></EdgeSize>
<TileSize><AbsValue val="16"/></TileSize>
<BackgroundInsets><AbsInset left="5" right="5" top="5" bottom="5"/></BackgroundInsets>
</Backdrop>
<Scripts>
<OnLoad>
this:SetBackdropColor(0, 0, 0, 0)
this:SetBackdropBorderColor(0.6, 0.6, 0.6)
</OnLoad>
</Scripts>
</Frame>
<Frame name="$parentPageBox">
<Anchors>
<Anchor point="TOPLEFT"><Offset><AbsDimension x="225" y="-52"/></Offset></Anchor>
<Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="-14" y="39"/></Offset></Anchor>
</Anchors>
<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
<EdgeSize><AbsValue val="16"/></EdgeSize>
<TileSize><AbsValue val="16"/></TileSize>
<BackgroundInsets><AbsInset left="5" right="5" top="5" bottom="5"/></BackgroundInsets>
</Backdrop>
<Scripts>
<OnLoad>
this:SetBackdropColor(0, 0, 0, 0)
this:SetBackdropBorderColor(0.6, 0.6, 0.6)
</OnLoad>
</Scripts>
</Frame>
<!-- Static: only Game has pages. Each plate is a UI-Character tab piece flipped, since
1.12 ships only bottom-tab plates. -->
<Button name="$parentGameTab">
<Size><AbsDimension x="72" y="37"/></Size>
<Anchors>
<Anchor point="BOTTOMLEFT" relativeTo="$parentCategoryBox" relativePoint="TOPLEFT"><Offset><AbsDimension x="6" y="-3"/></Offset></Anchor>
</Anchors>
<Layers>
<Layer level="ARTWORK">
<Texture name="$parentPlate" file="Interface\PaperDollInfoFrame\UI-Character-ActiveTab">
<Size><AbsDimension y="26"/></Size>
<Anchors>
<Anchor point="BOTTOMLEFT"/>
<Anchor point="BOTTOMRIGHT"/>
</Anchors>
<TexCoords left="0" right="1" top="1" bottom="0"/>
</Texture>
</Layer>
</Layers>
<ButtonText name="$parentText" text="Game">
<Anchors><Anchor point="BOTTOM"><Offset><AbsDimension x="0" y="6"/></Offset></Anchor></Anchors>
</ButtonText>
<NormalFont inherits="GameFontHighlightSmall"/>
<HighlightFont inherits="GameFontHighlightSmall"/>
<DisabledFont inherits="GameFontHighlightSmall"/>
</Button>
<Button name="$parentAddOnsTab">
<Size><AbsDimension x="87" y="37"/></Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentGameTab" relativePoint="TOPRIGHT"><Offset><AbsDimension x="5" y="0"/></Offset></Anchor>
</Anchors>
<Layers>
<Layer level="ARTWORK">
<Texture name="$parentPlate" file="Interface\PaperDollInfoFrame\UI-Character-InActiveTab">
<Size><AbsDimension y="23"/></Size>
<Anchors>
<Anchor point="BOTTOMLEFT"/>
<Anchor point="BOTTOMRIGHT"/>
</Anchors>
<TexCoords left="0" right="1" top="1" bottom="0"/>
</Texture>
</Layer>
</Layers>
<ButtonText name="$parentText" text="AddOns">
<Anchors><Anchor point="BOTTOM"><Offset><AbsDimension x="0" y="4"/></Offset></Anchor></Anchors>
</ButtonText>
<NormalFont inherits="GameFontNormalSmall"/>
<HighlightFont inherits="GameFontNormalSmall"/>
<DisabledFont inherits="GameFontNormalSmall"/>
<!-- No addon list behind it: disabled, in the era's unselected gold. -->
<Scripts>
<OnLoad>this:Disable()</OnLoad>
</Scripts>
</Button>
<!-- ── The category list ── -->
<Frame name="$parentCategoryList">
<Size><AbsDimension x="199"/></Size>
<!-- The box top (-52) plus the era's 12-unit pad. -->
<Anchors>
<Anchor point="TOPLEFT"><Offset><AbsDimension x="18" y="-64"/></Offset></Anchor>
<Anchor point="BOTTOMLEFT"><Offset><AbsDimension x="18" y="46"/></Offset></Anchor>
</Anchors>
<!-- The era list rhythm: spacing 2, and an 18-tall spacer between groups. -->
<Frames>
<Frame name="$parentHeaderGameplay" inherits="BenillaOptionsCategoryHeaderTemplate">
<Anchors><Anchor point="TOPLEFT"/></Anchors>
<Scripts>
<OnLoad>getglobal(this:GetName() .. "Label"):SetText("Gameplay")</OnLoad>
</Scripts>
</Frame>
<Button name="$parentRowControls" inherits="BenillaOptionsCategoryRowTemplate">
<Anchors><Anchor point="TOPLEFT" relativeTo="$parentHeaderGameplay" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-2"/></Offset></Anchor></Anchors>
<Scripts><OnLoad>BenillaOptionsCategoryRow_OnLoad(this, "Controls", "Controls")</OnLoad></Scripts>
</Button>
<Button name="$parentRowInterface" inherits="BenillaOptionsCategoryRowTemplate">
<Anchors><Anchor point="TOPLEFT" relativeTo="$parentRowControls" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-2"/></Offset></Anchor></Anchors>
<Scripts><OnLoad>BenillaOptionsCategoryRow_OnLoad(this, "Interface", "Interface")</OnLoad></Scripts>
</Button>
<Button name="$parentRowActionBars" inherits="BenillaOptionsCategoryRowTemplate">
<Anchors><Anchor point="TOPLEFT" relativeTo="$parentRowInterface" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-2"/></Offset></Anchor></Anchors>
<Scripts><OnLoad>BenillaOptionsCategoryRow_OnLoad(this, "ActionBars", "Action Bars")</OnLoad></Scripts>
</Button>
<Button name="$parentRowCombat" inherits="BenillaOptionsCategoryRowTemplate">
<Anchors><Anchor point="TOPLEFT" relativeTo="$parentRowActionBars" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-2"/></Offset></Anchor></Anchors>
<Scripts><OnLoad>BenillaOptionsCategoryRow_OnLoad(this, "Combat", "Combat")</OnLoad></Scripts>
</Button>
<Button name="$parentRowChat" inherits="BenillaOptionsCategoryRowTemplate">
<Anchors><Anchor point="TOPLEFT" relativeTo="$parentRowCombat" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-2"/></Offset></Anchor></Anchors>
<Scripts><OnLoad>BenillaOptionsCategoryRow_OnLoad(this, "Chat", "Chat")</OnLoad></Scripts>
</Button>
<Button name="$parentRowKeybindings" inherits="BenillaOptionsCategoryRowTemplate">
<Anchors><Anchor point="TOPLEFT" relativeTo="$parentRowChat" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-2"/></Offset></Anchor></Anchors>
<Scripts><OnLoad>BenillaOptionsCategoryRow_OnLoad(this, "Keybindings", "Keybindings")</OnLoad></Scripts>
</Button>
<!-- The era Gameplay group's last row (NAMEPLATE_OPTIONS_LABEL). -->
<Button name="$parentRowNameplates" inherits="BenillaOptionsCategoryRowTemplate">
<Anchors><Anchor point="TOPLEFT" relativeTo="$parentRowKeybindings" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-2"/></Offset></Anchor></Anchors>
<Scripts><OnLoad>BenillaOptionsCategoryRow_OnLoad(this, "Nameplates", "Nameplates")</OnLoad></Scripts>
</Button>
<Frame name="$parentHeaderSystem" inherits="BenillaOptionsCategoryHeaderTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowNameplates" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-22"/></Offset></Anchor>
</Anchors>
<Scripts>
<OnLoad>getglobal(this:GetName() .. "Label"):SetText("System")</OnLoad>
</Scripts>
</Frame>
<Button name="$parentRowGraphics" inherits="BenillaOptionsCategoryRowTemplate">
<Anchors><Anchor point="TOPLEFT" relativeTo="$parentHeaderSystem" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-2"/></Offset></Anchor></Anchors>
<Scripts><OnLoad>BenillaOptionsCategoryRow_OnLoad(this, "Graphics", "Graphics")</OnLoad></Scripts>
</Button>
<Button name="$parentRowAudio" inherits="BenillaOptionsCategoryRowTemplate">
<Anchors><Anchor point="TOPLEFT" relativeTo="$parentRowGraphics" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-2"/></Offset></Anchor></Anchors>
<Scripts><OnLoad>BenillaOptionsCategoryRow_OnLoad(this, "Audio", "Audio")</OnLoad></Scripts>
</Button>
</Frames>
</Frame>
<!-- ── The page area ── -->
<Frame name="$parentContainer">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentCategoryList" relativePoint="TOPRIGHT"><Offset><AbsDimension x="16" y="0"/></Offset></Anchor>
<Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="-22" y="47"/></Offset></Anchor>
</Anchors>
<Layers>
<Layer level="ARTWORK">
<!-- The era divider as a fill: 630x1 white at about 0.3. -->
<Texture name="$parentDivider">
<Size><AbsDimension y="1"/></Size>
<Anchors>
<Anchor point="TOPLEFT"><Offset><AbsDimension x="20" y="-50"/></Offset></Anchor>
<Anchor point="TOPRIGHT"><Offset><AbsDimension x="-20" y="-50"/></Offset></Anchor>
</Anchors>
<Color r="1" g="1" b="1" a="0.3"/>
</Texture>
</Layer>
<Layer level="OVERLAY">
<!-- The page title, written by BenillaOptionsFrame_SelectCategory. -->
<FontString name="$parentTitle" inherits="BenillaOptionsFontHighlightHuge">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="7" y="-22"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
<!-- On the Keybindings page, 1.12's Reset To Default behind a confirm. -->
<Button name="$parentDefaults" inherits="BenillaOptionsRedButtonTemplate" text="Defaults">
<Anchors><Anchor point="TOPRIGHT"><Offset><AbsDimension x="-36" y="-16"/></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>this:Disable()</OnLoad>
<OnClick>
if BenillaOptionsFrame.selectedCategory == "Keybindings" then
StaticPopup_Show("BENILLA_CONFIRM_RESET_KEYBINDINGS")
else
BenillaOptionsPage_Defaults(BenillaOptionsFrame.selectedCategory)
end
</OnClick>
</Scripts>
</Button>
<!-- 1.12's Unbind Key: Keybindings only, live while a capsule is selected. -->
<Button name="$parentUnbind" inherits="BenillaOptionsRedButtonTemplate" hidden="true">
<Anchors><Anchor point="RIGHT" relativeTo="$parentDefaults" relativePoint="LEFT"><Offset><AbsDimension x="-2" y="0"/></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>
this:SetText(BenillaKeyBindings_String("UNBIND", "Unbind Key"))
this:Disable()
</OnLoad>
<OnClick>
PlaySound("igMainMenuOptionCheckBoxOn")
BenillaKeyBindings_Unbind()
</OnClick>
</Scripts>
</Button>
<!-- enableMouse catches the wheel over blank area. -->
<ScrollFrame name="$parentScroll" enableMouse="true">
<Anchors>
<Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="-50"/></Offset></Anchor>
<Anchor point="BOTTOMRIGHT"/>
</Anchors>
<Scripts>
<!-- The loader fires OnLoad bottom-up, so the body already exists. -->
<OnLoad>
this:SetScrollChild(BenillaOptionsFrameContainerBody)
this.contentRange = BenillaOptionsScroll_Range
</OnLoad>
<OnUpdate>BenillaOptionsScroll_Fit()</OnUpdate>
<!-- An armed Keybindings capsule binds the wheel, search rows included. -->
<OnMouseWheel>
if BenillaKeyBindingsPage.selected then
BenillaKeyBindings_OnMouseWheel(arg1)
else
BenillaScroll_OnMouseWheel(this, arg1)
end
</OnMouseWheel>
<OnVerticalScroll>BenillaScroll_SyncBar(this)</OnVerticalScroll>
<OnScrollRangeChanged>BenillaScroll_SyncBar(this)</OnScrollRangeChanged>
</Scripts>
<Frames>
<!-- Declared before the body and the bar so it draws beneath both. -->
<Frame name="$parentBarTrough" inherits="BenillaScrollTroughTemplate"/>
<!-- Sized, not anchored: SetScrollChild pins its TOPLEFT and
BenillaOptionsScroll_Fit sizes it. -->
<Frame name="BenillaOptionsFrameContainerBody">
<Size><AbsDimension x="665" y="563"/></Size>
<Layers>
<Layer level="OVERLAY">
<!-- The no-match line, at the section header's seat. -->
<FontString name="$parentNoResults" inherits="GameFontHighlightLarge" justifyH="LEFT" hidden="true" text="No results found.">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="17" y="-28"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
<!-- Sticky Targeting is inverted, as 1.12 checks it on
deselectOnClick "0". -->
<Frame name="$parentControls" hidden="true">
<Anchors>
<Anchor point="TOPLEFT"/>
<Anchor point="BOTTOMRIGHT"/>
</Anchors>
<Frames>
<Frame name="$parentRowStickyTarget" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT"><Offset><AbsDimension x="10" y="-12"/></Offset></Anchor>
<Anchor point="TOPRIGHT"><Offset><AbsDimension x="-20" y="-12"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsRow_OnLoad(this, "deselectOnClick", "Sticky Targeting",
"OPTION_TOOLTIP_GAMEFIELD_DESELECT")
this.invert = 1
</OnLoad></Scripts>
</Frame>
<!-- Labels verbatim, ASSIST_ATTACK's sentence case too. -->
<Frame name="$parentRowAssistAttack" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowStickyTarget" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowStickyTarget" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsRow_OnLoad(this, "assistAttack", "Attack on assist",
"OPTION_TOOLTIP_ASSIST_ATTACK")
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowClearAFK" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowAssistAttack" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowAssistAttack" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsRow_OnLoad(this, "autoClearAFK", "Auto Clear AFK",
"OPTION_TOOLTIP_CLEAR_AFK")
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowBlockTrades" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowClearAFK" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowClearAFK" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>BenillaOptionsRow_OnLoad(this, "BlockTrades", "Block Trades",
"OPTION_TOOLTIP_BLOCK_TRADES")</OnLoad></Scripts>
</Frame>
<!-- Deviation: ships "1" where 1.12 registers "0": off, a
friendly cast falls into the targeting cursor, which is
not modelled. -->
<Frame name="$parentRowAutoSelfCast" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowBlockTrades" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowBlockTrades" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsRow_OnLoad(this, "autoSelfCast", "Auto Self Cast",
"OPTION_TOOLTIP_AUTO_SELF_CAST")
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowAutoLoot" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowAutoSelfCast" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowAutoSelfCast" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<!-- No tip: 1.12 has no AUTO_LOOT string. -->
<Scripts><OnLoad>BenillaOptionsRow_OnLoad(this, "autoLootDefault", "Auto Loot")</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowInvertMouse" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowAutoLoot" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowAutoLoot" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>BenillaOptionsRow_OnLoad(this, "mouseInvertPitch", "Invert Mouse",
"OPTION_TOOLTIP_INVERT_MOUSE")</OnLoad></Scripts>
</Frame>
<!-- The reference's range and step. -->
<Frame name="$parentRowMouseSpeed" inherits="BenillaOptionsSliderRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowInvertMouse" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowInvertMouse" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsRow_OnLoad(this, "mousespeed", "Mouse Sensitivity",
"OPTION_TOOLTIP_MOUSE_SENSITIVITY")
BenillaOptionsSliderRow_Setup(this, 0.5, 1.5, 0.05)
</OnLoad></Scripts>
</Frame>
<!-- 1.12's box sits under the mouse slider. -->
<Frame name="$parentRowClickToMove" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowMouseSpeed" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowMouseSpeed" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>BenillaOptionsRow_OnLoad(this, "autointeract", "Click-to-Move",
"OPTION_TOOLTIP_CLICK_TO_MOVE")</OnLoad></Scripts>
</Frame>
<!-- Smart 1, Always 2, Never 0 (UIOptionsFrame.lua:525,
536, 547). -->
<Frame name="$parentRowCameraFollowStyle" inherits="BenillaOptionsDropdownRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowClickToMove" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowClickToMove" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsRow_OnLoad(this, "cameraSmoothStyle",
"Camera Following Style", "OPTION_TOOLTIP_CAMERA1")
BenillaOptionsDropdownRow_Setup(this, {
{ text = "Smart", value = "1", tip = "OPTION_TOOLTIP_CAMERA1" },
{ text = "Always", value = "2", tip = "OPTION_TOOLTIP_CAMERA2" },
{ text = "Never", value = "0", alt = "3", tip = "OPTION_TOOLTIP_CAMERA3" },
})
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowFollowTerrain" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowCameraFollowStyle" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowCameraFollowStyle" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsRow_OnLoad(this, "cameraTerrainTilt", "Follow Terrain",
"OPTION_TOOLTIP_FOLLOW_TERRAIN")
</OnLoad></Scripts>
</Frame>
<!-- First person only, as in 1.12: the gate requires
`[cam+0xec] <= 1/6` on the zoom distance. -->
<Frame name="$parentRowHeadBob" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowFollowTerrain" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowFollowTerrain" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsRow_OnLoad(this, "cameraBobbing", "Head Bob",
"OPTION_TOOLTIP_HEAD_BOB")
</OnLoad></Scripts>
</Frame>
<!-- UIOptionsFrameSliders row 2. Deviation: no partner
write of cameraPitchSmoothSpeed, which has no reader:
the follow here has one rate. -->
<Frame name="$parentRowAutoFollowSpeed" inherits="BenillaOptionsSliderRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowHeadBob" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowHeadBob" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsRow_OnLoad(this, "cameraYawSmoothSpeed", "Auto-Follow Speed",
"OPTION_TOOLTIP_AUTO_FOLLOW_SPEED")
BenillaOptionsSliderRow_Setup(this, 90, 270, 10, "raw")
</OnLoad></Scripts>
</Frame>
<!-- One CVar, two consumers: the `0xf0000` nibble in
`0x50e570`'s trace mask and `0x50e629`'s pivot floor
and cap test. -->
<Frame name="$parentRowWaterCollision" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowAutoFollowSpeed" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowAutoFollowSpeed" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsRow_OnLoad(this, "cameraWaterCollision", "Water Collision",
"OPTION_TOOLTIP_WATER_COLLISION")
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowSmartPivot" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowWaterCollision" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowWaterCollision" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsRow_OnLoad(this, "cameraPivot", "Smart Pivot",
"OPTION_TOOLTIP_SMART_PIVOT")
</OnLoad></Scripts>
</Frame>
<!-- Writes cameraPitchMoveSpeed at half (l.354-356). -->
<Frame name="$parentRowMouseLookSpeed" inherits="BenillaOptionsSliderRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowSmartPivot" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowSmartPivot" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsRow_OnLoad(this, "cameraYawMoveSpeed", "Mouse Look Speed",
"OPTION_TOOLTIP_MOUSE_LOOK_SPEED")
BenillaOptionsSliderRow_Setup(this, 90, 270, 10, "raw")
this.partner = { cvar = "cameraPitchMoveSpeed", scale = 0.5 }
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowMaxCameraDistance" inherits="BenillaOptionsSliderRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowMouseLookSpeed" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowMouseLookSpeed" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsRow_OnLoad(this, "cameraDistanceMaxFactor",
"Max Camera Distance", "OPTION_TOOLTIP_MAX_FOLLOW_DIST")
BenillaOptionsSliderRow_Setup(this, 1.0, 2.0, 0.1, "yards")
</OnLoad></Scripts>
</Frame>
</Frames>
</Frame>
<!-- The three volumes are children of Master. -->
<Frame name="$parentAudio" hidden="true">
<Anchors>
<Anchor point="TOPLEFT"/>
<Anchor point="BOTTOMRIGHT"/>
</Anchors>
<Frames>
<Frame name="$parentRowEnableAll" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT"><Offset><AbsDimension x="10" y="-12"/></Offset></Anchor>
<Anchor point="TOPRIGHT"><Offset><AbsDimension x="-20" y="-12"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsRow_OnLoad(this, "MasterSoundEffects", "Enable All Sound",
"OPTION_TOOLTIP_ENABLE_ALL_SOUND")
this.soundQuirk = 1
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowMaster" inherits="BenillaOptionsSliderRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowEnableAll" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowEnableAll" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>BenillaOptionsRow_OnLoad(this, "MasterVolume", "Master Volume",
"OPTION_TOOLTIP_MASTER_VOLUME")</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowSound" inherits="BenillaOptionsSliderRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowMaster" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowMaster" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsRow_OnLoad(this, "SoundVolume", "Sound Volume",
"OPTION_TOOLTIP_SOUND_VOLUME", 1)
this.parentRow = "RowMaster"
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowMusic" inherits="BenillaOptionsSliderRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowSound" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowSound" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsRow_OnLoad(this, "MusicVolume", "Music Volume",
"OPTION_TOOLTIP_MUSIC_VOLUME", 1)
this.parentRow = "RowMaster"
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowAmbience" inherits="BenillaOptionsSliderRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowMusic" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowMusic" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsRow_OnLoad(this, "AmbienceVolume", "Ambience Volume",
"OPTION_TOOLTIP_AMBIENCE_VOLUME", 1)
this.parentRow = "RowMaster"
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowEnableMusic" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowAmbience" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowAmbience" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsRow_OnLoad(this, "EnableMusic", "Enable Music",
"OPTION_TOOLTIP_ENABLE_MUSIC")
this.soundQuirk = 1
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowEnableAmbience" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowEnableMusic" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowEnableMusic" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsRow_OnLoad(this, "EnableAmbience", "Enable Ambience",
"OPTION_TOOLTIP_ENABLE_AMBIENCE")
this.soundQuirk = 1
</OnLoad></Scripts>
</Frame>
<!-- 1.12's checkbox 4 (SoundOptionsFrame.lua:3). -->
<Frame name="$parentRowEnableErrorSpeech" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowEnableAmbience" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowEnableAmbience" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsRow_OnLoad(this, "EnableErrorSpeech", "Enable Error Speech",
"OPTION_TOOLTIP_ENABLE_ERROR_SPEECH")
this.soundQuirk = 1
</OnLoad></Scripts>
</Frame>
<!-- An era row, not in 1.12, which always mutes when
the window loses focus; off matches it. -->
<Frame name="$parentRowBackgroundSound" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowEnableErrorSpeech" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowEnableErrorSpeech" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsRow_OnLoad(this, "Sound_EnableSoundWhenGameIsInBG",
"Enable Sound in Background",
"BENILLA_TOOLTIP_BACKGROUND_SOUND")
this.soundQuirk = 1
</OnLoad></Scripts>
</Frame>
</Frames>
</Frame>
<!-- No useUiScale checkbox, which 1.12 has: benilla registers
useUiScale but never reads it, so the UI scale always
applies. -->
<Frame name="$parentGraphics" hidden="true">
<Anchors>
<Anchor point="TOPLEFT"/>
<Anchor point="BOTTOMRIGHT"/>
</Anchors>
<Frames>
<Frame name="$parentRowUiScale" inherits="BenillaOptionsSliderRowTemplate">
<Anchors>
<Anchor point="TOPLEFT"><Offset><AbsDimension x="10" y="-12"/></Offset></Anchor>
<Anchor point="TOPRIGHT"><Offset><AbsDimension x="-20" y="-12"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsRow_OnLoad(this, "uiScale", "UI Scale",
"OPTION_TOOLTIP_UI_SCALE")
BenillaOptionsSliderRow_Setup(this, OptionsFrameSliders[1].minValue,
OptionsFrameSliders[1].maxValue,
OptionsFrameSliders[1].valueStep)
-- A live write would rescale the slider mid-drag.
this.deferred = 1
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowFarclip" inherits="BenillaOptionsSliderRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowUiScale" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowUiScale" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsRow_OnLoad(this, "farclip", "Terrain Distance",
"OPTION_TOOLTIP_FARCLIP")
BenillaOptionsSliderRow_Setup(this, OptionsFrameSliders[2].minValue,
OptionsFrameSliders[2].maxValue,
OptionsFrameSliders[2].valueStep, "raw")
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowWorldDetail" inherits="BenillaOptionsSliderRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowFarclip" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowFarclip" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsRow_OnLoad(this, "WorldDetail", "Environment Detail",
"OPTION_TOOLTIP_ENVIRONMENT_DETAIL")
-- Stop names from the era quality ladder.
BenillaOptionsSliderRow_Setup(this, OptionsFrameSliders[3].minValue,
OptionsFrameSliders[3].maxValue,
OptionsFrameSliders[3].valueStep, nil,
{ "Low", "Medium", "High" })
</OnLoad></Scripts>
</Frame>
<!-- On the CVar, as 1.12's slider 8 lands: there is no
SetspellEffectLevel global. -->
<Frame name="$parentRowSpellDetail" inherits="BenillaOptionsSliderRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowWorldDetail" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowWorldDetail" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsRow_OnLoad(this, "spellEffectLevel", SPELL_DETAIL,
"OPTION_TOOLTIP_SPELL_DETAIL")
-- Our names for the handler's emission scalars
-- 0.33, 0.66 and 1.0 (`0x689510`).
BenillaOptionsSliderRow_Setup(this, OptionsFrameSliders[8].minValue,
OptionsFrameSliders[8].maxValue,
OptionsFrameSliders[8].valueStep, nil,
{ "Low", "Medium", "High" })
</OnLoad></Scripts>
</Frame>
<!-- An API row over GetGamma/SetGamma, whose unit is
`1 - gamma`; writing `gamma` would invert the
control. -->
<Frame name="$parentRowBrightness" inherits="BenillaOptionsSliderRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowSpellDetail" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowSpellDetail" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
-- OptionsFrame_SetDefaults' default (l.444-445);
-- `or 1` covers a VM with no CVars.
local gd = tonumber(GetCVarDefault("gamma")) or 1
BenillaOptionsNumFuncRow_OnLoad(this, GetGamma, SetGamma,
tostring(1 - gd), "Brightness",
"BENILLA_TOOLTIP_BRIGHTNESS")
BenillaOptionsSliderRow_Setup(this, OptionsFrameSliders[6].minValue,
OptionsFrameSliders[6].maxValue,
OptionsFrameSliders[6].valueStep, "travel")
</OnLoad></Scripts>
</Frame>
<!-- On the CVar, as 1.12's lands: there is no
SetweatherDensity global. -->
<Frame name="$parentRowWeatherDensity" inherits="BenillaOptionsSliderRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowBrightness" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowBrightness" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsRow_OnLoad(this, "weatherDensity", "Weather Intensity",
"OPTION_TOOLTIP_WEATHER_DETAIL")
-- Our names for `0x67b870`'s spawn-rate gains
-- `{0.1, 0.33, 0.66, 1.0}` (`[0x8680ec]`).
BenillaOptionsSliderRow_Setup(this, OptionsFrameSliders[9].minValue,
OptionsFrameSliders[9].maxValue,
OptionsFrameSliders[9].valueStep, nil,
{ "Minimal", "Low", "Medium", "Full" })
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowDisplayMode" inherits="BenillaOptionsDropdownRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowWeatherDensity" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowWeatherDensity" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
-- Deviation: modern Classic's two-entry Display
-- Mode, as there is no exclusive fullscreen;
-- gxWindow "0" is the borderless window.
BenillaOptionsRow_OnLoad(this, "gxWindow", "Display Mode",
"BENILLA_TOOLTIP_DISPLAY_MODE")
BenillaOptionsDropdownRow_Setup(this, {
{ text = "Windowed (Fullscreen)", value = "0" },
{ text = "Windowed", value = "1" },
})
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowVerticalSync" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowDisplayMode" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowDisplayMode" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
-- Not deferred despite gxRestart: vsync changes
-- live.
BenillaOptionsRow_OnLoad(this, "gxVSync", "Vertical Sync",
"OPTION_TOOLTIP_VERTICAL_SYNC")
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowRenderScale" inherits="BenillaOptionsSliderRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowVerticalSync" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowVerticalSync" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
-- Deviation: our own row (the reference draws to
-- the backbuffer), and no Multisampling, which
-- misses alpha-tested cutouts. Deferred: a write
-- rebuilds the render target.
BenillaOptionsRow_OnLoad(this, "renderScale", "Render Scale",
"BENILLA_TOOLTIP_RENDER_SCALE")
BenillaOptionsSliderRow_Setup(this, 0.5, 2.0, 0.05)
this.deferred = 1
</OnLoad></Scripts>
</Frame>
</Frames>
<!-- Re-apply the bounds on show, as OptionsFrame_Load does, so
an addon's write lands. -->
<Scripts>
<OnShow>
for i, name in BENILLA_GRAPHICS_SLIDER_ROWS do
local info = OptionsFrameSliders[i]
local row = getglobal(this:GetName() .. name)
if ( info and row ) then
BenillaOptionsSliderRow_Setup(row, info.minValue, info.maxValue,
info.valueStep, row.fmt, row.stops)
end
end
</OnShow>
</Scripts>
</Frame>
<!-- 1.12's AdvancedOptionsCombatText box, as uvar rows. -->
<Frame name="$parentCombat" hidden="true">
<Anchors>
<Anchor point="TOPLEFT"/>
<Anchor point="BOTTOMRIGHT"/>
</Anchors>
<Frames>
<Frame name="$parentRowCombatText" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT"><Offset><AbsDimension x="10" y="-12"/></Offset></Anchor>
<Anchor point="TOPRIGHT"><Offset><AbsDimension x="-20" y="-12"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsGlobalRow_OnLoad(this, "SHOW_COMBAT_TEXT",
"Enable Floating Combat Text", "OPTION_TOOLTIP_SHOW_COMBAT_TEXT")
this.applyFunc = "BenillaCombatText_UpdateOrLoad"
</OnLoad></Scripts>
</Frame>
<!-- 1.12's scroll-mode values: 1 up, 2 down, 3 arc. -->
<Frame name="$parentRowFloatMode" inherits="BenillaOptionsDropdownRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowCombatText" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowCombatText" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsGlobalRow_OnLoad(this, "COMBAT_TEXT_FLOAT_MODE",
"Combat Text Float Mode", "OPTION_TOOLTIP_COMBAT_TEXT_MODE", 1)
BenillaOptionsDropdownRow_Setup(this, {
{ text = "Scroll Up", value = "1" },
{ text = "Scroll Down", value = "2" },
{ text = "Arc", value = "3" },
})
this.parentRow = "RowCombatText"
this.applyFunc = "BenillaCombatText_UpdateOrLoad"
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowLowHealthMana" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowFloatMode" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowFloatMode" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsGlobalRow_OnLoad(this, "COMBAT_TEXT_SHOW_LOW_HEALTH_MANA",
"Show Low Mana and Health",
"OPTION_TOOLTIP_COMBAT_TEXT_SHOW_LOW_HEALTH_MANA", 1)
this.parentRow = "RowCombatText"
this.applyFunc = "BenillaCombatText_UpdateOrLoad"
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowAuras" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowLowHealthMana" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowLowHealthMana" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsGlobalRow_OnLoad(this, "COMBAT_TEXT_SHOW_AURAS",
"Show Auras", "OPTION_TOOLTIP_COMBAT_TEXT_SHOW_AURAS", 1)
this.parentRow = "RowCombatText"
this.applyFunc = "BenillaCombatText_UpdateOrLoad"
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowAuraFade" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowAuras" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowAuras" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsGlobalRow_OnLoad(this, "COMBAT_TEXT_SHOW_AURA_FADE",
"Show Fading Auras", "OPTION_TOOLTIP_COMBAT_TEXT_SHOW_AURA_FADE", 1)
this.parentRow = "RowCombatText"
this.applyFunc = "BenillaCombatText_UpdateOrLoad"
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowCombatState" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowAuraFade" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowAuraFade" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsGlobalRow_OnLoad(this, "COMBAT_TEXT_SHOW_COMBAT_STATE",
"Show Combat State",
"OPTION_TOOLTIP_COMBAT_TEXT_SHOW_COMBAT_STATE", 1)
this.parentRow = "RowCombatText"
this.applyFunc = "BenillaCombatText_UpdateOrLoad"
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowDodgeParryMiss" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowCombatState" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowCombatState" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsGlobalRow_OnLoad(this, "COMBAT_TEXT_SHOW_DODGE_PARRY_MISS",
"Show Dodge/Parries/Misses",
"OPTION_TOOLTIP_COMBAT_TEXT_SHOW_DODGE_PARRY_MISS", 1)
this.parentRow = "RowCombatText"
this.applyFunc = "BenillaCombatText_UpdateOrLoad"
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowResistances" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowDodgeParryMiss" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowDodgeParryMiss" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsGlobalRow_OnLoad(this, "COMBAT_TEXT_SHOW_RESISTANCES",
"Show Damage Reduction",
"OPTION_TOOLTIP_COMBAT_TEXT_SHOW_RESISTANCES", 1)
this.parentRow = "RowCombatText"
this.applyFunc = "BenillaCombatText_UpdateOrLoad"
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowReputation" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowResistances" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowResistances" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsGlobalRow_OnLoad(this, "COMBAT_TEXT_SHOW_REPUTATION",
"Show Reputation",
"OPTION_TOOLTIP_COMBAT_TEXT_SHOW_REPUTATION", 1)
this.parentRow = "RowCombatText"
this.applyFunc = "BenillaCombatText_UpdateOrLoad"
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowReactives" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowReputation" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowReputation" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsGlobalRow_OnLoad(this, "COMBAT_TEXT_SHOW_REACTIVES",
"Show Reactive Spells and Abilities",
"OPTION_TOOLTIP_COMBAT_TEXT_SHOW_REACTIVES", 1)
this.parentRow = "RowCombatText"
this.applyFunc = "BenillaCombatText_UpdateOrLoad"
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowFriendlyNames" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowReactives" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowReactives" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsGlobalRow_OnLoad(this, "COMBAT_TEXT_SHOW_FRIENDLY_NAMES",
"Show Friendly Healer Names",
"OPTION_TOOLTIP_COMBAT_TEXT_SHOW_FRIENDLY_NAMES", 1)
this.parentRow = "RowCombatText"
this.applyFunc = "BenillaCombatText_UpdateOrLoad"
</OnLoad></Scripts>
</Frame>
<!-- Greyed for all but rogues and druids, as in 1.12. -->
<Frame name="$parentRowComboPoints" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowFriendlyNames" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowFriendlyNames" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsGlobalRow_OnLoad(this, "COMBAT_TEXT_SHOW_COMBO_POINTS",
"Show Combo Points",
"OPTION_TOOLTIP_COMBAT_TEXT_SHOW_COMBO_POINTS", 1)
this.parentRow = "RowCombatText"
this.applyFunc = "BenillaCombatText_UpdateOrLoad"
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowEnergyGains" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowComboPoints" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowComboPoints" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsGlobalRow_OnLoad(this, "COMBAT_TEXT_SHOW_MANA",
"Show Energy Gains",
"OPTION_TOOLTIP_COMBAT_TEXT_SHOW_MANA", 1)
this.parentRow = "RowCombatText"
this.applyFunc = "BenillaCombatText_UpdateOrLoad"
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowHonorGained" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowEnergyGains" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowEnergyGains" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsGlobalRow_OnLoad(this, "COMBAT_TEXT_SHOW_HONOR_GAINED",
"Show Honor Gained",
"OPTION_TOOLTIP_COMBAT_TEXT_SHOW_HONOR_GAINED", 1)
this.parentRow = "RowCombatText"
this.applyFunc = "BenillaCombatText_UpdateOrLoad"
</OnLoad></Scripts>
</Frame>
<!-- CombatDamage masters what floats over a unit, apart
from SHOW_COMBAT_TEXT; at "0" neither `0x607140` nor
`0x6128b0` floats anything. -->
<Frame name="$parentRowShowDamage" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowHonorGained" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowHonorGained" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsRow_OnLoad(this, "CombatDamage", "Show Target Damage",
"OPTION_TOOLTIP_SHOW_DAMAGE")
</OnLoad></Scripts>
</Frame>
<!-- Off drops the SMSG_PERIODICAURALOG body
(`0x626dee`). -->
<Frame name="$parentRowPeriodicDamage" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowShowDamage" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowShowDamage" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsRow_OnLoad(this, "CombatLogPeriodicSpells", "Periodic Damage",
"OPTION_TOOLTIP_LOG_PERIODIC_EFFECTS", 1)
this.parentRow = "RowShowDamage"
</OnLoad></Scripts>
</Frame>
<!-- Also writes PetSpellDamage (l.334-336). -->
<Frame name="$parentRowPetDamage" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowPeriodicDamage" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowPeriodicDamage" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsRow_OnLoad(this, "PetMeleeDamage", "Pet Damage",
"OPTION_TOOLTIP_SHOW_PET_MELEE_DAMAGE", 1)
this.parentRow = "RowShowDamage"
this.partner = { cvar = "PetSpellDamage" }
</OnLoad></Scripts>
</Frame>
</Frames>
</Frame>
<!-- Bar rows are API rows over PLAYER_FIELD_BYTES byte 2, resolved
at click time. Always Show is a uvar: SetActionBarToggles drops
a fifth argument (`0x4e770e`). -->
<Frame name="$parentActionBars" hidden="true">
<Anchors>
<Anchor point="TOPLEFT"/>
<Anchor point="BOTTOMRIGHT"/>
</Anchors>
<Frames>
<Frame name="$parentRowMultiBar1" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT"><Offset><AbsDimension x="10" y="-12"/></Offset></Anchor>
<Anchor point="TOPRIGHT"><Offset><AbsDimension x="-20" y="-12"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsFuncRow_OnLoad(this,
function() return SHOW_MULTI_ACTIONBAR_1 end,
function(value)
local on
if value and value ~= "0" and value ~= 0 then on = 1 end
SHOW_MULTI_ACTIONBAR_1 = on
MultiActionBar_Update()
SetActionBarToggles(SHOW_MULTI_ACTIONBAR_1, SHOW_MULTI_ACTIONBAR_2,
SHOW_MULTI_ACTIONBAR_3, SHOW_MULTI_ACTIONBAR_4)
UIParent_ManageFramePositions()
end,
"0", "Show Bottom Left ActionBar", "OPTION_TOOLTIP_SHOW_MULTIBAR1")
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowMultiBar2" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowMultiBar1" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowMultiBar1" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsFuncRow_OnLoad(this,
function() return SHOW_MULTI_ACTIONBAR_2 end,
function(value)
local on
if value and value ~= "0" and value ~= 0 then on = 1 end
SHOW_MULTI_ACTIONBAR_2 = on
MultiActionBar_Update()
SetActionBarToggles(SHOW_MULTI_ACTIONBAR_1, SHOW_MULTI_ACTIONBAR_2,
SHOW_MULTI_ACTIONBAR_3, SHOW_MULTI_ACTIONBAR_4)
UIParent_ManageFramePositions()
end,
"0", "Show Bottom Right ActionBar", "OPTION_TOOLTIP_SHOW_MULTIBAR2")
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowMultiBar3" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowMultiBar2" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowMultiBar2" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsFuncRow_OnLoad(this,
function() return SHOW_MULTI_ACTIONBAR_3 end,
function(value)
local on
if value and value ~= "0" and value ~= 0 then on = 1 end
SHOW_MULTI_ACTIONBAR_3 = on
MultiActionBar_Update()
SetActionBarToggles(SHOW_MULTI_ACTIONBAR_1, SHOW_MULTI_ACTIONBAR_2,
SHOW_MULTI_ACTIONBAR_3, SHOW_MULTI_ACTIONBAR_4)
UIParent_ManageFramePositions()
end,
"0", "Show Right ActionBar", "OPTION_TOOLTIP_SHOW_MULTIBAR3")
</OnLoad></Scripts>
</Frame>
<!-- Needs Right ActionBar (UIOptionsFrame.lua:722-726). -->
<Frame name="$parentRowMultiBar4" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowMultiBar3" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowMultiBar3" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsFuncRow_OnLoad(this,
function() return SHOW_MULTI_ACTIONBAR_4 end,
function(value)
local on
if value and value ~= "0" and value ~= 0 then on = 1 end
SHOW_MULTI_ACTIONBAR_4 = on
MultiActionBar_Update()
SetActionBarToggles(SHOW_MULTI_ACTIONBAR_1, SHOW_MULTI_ACTIONBAR_2,
SHOW_MULTI_ACTIONBAR_3, SHOW_MULTI_ACTIONBAR_4)
UIParent_ManageFramePositions()
end,
"0", "Show Right ActionBar 2", "OPTION_TOOLTIP_SHOW_MULTIBAR4", 1)
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowAlwaysShowMultibars" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowMultiBar4" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowMultiBar4" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsGlobalRow_OnLoad(this, "ALWAYS_SHOW_MULTIBARS",
"Always Show ActionBars", "OPTION_TOOLTIP_ALWAYS_SHOW_MULTIBARS")
-- UIOptionsFrame.xml:680-683's click arm.
this.applyFunc = "MultiActionBar_UpdateGridVisibility"
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowLockActionBar" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowAlwaysShowMultibars" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowAlwaysShowMultibars" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsGlobalRow_OnLoad(this, "LOCK_ACTIONBAR",
"Lock ActionBars", "OPTION_TOOLTIP_LOCK_ACTIONBAR")
</OnLoad></Scripts>
</Frame>
</Frames>
</Frame>
<!-- No HIDE_OUTDOOR_WORLD_STATE row: there is no zone-objective
tracker. -->
<Frame name="$parentInterface" hidden="true">
<Anchors>
<Anchor point="TOPLEFT"/>
<Anchor point="BOTTOMRIGHT"/>
</Anchors>
<Frames>
<!-- cvarEvent wakes TextStatusBar's CVAR_UPDATE. -->
<Frame name="$parentRowEnhancedTooltips" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT"><Offset><AbsDimension x="10" y="-12"/></Offset></Anchor>
<Anchor point="TOPRIGHT"><Offset><AbsDimension x="-20" y="-12"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>BenillaOptionsRow_OnLoad(this, "UberTooltips", "Enhanced Tooltips",
"OPTION_TOOLTIP_USE_UBERTOOLTIPS")</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowStatusText" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowEnhancedTooltips" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowEnhancedTooltips" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsRow_OnLoad(this, "statusBarText",
"Status Bar Text", "OPTION_TOOLTIP_STATUS_BAR")
this.cvarEvent = "STATUS_BAR_TEXT"
</OnLoad></Scripts>
</Frame>
<!-- Saved globals in 1.12; the mode greys with its switch
(UIOptionsFrame.lua:697-701). -->
<Frame name="$parentRowTargetOfTarget" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowStatusText" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowStatusText" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsGlobalRow_OnLoad(this, "SHOW_TARGET_OF_TARGET",
"Show Target of Target", "OPTION_TOOLTIP_SHOW_TARGET_OF_TARGET")
this.applyFunc = "TargetofTarget_Update"
</OnLoad></Scripts>
</Frame>
<!-- The label is ours, since 1.12 never sets this
dropdown's; entries are its strings in its order. -->
<Frame name="$parentRowTargetOfTargetMode" inherits="BenillaOptionsDropdownRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowTargetOfTarget" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowTargetOfTarget" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsGlobalRow_OnLoad(this, "SHOW_TARGET_OF_TARGET_STATE",
"Show When", "OPTION_TOOLTIP_TARGETOFTARGET5", 1)
BenillaOptionsDropdownRow_Setup(this, {
{ text = "Raid", value = "1", tip = "OPTION_TOOLTIP_TARGETOFTARGET1" },
{ text = "Party", value = "2", tip = "OPTION_TOOLTIP_TARGETOFTARGET2" },
{ text = "Solo", value = "3", tip = "OPTION_TOOLTIP_TARGETOFTARGET3" },
{ text = "Party or Raid", value = "4", tip = "OPTION_TOOLTIP_TARGETOFTARGET4" },
{ text = "Always", value = "5", tip = "OPTION_TOOLTIP_TARGETOFTARGET5" },
})
this.applyFunc = "TargetofTarget_Update"
</OnLoad></Scripts>
</Frame>
<!-- PLAYER_FLAGS bits, API rows
(UIOptionsFrame.lua:18-19). -->
<Frame name="$parentRowShowCloak" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowTargetOfTargetMode" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowTargetOfTargetMode" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsFuncRow_OnLoad(this, ShowingCloak, ShowCloak, "1",
"Show Cloak", "OPTION_TOOLTIP_SHOW_CLOAK")
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowShowHelm" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowShowCloak" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowShowCloak" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsFuncRow_OnLoad(this, ShowingHelm, ShowHelm, "1",
"Show Helm", "OPTION_TOOLTIP_SHOW_HELM")
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowInstantQuestText" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowShowHelm" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowShowHelm" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsGlobalRow_OnLoad(this, "QUEST_FADING_DISABLE",
"Instant Quest Text", "OPTION_TOOLTIP_SHOW_QUEST_FADING")
</OnLoad></Scripts>
</Frame>
<!-- Its applyFunc re-states the buff bar's row pitch. -->
<Frame name="$parentRowBuffDurations" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowInstantQuestText" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowInstantQuestText" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsGlobalRow_OnLoad(this, "SHOW_BUFF_DURATIONS",
"Buff Durations", "OPTION_TOOLTIP_SHOW_BUFF_DURATION")
this.applyFunc = "BuffButtons_UpdatePositions"
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowAutoQuestWatch" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowBuffDurations" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowBuffDurations" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsGlobalRow_OnLoad(this, "AUTO_QUEST_WATCH",
"Automatic Quest Tracking", "OPTION_TOOLTIP_AUTO_QUEST_WATCH")
</OnLoad></Scripts>
</Frame>
<!-- The CVar gates in the shared masker (`0x4a1a66`). -->
<Frame name="$parentRowProfanityFilter" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowAutoQuestWatch" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowAutoQuestWatch" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>BenillaOptionsRow_OnLoad(this, "profanityFilter", "Profanity Filter",
"OPTION_TOOLTIP_PROFANITY_FILTER")</OnLoad></Scripts>
</Frame>
<!-- No Reset Tutorials button: ticking this row resets
them. -->
<Frame name="$parentRowShowTutorials" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowProfanityFilter" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowProfanityFilter" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<!-- Default "1" (UIOptionsFrame.lua:645-646). -->
<Scripts><OnLoad>
BenillaOptionsFuncRow_OnLoad(this, TutorialsEnabled,
BenillaOptionsFrame_SetTutorialsEnabled, "1",
"Show Tutorials", "OPTION_TOOLTIP_SHOW_TUTORIALS")
</OnLoad></Scripts>
</Frame>
<!-- Label and tooltip name the tips differently; both are
1.12's. -->
<Frame name="$parentRowTipOfTheDay" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowShowTutorials" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowShowTutorials" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>BenillaOptionsRow_OnLoad(this, "showGameTips",
"Show Loading Screen Tips",
"OPTION_TOOLTIP_SHOW_TIPOFTHEDAY")</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowNewbieTips" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowTipOfTheDay" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowTipOfTheDay" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsGlobalRow_OnLoad(this, "SHOW_NEWBIE_TIPS",
"Show Detailed Tooltips", "OPTION_TOOLTIP_SHOW_NEWBIE_TIPS")
</OnLoad></Scripts>
</Frame>
</Frames>
</Frame>
<!-- Party Chat Bubbles is not a child: the client gates party
bubbles on their own CVar. -->
<Frame name="$parentChat" hidden="true">
<Anchors>
<Anchor point="TOPLEFT"/>
<Anchor point="BOTTOMRIGHT"/>
</Anchors>
<Frames>
<Frame name="$parentRowGuildMemberAlert" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT"><Offset><AbsDimension x="10" y="-12"/></Offset></Anchor>
<Anchor point="TOPRIGHT"><Offset><AbsDimension x="-20" y="-12"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
<!-- 1.12 registers it "0". -->
BenillaOptionsRow_OnLoad(this, "guildMemberNotify",
"Guild Member Alert",
"OPTION_TOOLTIP_GUILDMEMBER_ALERT")
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowRemoveChatDelay" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowGuildMemberAlert" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowGuildMemberAlert" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
<!-- A uvar, as 1.12's CheckButton18; its applyFunc
moves ChatFrame.xml's fade constants. -->
BenillaOptionsGlobalRow_OnLoad(this, "REMOVE_CHAT_DELAY",
"Remove Chat Hover Delay",
"OPTION_TOOLTIP_REMOVE_CHAT_DELAY")
this.applyFunc = "BenillaChatFrame_ApplyMouseOverDelay"
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowChatBubbles" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowRemoveChatDelay" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowRemoveChatDelay" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsRow_OnLoad(this, "ChatBubbles",
"Show Chat Bubbles", "OPTION_TOOLTIP_CHAT_BUBBLES")
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowLootSpam" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowChatBubbles" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowChatBubbles" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
<!-- Group loot-roll lines only. -->
BenillaOptionsRow_OnLoad(this, "showLootSpam",
"Detailed Loot Information",
"OPTION_TOOLTIP_SHOW_LOOT_SPAM")
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowPartyChatBubbles" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowLootSpam" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowLootSpam" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsRow_OnLoad(this, "ChatBubblesParty",
"Show Party Chat Bubbles", "OPTION_TOOLTIP_PARTY_CHAT_BUBBLES")
</OnLoad></Scripts>
</Frame>
<!-- Inverted, as 1.12 reads (UIOptionsFrame.lua:253-255)
and writes it (l.337). The filter drops a
SpamMessages.dbc match in every chat type but
CHAT_MSG_FILTERED (`0x49aad2`). -->
<Frame name="$parentRowSpamFilter" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowPartyChatBubbles" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowPartyChatBubbles" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsRow_OnLoad(this, "spamFilter", "Disable Spam Filter",
"OPTION_TOOLTIP_DISABLE_SPAM_FILTER")
this.invert = 1
</OnLoad></Scripts>
</Frame>
</Frames>
</Frame>
<!-- The Nameplates page: the V-key plates, then 1.12's UnitName*
checkboxes. The plate rows are era rows: 1.12 has only the
keybindings. -->
<Frame name="$parentNameplates" hidden="true">
<Anchors>
<Anchor point="TOPLEFT"/>
<Anchor point="BOTTOMRIGHT"/>
</Anchors>
<Frames>
<Frame name="$parentRowEnemyPlates" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT"><Offset><AbsDimension x="10" y="-12"/></Offset></Anchor>
<Anchor point="TOPRIGHT"><Offset><AbsDimension x="-20" y="-12"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>BenillaOptionsFuncRow_OnLoad(this, BenillaOptionsFrame_GetEnemyPlates,
BenillaOptionsFrame_SetEnemyPlates, "0", "Enemy Name Plates")</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowFriendlyPlates" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowEnemyPlates" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowEnemyPlates" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>BenillaOptionsFuncRow_OnLoad(this, BenillaOptionsFrame_GetFriendlyPlates,
BenillaOptionsFrame_SetFriendlyPlates, "0", "Friendly Name Plates")</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowPlayerNames" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowFriendlyPlates" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowFriendlyPlates" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>BenillaOptionsRow_OnLoad(this, "UnitNamePlayer", "Player Names",
"OPTION_TOOLTIP_SHOW_PLAYER_NAMES")</OnLoad></Scripts>
</Frame>
<!-- A child of Player Names, as CheckButton22 of 21. -->
<Frame name="$parentRowGuildNames" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowPlayerNames" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowPlayerNames" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsRow_OnLoad(this, "UnitNamePlayerGuild", "Player Guild Names",
"OPTION_TOOLTIP_SHOW_GUILD_NAMES", 1)
this.parentRow = "RowPlayerNames"
</OnLoad></Scripts>
</Frame>
<!-- A child of Player Names on its own CVar, CheckButton23 of
21 (`UIOptionsFrame.lua:24`), greyed with it (`:703-709`). -->
<Frame name="$parentRowPlayerTitles" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowGuildNames" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowGuildNames" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>
BenillaOptionsRow_OnLoad(this, "UnitNamePlayerPVPTitle", "Player Titles",
"OPTION_TOOLTIP_SHOW_PLAYER_TITLES", 1)
this.parentRow = "RowPlayerNames"
</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowNpcNames" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowPlayerTitles" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowPlayerTitles" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>BenillaOptionsRow_OnLoad(this, "UnitNameNPC", "NPC Names",
"OPTION_TOOLTIP_SHOW_NPC_NAMES")</OnLoad></Scripts>
</Frame>
<Frame name="$parentRowOwnName" inherits="BenillaOptionsCheckboxRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRowNpcNames" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
<Anchor point="TOPRIGHT" relativeTo="$parentRowNpcNames" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="-9"/></Offset></Anchor>
</Anchors>
<Scripts><OnLoad>BenillaOptionsRow_OnLoad(this, "UnitNameOwn", "Show Own Name",
"OPTION_TOOLTIP_SHOW_OWN_NAME")</OnLoad></Scripts>
</Frame>
</Frames>
</Frame>
<!-- enableMouse: rows are plain Frames, so the page catches the
wheel. -->
<Frame name="$parentKeybindings" hidden="true" enableMouse="true">
<Anchors>
<Anchor point="TOPLEFT"/>
<Anchor point="BOTTOMRIGHT"/>
</Anchors>
<Layers>
<Layer level="OVERLAY">
<FontString name="$parentOutput" inherits="GameFontNormal">
<Anchors><Anchor point="BOTTOM"><Offset><AbsDimension x="0" y="8"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
<!-- CENTER-40: the 1.12 string clips at CENTER-80. -->
<Frame name="$parentCharacterRow" enableMouse="true">
<Size><AbsDimension y="26"/></Size>
<Anchors>
<Anchor point="TOPLEFT"><Offset><AbsDimension x="10" y="-12"/></Offset></Anchor>
<Anchor point="TOPRIGHT"><Offset><AbsDimension x="-20" y="-12"/></Offset></Anchor>
</Anchors>
<Layers>
<Layer level="OVERLAY">
<FontString name="$parentLabel" inherits="GameFontNormal" justifyH="LEFT">
<Anchors>
<Anchor point="LEFT"><Offset><AbsDimension x="37" y="0"/></Offset></Anchor>
<Anchor point="RIGHT" relativePoint="CENTER"><Offset><AbsDimension x="-45" y="0"/></Offset></Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
<CheckButton name="$parentCheck">
<Size><AbsDimension x="30" y="29"/></Size>
<Anchors><Anchor point="LEFT" relativePoint="CENTER"><Offset><AbsDimension x="-40" y="0"/></Offset></Anchor></Anchors>
<NormalTexture file="Interface\Buttons\UI-CheckBox-Up"/>
<PushedTexture file="Interface\Buttons\UI-CheckBox-Down"/>
<CheckedTexture file="Interface\Buttons\UI-CheckBox-Check"/>
<DisabledCheckedTexture file="Interface\Buttons\UI-CheckBox-Check-Disabled"/>
<Scripts>
<OnClick>BenillaKeyBindings_CharacterToggle(this)</OnClick>
<OnEnter>
GameTooltip:SetOwner(this, "ANCHOR_RIGHT")
GameTooltip:SetText(BenillaKeyBindings_String("CHARACTER_SPECIFIC_KEYBINDING_TOOLTIP",
"Click this to toggle between general key bindings and key bindings specific to this character."), nil, nil, nil, nil, 1)
</OnEnter>
<OnLeave>GameTooltip:Hide()</OnLeave>
</Scripts>
</CheckButton>
</Frames>
<Scripts>
<OnLoad>
getglobal(this:GetName() .. "Label"):SetText(
BenillaKeyBindings_String("CHARACTER_SPECIFIC_KEYBINDINGS", "Character Specific Key Bindings"))
</OnLoad>
</Scripts>
</Frame>
<Frame name="$parentRow1" inherits="BenillaKeyBindingRowTemplate">
<Anchors>
<Anchor point="TOPLEFT"><Offset><AbsDimension x="10" y="-47"/></Offset></Anchor>
<Anchor point="TOPRIGHT"><Offset><AbsDimension x="-32" y="-47"/></Offset></Anchor>
</Anchors>
</Frame>
<Frame name="$parentRow2" inherits="BenillaKeyBindingRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRow1" relativePoint="BOTTOMLEFT"/>
<Anchor point="TOPRIGHT" relativeTo="$parentRow1" relativePoint="BOTTOMRIGHT"/>
</Anchors>
</Frame>
<Frame name="$parentRow3" inherits="BenillaKeyBindingRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRow2" relativePoint="BOTTOMLEFT"/>
<Anchor point="TOPRIGHT" relativeTo="$parentRow2" relativePoint="BOTTOMRIGHT"/>
</Anchors>
</Frame>
<Frame name="$parentRow4" inherits="BenillaKeyBindingRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRow3" relativePoint="BOTTOMLEFT"/>
<Anchor point="TOPRIGHT" relativeTo="$parentRow3" relativePoint="BOTTOMRIGHT"/>
</Anchors>
</Frame>
<Frame name="$parentRow5" inherits="BenillaKeyBindingRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRow4" relativePoint="BOTTOMLEFT"/>
<Anchor point="TOPRIGHT" relativeTo="$parentRow4" relativePoint="BOTTOMRIGHT"/>
</Anchors>
</Frame>
<Frame name="$parentRow6" inherits="BenillaKeyBindingRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRow5" relativePoint="BOTTOMLEFT"/>
<Anchor point="TOPRIGHT" relativeTo="$parentRow5" relativePoint="BOTTOMRIGHT"/>
</Anchors>
</Frame>
<Frame name="$parentRow7" inherits="BenillaKeyBindingRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRow6" relativePoint="BOTTOMLEFT"/>
<Anchor point="TOPRIGHT" relativeTo="$parentRow6" relativePoint="BOTTOMRIGHT"/>
</Anchors>
</Frame>
<Frame name="$parentRow8" inherits="BenillaKeyBindingRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRow7" relativePoint="BOTTOMLEFT"/>
<Anchor point="TOPRIGHT" relativeTo="$parentRow7" relativePoint="BOTTOMRIGHT"/>
</Anchors>
</Frame>
<Frame name="$parentRow9" inherits="BenillaKeyBindingRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRow8" relativePoint="BOTTOMLEFT"/>
<Anchor point="TOPRIGHT" relativeTo="$parentRow8" relativePoint="BOTTOMRIGHT"/>
</Anchors>
</Frame>
<Frame name="$parentRow10" inherits="BenillaKeyBindingRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRow9" relativePoint="BOTTOMLEFT"/>
<Anchor point="TOPRIGHT" relativeTo="$parentRow9" relativePoint="BOTTOMRIGHT"/>
</Anchors>
</Frame>
<Frame name="$parentRow11" inherits="BenillaKeyBindingRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRow10" relativePoint="BOTTOMLEFT"/>
<Anchor point="TOPRIGHT" relativeTo="$parentRow10" relativePoint="BOTTOMRIGHT"/>
</Anchors>
</Frame>
<Frame name="$parentRow12" inherits="BenillaKeyBindingRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRow11" relativePoint="BOTTOMLEFT"/>
<Anchor point="TOPRIGHT" relativeTo="$parentRow11" relativePoint="BOTTOMRIGHT"/>
</Anchors>
</Frame>
<Frame name="$parentRow13" inherits="BenillaKeyBindingRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRow12" relativePoint="BOTTOMLEFT"/>
<Anchor point="TOPRIGHT" relativeTo="$parentRow12" relativePoint="BOTTOMRIGHT"/>
</Anchors>
</Frame>
<Frame name="$parentRow14" inherits="BenillaKeyBindingRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRow13" relativePoint="BOTTOMLEFT"/>
<Anchor point="TOPRIGHT" relativeTo="$parentRow13" relativePoint="BOTTOMRIGHT"/>
</Anchors>
</Frame>
<Frame name="$parentRow15" inherits="BenillaKeyBindingRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRow14" relativePoint="BOTTOMLEFT"/>
<Anchor point="TOPRIGHT" relativeTo="$parentRow14" relativePoint="BOTTOMRIGHT"/>
</Anchors>
</Frame>
<Frame name="$parentRow16" inherits="BenillaKeyBindingRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRow15" relativePoint="BOTTOMLEFT"/>
<Anchor point="TOPRIGHT" relativeTo="$parentRow15" relativePoint="BOTTOMRIGHT"/>
</Anchors>
</Frame>
<Frame name="$parentRow17" inherits="BenillaKeyBindingRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRow16" relativePoint="BOTTOMLEFT"/>
<Anchor point="TOPRIGHT" relativeTo="$parentRow16" relativePoint="BOTTOMRIGHT"/>
</Anchors>
</Frame>
<Frame name="$parentRow18" inherits="BenillaKeyBindingRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRow17" relativePoint="BOTTOMLEFT"/>
<Anchor point="TOPRIGHT" relativeTo="$parentRow17" relativePoint="BOTTOMRIGHT"/>
</Anchors>
</Frame>
<Frame name="$parentRow19" inherits="BenillaKeyBindingRowTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentRow18" relativePoint="BOTTOMLEFT"/>
<Anchor point="TOPRIGHT" relativeTo="$parentRow18" relativePoint="BOTTOMRIGHT"/>
</Anchors>
</Frame>
<!-- Declared before the faux frame so it draws beneath
it. -->
<Frame name="$parentScrollFrameScrollBarTrough" inherits="BenillaScrollTroughTemplate"/>
<!-- Ends at -32, so the kit's bar rides the -26..-10
gutter. -->
<ScrollFrame name="$parentScrollFrame" inherits="FauxScrollFrameTemplate">
<Anchors>
<Anchor point="TOPLEFT"><Offset><AbsDimension x="10" y="-47"/></Offset></Anchor>
<Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="-32" y="28"/></Offset></Anchor>
</Anchors>
<Scripts>
<OnLoad>ScrollFrame_OnLoad()</OnLoad>
<!-- BENILLA_KEYBINDINGS_ROW_HEIGHT must stay a global: this
chunk cannot see another file's local. -->
<OnVerticalScroll>FauxScrollFrame_OnVerticalScroll(BENILLA_KEYBINDINGS_ROW_HEIGHT, BenillaKeyBindingsPage_Update)</OnVerticalScroll>
<!-- Fires before the page's guard, so it is
replaced: an armed capsule binds the wheel. -->
<OnMouseWheel>
if BenillaKeyBindingsPage.selected then
BenillaKeyBindings_OnMouseWheel(arg1)
else
ScrollFrameTemplate_OnMouseWheel(arg1)
end
</OnMouseWheel>
</Scripts>
</ScrollFrame>
</Frames>
<!-- Rows and the bar bubble the wheel here; the rows' own
clicks too, so mouse 3-5 bind over the page. -->
<Scripts>
<OnMouseWheel>
if BenillaKeyBindingsPage.selected then
BenillaKeyBindings_OnMouseWheel(arg1)
else
BenillaFauxScrollFrame_OnMouseWheel(getglobal(this:GetName() .. "ScrollFrame"), arg1)
end
</OnMouseWheel>
<OnMouseUp>BenillaKeyBindings_OnKeyDown(arg1)</OnMouseUp>
</Scripts>
</Frame>
<!-- One per BENILLA_OPTIONS_PAGE_ROWS page. -->
<Button name="$parentSearchHeadControls" inherits="BenillaOptionsSearchHeadTemplate">
<Scripts><OnLoad>
this.categoryKey = "Controls"
getglobal(this:GetName() .. "Label"):SetText("Controls")
</OnLoad></Scripts>
</Button>
<Button name="$parentSearchHeadAudio" inherits="BenillaOptionsSearchHeadTemplate">
<Scripts><OnLoad>
this.categoryKey = "Audio"
getglobal(this:GetName() .. "Label"):SetText("Audio")
</OnLoad></Scripts>
</Button>
<Button name="$parentSearchHeadGraphics" inherits="BenillaOptionsSearchHeadTemplate">
<Scripts><OnLoad>
this.categoryKey = "Graphics"
getglobal(this:GetName() .. "Label"):SetText("Graphics")
</OnLoad></Scripts>
</Button>
<Button name="$parentSearchHeadCombat" inherits="BenillaOptionsSearchHeadTemplate">
<Scripts><OnLoad>
this.categoryKey = "Combat"
getglobal(this:GetName() .. "Label"):SetText("Combat")
</OnLoad></Scripts>
</Button>
<Button name="$parentSearchHeadActionBars" inherits="BenillaOptionsSearchHeadTemplate">
<Scripts><OnLoad>
this.categoryKey = "ActionBars"
getglobal(this:GetName() .. "Label"):SetText("Action Bars")
</OnLoad></Scripts>
</Button>
<Button name="$parentSearchHeadInterface" inherits="BenillaOptionsSearchHeadTemplate">
<Scripts><OnLoad>
this.categoryKey = "Interface"
getglobal(this:GetName() .. "Label"):SetText("Interface")
</OnLoad></Scripts>
</Button>
<Button name="$parentSearchHeadChat" inherits="BenillaOptionsSearchHeadTemplate">
<Scripts><OnLoad>
this.categoryKey = "Chat"
getglobal(this:GetName() .. "Label"):SetText("Chat")
</OnLoad></Scripts>
</Button>
<Button name="$parentSearchHeadNameplates" inherits="BenillaOptionsSearchHeadTemplate">
<Scripts><OnLoad>
this.categoryKey = "Nameplates"
getglobal(this:GetName() .. "Label"):SetText("Nameplates")
</OnLoad></Scripts>
</Button>
<Button name="$parentSearchHeadKeybindings" inherits="BenillaOptionsSearchHeadTemplate">
<Scripts><OnLoad>
this.categoryKey = "Keybindings"
getglobal(this:GetName() .. "Label"):SetText("Keybindings")
</OnLoad></Scripts>
</Button>
<!-- BENILLA_KEYBINDINGS_SEARCH_ROWS (8) frames. -->
<Frame name="$parentKeybindSearch1" inherits="BenillaKeyBindingRowTemplate" hidden="true"/>
<Frame name="$parentKeybindSearch2" inherits="BenillaKeyBindingRowTemplate" hidden="true"/>
<Frame name="$parentKeybindSearch3" inherits="BenillaKeyBindingRowTemplate" hidden="true"/>
<Frame name="$parentKeybindSearch4" inherits="BenillaKeyBindingRowTemplate" hidden="true"/>
<Frame name="$parentKeybindSearch5" inherits="BenillaKeyBindingRowTemplate" hidden="true"/>
<Frame name="$parentKeybindSearch6" inherits="BenillaKeyBindingRowTemplate" hidden="true"/>
<Frame name="$parentKeybindSearch7" inherits="BenillaKeyBindingRowTemplate" hidden="true"/>
<Frame name="$parentKeybindSearch8" inherits="BenillaKeyBindingRowTemplate" hidden="true"/>
</Frames>
</Frame>
<!-- Inset 21/20 so the trough, which hangs 21 above and 20 below the
bar, lands flush. -->
<Slider name="$parentBar" inherits="BenillaScrollBarTemplate" hidden="true">
<Anchors>
<Anchor point="TOPRIGHT"><Offset><AbsDimension x="-10" y="-21"/></Offset></Anchor>
<Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="-10" y="20"/></Offset></Anchor>
</Anchors>
<Scripts><OnValueChanged>BenillaScrollBar_OnValueChanged(this, arg1)</OnValueChanged></Scripts>
</Slider>
</Frames>
</ScrollFrame>
</Frames>
</Frame>
<!-- The search box: the era geometry in the 1.12 Common-Input-Border; no magnifier,
which has no 1.12 art, so the text inset is 5, not 16. -->
<EditBox name="$parentSearchBox" autoFocus="false" letters="64">
<Size><AbsDimension x="350" y="22"/></Size>
<Anchors>
<Anchor point="BOTTOMRIGHT" relativeTo="$parentContainer" relativePoint="TOPRIGHT"><Offset><AbsDimension x="4" y="20"/></Offset></Anchor>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<Texture name="$parentBorderLeft" file="Interface\Common\Common-Input-Border">
<Size><AbsDimension x="8" y="20"/></Size>
<Anchors><Anchor point="LEFT"><Offset><AbsDimension x="-5" y="0"/></Offset></Anchor></Anchors>
<TexCoords left="0" right="0.0625" top="0" bottom="0.625"/>
</Texture>
<Texture name="$parentBorderRight" file="Interface\Common\Common-Input-Border">
<Size><AbsDimension x="8" y="20"/></Size>
<Anchors><Anchor point="RIGHT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor></Anchors>
<TexCoords left="0.9375" right="1" top="0" bottom="0.625"/>
</Texture>
<Texture name="$parentBorderMiddle" file="Interface\Common\Common-Input-Border">
<Size><AbsDimension y="20"/></Size>
<Anchors>
<Anchor point="LEFT" relativeTo="$parentBorderLeft" relativePoint="RIGHT"/>
<Anchor point="RIGHT" relativeTo="$parentBorderRight" relativePoint="LEFT"/>
</Anchors>
<TexCoords left="0.0625" right="0.9375" top="0" bottom="0.625"/>
</Texture>
</Layer>
<Layer level="ARTWORK">
<!-- The placeholder (the era instructions label, tinted 0.35). -->
<FontString name="$parentInstructions" inherits="GameFontDisableSmall" justifyH="LEFT" text="Search">
<Anchors>
<Anchor point="TOPLEFT"><Offset><AbsDimension x="5" y="0"/></Offset></Anchor>
<Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="-20" y="0"/></Offset></Anchor>
</Anchors>
<Color r="0.35" g="0.35" b="0.35"/>
</FontString>
</Layer>
</Layers>
<Frames>
<!-- The clear button (era ClearButtonMixin), half alpha until hovered. -->
<Button name="$parentClearButton" hidden="true">
<Size><AbsDimension x="17" y="17"/></Size>
<Anchors><Anchor point="RIGHT"><Offset><AbsDimension x="-3" y="0"/></Offset></Anchor></Anchors>
<Layers>
<Layer level="ARTWORK">
<Texture name="$parentIcon" file="Interface\Buttons\UI-Panel-MinimizeButton-Up" alpha="0.5">
<Size><AbsDimension x="17" y="17"/></Size>
<Anchors><Anchor point="CENTER"/></Anchors>
</Texture>
</Layer>
</Layers>
<Scripts>
<OnClick>
BenillaOptionsFrameSearchBox:SetText("")
BenillaOptionsFrameSearchBox:ClearFocus()
</OnClick>
<OnEnter>getglobal(this:GetName() .. "Icon"):SetAlpha(1.0)</OnEnter>
<OnLeave>getglobal(this:GetName() .. "Icon"):SetAlpha(0.5)</OnLeave>
</Scripts>
</Button>
</Frames>
<TextInsets><AbsInset left="5" right="20" top="0" bottom="0"/></TextInsets>
<Scripts>
<OnTextChanged>
if this:GetText() == "" then
BenillaOptionsFrameSearchBoxInstructions:Show()
BenillaOptionsFrameSearchBoxClearButton:Hide()
else
BenillaOptionsFrameSearchBoxInstructions:Hide()
BenillaOptionsFrameSearchBoxClearButton:Show()
end
BenillaOptionsSearch_OnTextChanged(this:GetText())
</OnTextChanged>
<OnEscapePressed>this:ClearFocus()</OnEscapePressed>
</Scripts>
<FontString inherits="GameFontHighlightSmall"/>
</EditBox>
<!-- ── Close: no corner X; the red button and ESC close the window ── -->
<Button name="$parentCloseButton" inherits="BenillaOptionsRedButtonTemplate" text="Close">
<Anchors><Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="-16" y="16"/></Offset></Anchor></Anchors>
<Scripts>
<OnClick>
PlaySound("igMainMenuClose")
HideUIPanel(BenillaOptionsFrame)
</OnClick>
</Scripts>
</Button>
<!-- The era Apply, shown with a pending edit. -->
<Button name="$parentApplyButton" inherits="BenillaOptionsRedButtonTemplate" text="Apply" hidden="true">
<Anchors><Anchor point="RIGHT" relativeTo="$parentCloseButton" relativePoint="LEFT"><Offset><AbsDimension x="-2" y="0"/></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>this:Disable()</OnLoad>
<OnClick>BenillaOptionsPage_Apply()</OnClick>
</Scripts>
</Button>
</Frames>
<Scripts>
<!-- Controls by default; selection persists and the scale re-fits, as the era's. -->
<OnShow>
BenillaOptionsFrame_UpdateScale()
BenillaOptionsTab_FitWidth(BenillaOptionsFrameGameTab)
BenillaOptionsTab_FitWidth(BenillaOptionsFrameAddOnsTab)
BenillaOptionsFrame_SelectCategory(this.selectedCategory or "Controls")
if UpdateMicroButtons then UpdateMicroButtons() end
</OnShow>
<!-- The Keybindings capture, 1.12's KeyBindingFrame OnClick and OnKeyDown
(Blizzard_BindingUI.xml:538-543) and its list's wheel (:377-387): keyboard and
wheel stay off until a capsule is selected (BenillaKeyBindings_SetSelected). -->
<OnLoad>
this:EnableKeyboard(false)
this:EnableMouseWheel(false)
</OnLoad>
<OnKeyDown>BenillaKeyBindings_OnKeyDown()</OnKeyDown>
<OnMouseUp>BenillaKeyBindings_OnKeyDown(arg1)</OnMouseUp>
<OnMouseWheel>BenillaKeyBindings_OnMouseWheel(arg1)</OnMouseWheel>
<!-- Hiding ends a search, discards pending edits, and disarms a bind capture. -->
<OnHide>
BenillaOptionsFrameSearchBox:SetText("")
BenillaOptionsPage_DiscardPending()
BenillaKeyBindings_SetSelected(nil)
BenillaKeyBindings_Output("")
if UpdateMicroButtons then UpdateMicroButtons() end
</OnHide>
</Scripts>
</Frame>
<!-- BenillaOptionsFrame, because the stock OptionsFrame.xml owns `OptionsFrame`. Chat-tab hover
(FloatingChatFrame.lua:842/860) reads the hidden UIOptionsFrame, so it works while this
window, which does not cover the chat, is open. -->
<Script><![CDATA[
-- The reference's OptionsFrame row (UIParent.lua:16): the centre slot, openable while dead.
UIPanelWindows["BenillaOptionsFrame"] = { area = "center", pushable = 0, whileDead = 1 }
]]></Script>
</Ui>