mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 08:00:42 +00:00
* feat(debugtools): add zhCN localization for ClassicAPI_DebugTools
* fix(locales): add 6 missing global strings to zhCN
* feat(debugtools): clean up slash command dispatch and add help subcommand
* fix(debugtools): use %s instead of %d in PROFILER_CALLS_FORMAT
ns.Count() always returns a string (either a formatted number or '-'),
never a number. Feeding it to %d causes format() to throw. Change the
locale template to %s so both '-', '1,234', etc. render correctly.
* fix(debugtools): repair regressions from the localization pass
- XML labels: 1.12's Button/FontString loader passes the text attribute
verbatim to FrameScript_GetText (0x703BF0), which reads the global of
exactly that name and falls back to the raw value. Nothing strips
"$...$", so text="$TI_SHOW$" rendered as literal "$TI_SHOW$". Use the
bare global name, as stock FrameXML does.
- Tabs: ns.AddTab(name, label) keeps a fixed English key for ns.ShowIn
and a separate localized button label. Keying tabs by the translated
name made ShowIn("Globals") return nil and error on a zhCN client.
- Frames tab state: restore visible / "shown, parent hidden" / hidden.
The inverted branch reported a shown frame under a hidden parent as
hidden and made the third state unreachable.
- /profiler: unknown or incomplete subcommands print the usage again
instead of doing nothing.
- Deep Tracking / CPU Profiling buttons: split the label from ON/OFF so
the state keeps its accent / grey colour.
- Restore the gap between owner and CPU time in the frame-stack and
Frames-tab tooltips, and the leading space of " (replaced)".
- zhCN: ADDON_OPTIONS titles the shared Interface Options panel and the
game-menu button, not ClassicAPI's own settings; revert to 插件设置.
---------
Co-authored-by: jilinge <jilinge@users.noreply.github.com>
Co-authored-by: Brues <5278969+brues-code@users.noreply.github.com>
321 lines
12 KiB
XML
321 lines
12 KiB
XML
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd">
|
|
<!-- Backport of retail's Blizzard_DebugTools/Blizzard_TableInspector.xml.
|
|
1.12 differences: the gear-manager border and title art (not in 1.12)
|
|
are a backdrop and a plain title bar, and the body is a plain black
|
|
fill (retail's tooltip-background file with a black <Color> drew
|
|
grey here, not black); the open-parent and duplicate
|
|
buttons use 1.12's scroll-up and plus buttons; the filter box is
|
|
TableInspectorInputBoxTemplate (SearchBoxTemplate is not in 1.12); and the scroll
|
|
frame is TableInspectorScrollFrameTemplate (see TableInspector.lua). -->
|
|
<Script file="TableInspector.lua"/>
|
|
|
|
<ScrollFrame name="TableInspectorScrollFrameTemplate" mixin="TableInspectorScrollFrameMixin" enableMouse="true" virtual="true">
|
|
<Frames>
|
|
<Slider parentKey="ScrollBar" orientation="VERTICAL">
|
|
<Size x="16" y="0"/>
|
|
<Anchors>
|
|
<Anchor point="TOPLEFT" relativePoint="TOPRIGHT" x="10" y="-7"/>
|
|
<Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT" x="10" y="8"/>
|
|
</Anchors>
|
|
<Layers>
|
|
<Layer level="BACKGROUND">
|
|
<Texture setAllPoints="true">
|
|
<Color r=".8" g=".8" b="1" a="0.1"/>
|
|
</Texture>
|
|
</Layer>
|
|
</Layers>
|
|
<Scripts>
|
|
<OnValueChanged function="TableInspectorScrollBar_OnValueChanged"/>
|
|
</Scripts>
|
|
<ThumbTexture file="Interface\Buttons\UI-ScrollBar-Knob">
|
|
<Size x="16" y="16"/>
|
|
<TexCoords left="0.25" right="0.75" top="0.25" bottom="0.75"/>
|
|
</ThumbTexture>
|
|
</Slider>
|
|
</Frames>
|
|
<Scripts>
|
|
<OnLoad method="OnLoad"/>
|
|
<OnScrollRangeChanged method="OnScrollRangeChanged"/>
|
|
<OnVerticalScroll method="OnVerticalScroll"/>
|
|
<OnMouseWheel method="OnMouseWheel"/>
|
|
</Scripts>
|
|
</ScrollFrame>
|
|
|
|
<!-- 1.12's InputBoxTemplate with parent keys in place of names. The stock
|
|
template names its border $parentLeft / $parentRight and anchors the
|
|
middle to those names; in an unnamed pooled window $parent resolves to
|
|
UIParent, so every inspector's box would share one set of globals. -->
|
|
<EditBox name="TableInspectorInputBoxTemplate" enableMouse="true" virtual="true">
|
|
<Layers>
|
|
<Layer level="BACKGROUND">
|
|
<Texture parentKey="Left" file="Interface\Common\Common-Input-Border">
|
|
<Size x="8" y="20"/>
|
|
<Anchors>
|
|
<Anchor point="LEFT" x="-5" y="0"/>
|
|
</Anchors>
|
|
<TexCoords left="0" right="0.0625" top="0" bottom="0.625"/>
|
|
</Texture>
|
|
<Texture parentKey="Right" file="Interface\Common\Common-Input-Border">
|
|
<Size x="8" y="20"/>
|
|
<Anchors>
|
|
<Anchor point="RIGHT"/>
|
|
</Anchors>
|
|
<TexCoords left="0.9375" right="1.0" top="0" bottom="0.625"/>
|
|
</Texture>
|
|
<Texture parentKey="Middle" file="Interface\Common\Common-Input-Border">
|
|
<Size x="10" y="20"/>
|
|
<Anchors>
|
|
<Anchor point="LEFT" relativeKey="$parent.Left" relativePoint="RIGHT"/>
|
|
<Anchor point="RIGHT" relativeKey="$parent.Right" relativePoint="LEFT"/>
|
|
</Anchors>
|
|
<TexCoords left="0.0625" right="0.9375" top="0" bottom="0.625"/>
|
|
</Texture>
|
|
</Layer>
|
|
</Layers>
|
|
<Scripts>
|
|
<OnEscapePressed>
|
|
self:ClearFocus();
|
|
</OnEscapePressed>
|
|
<OnEditFocusLost>
|
|
self:HighlightText(0, 0);
|
|
</OnEditFocusLost>
|
|
<OnEditFocusGained>
|
|
self:HighlightText();
|
|
</OnEditFocusGained>
|
|
</Scripts>
|
|
<FontString inherits="ChatFontNormal"/>
|
|
</EditBox>
|
|
|
|
<Frame name="TableAttributeDisplayTemplate" parent="UIParent" mixin="TableInspectorMixin" movable="true" clampedToScreen="true" hidden="true" frameStrata="DIALOG" toplevel="true" virtual="true">
|
|
<Size x="500" y="400"/>
|
|
<Anchors>
|
|
<Anchor point="LEFT" x="64" y="0"/>
|
|
</Anchors>
|
|
<Backdrop edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
|
|
<TileSize>
|
|
<AbsValue val="16"/>
|
|
</TileSize>
|
|
<EdgeSize>
|
|
<AbsValue val="16"/>
|
|
</EdgeSize>
|
|
</Backdrop>
|
|
<Layers>
|
|
<Layer level="BACKGROUND">
|
|
<Texture parentKey="TitleBG">
|
|
<Anchors>
|
|
<Anchor point="TOPLEFT" x="5" y="-5"/>
|
|
<Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT" x="-5" y="-24"/>
|
|
</Anchors>
|
|
<Color r="0.1" g="0.1" b="0.1" a="0.95"/>
|
|
</Texture>
|
|
<Texture parentKey="DialogBG">
|
|
<Anchors>
|
|
<Anchor point="TOPLEFT" x="5" y="-24"/>
|
|
<Anchor point="BOTTOMRIGHT" x="-5" y="5"/>
|
|
</Anchors>
|
|
<Color r="0" g="0" b="0" a=".75"/>
|
|
</Texture>
|
|
</Layer>
|
|
</Layers>
|
|
<Frames>
|
|
<Button parentKey="OpenParentButton">
|
|
<Size x="24" y="24"/>
|
|
<Anchors>
|
|
<Anchor point="TOPLEFT" x="4" y="-2"/>
|
|
</Anchors>
|
|
<Scripts>
|
|
<OnClick function="TableAttributeDisplayParentButton_OnClick"/>
|
|
</Scripts>
|
|
<NormalTexture file="Interface\Buttons\UI-ScrollBar-ScrollUpButton-Up"/>
|
|
<PushedTexture file="Interface\Buttons\UI-ScrollBar-ScrollUpButton-Down"/>
|
|
<DisabledTexture file="Interface\Buttons\UI-ScrollBar-ScrollUpButton-Disabled"/>
|
|
<HighlightTexture file="Interface\Buttons\UI-ScrollBar-ScrollUpButton-Highlight" alphaMode="ADD"/>
|
|
</Button>
|
|
<Button parentKey="NavigateBackwardButton">
|
|
<Size x="24" y="24"/>
|
|
<Anchors>
|
|
<Anchor point="LEFT" relativeKey="$parent.OpenParentButton" relativePoint="RIGHT" x="-4" y="0"/>
|
|
</Anchors>
|
|
<Scripts>
|
|
<OnClick function="TableAttributeDisplayNavigateBackwardButton_OnClick"/>
|
|
</Scripts>
|
|
<NormalTexture file="Interface\Glues\Common\Glue-LeftArrow-Button-Up"/>
|
|
<PushedTexture file="Interface\Glues\Common\Glue-LeftArrow-Button-Down"/>
|
|
<DisabledTexture file="Interface\Buttons\UI-Panel-MinimizeButton-Disabled"/>
|
|
<HighlightTexture file="Interface\Glues\Common\Glue-LeftArrow-Button-Highlight" alphaMode="ADD"/>
|
|
</Button>
|
|
<Button parentKey="NavigateForwardButton">
|
|
<Size x="24" y="24"/>
|
|
<Anchors>
|
|
<Anchor point="LEFT" relativeKey="$parent.NavigateBackwardButton" relativePoint="RIGHT" x="-8" y="0"/>
|
|
</Anchors>
|
|
<Scripts>
|
|
<OnClick function="TableAttributeDisplayNavigateForwardButton_OnClick"/>
|
|
</Scripts>
|
|
<NormalTexture file="Interface\Glues\Common\Glue-RightArrow-Button-Up"/>
|
|
<PushedTexture file="Interface\Glues\Common\Glue-RightArrow-Button-Down"/>
|
|
<DisabledTexture file="Interface\Buttons\UI-Panel-MinimizeButton-Disabled"/>
|
|
<HighlightTexture file="Interface\Glues\Common\Glue-RightArrow-Button-Highlight" alphaMode="ADD"/>
|
|
</Button>
|
|
<Button parentKey="DuplicateButton">
|
|
<Size x="20" y="20"/>
|
|
<Anchors>
|
|
<Anchor point="LEFT" relativeKey="$parent.NavigateForwardButton" relativePoint="RIGHT" x="-2" y="0"/>
|
|
</Anchors>
|
|
<Scripts>
|
|
<OnClick function="TableAttributeDisplayDuplicateButton_OnClick"/>
|
|
</Scripts>
|
|
<NormalTexture file="Interface\Buttons\UI-PlusButton-Up"/>
|
|
<PushedTexture file="Interface\Buttons\UI-PlusButton-Down"/>
|
|
<HighlightTexture file="Interface\Buttons\UI-PlusButton-Hilight" alphaMode="ADD"/>
|
|
</Button>
|
|
<CheckButton parentKey="VisibilityButton">
|
|
<Size x="32" y="32"/>
|
|
<Anchors>
|
|
<Anchor point="LEFT" relativePoint="TOPLEFT" x="20" y="-44"/>
|
|
</Anchors>
|
|
<Layers>
|
|
<Layer level="OVERLAY">
|
|
<FontString parentKey="Label" inherits="GameFontWhite" text="TI_SHOW">
|
|
<Anchors>
|
|
<Anchor point="LEFT" relativePoint="RIGHT"/>
|
|
</Anchors>
|
|
</FontString>
|
|
</Layer>
|
|
</Layers>
|
|
<Scripts>
|
|
<OnClick function="TableAttributeDisplayVisibilityButton_OnClick"/>
|
|
</Scripts>
|
|
<NormalTexture file="Interface\Buttons\UI-CheckBox-Up"/>
|
|
<PushedTexture file="Interface\Buttons\UI-CheckBox-Down"/>
|
|
<HighlightTexture file="Interface\Buttons\UI-CheckBox-Highlight" alphaMode="ADD"/>
|
|
<CheckedTexture file="Interface\Buttons\UI-CheckBox-Check"/>
|
|
<DisabledCheckedTexture file="Interface\Buttons\UI-CheckBox-Check-Disabled"/>
|
|
</CheckButton>
|
|
<CheckButton parentKey="HighlightButton">
|
|
<Size x="32" y="32"/>
|
|
<Anchors>
|
|
<Anchor point="LEFT" relativeKey="$parent.VisibilityButton.Label" relativePoint="RIGHT" x="4" y="0"/>
|
|
</Anchors>
|
|
<Layers>
|
|
<Layer level="OVERLAY">
|
|
<FontString parentKey="Label" inherits="GameFontWhite" text="TI_HIGHLIGHT">
|
|
<Anchors>
|
|
<Anchor point="LEFT" relativePoint="RIGHT"/>
|
|
</Anchors>
|
|
</FontString>
|
|
</Layer>
|
|
</Layers>
|
|
<Scripts>
|
|
<OnClick function="TableAttributeDisplayHighlightButton_OnClick"/>
|
|
</Scripts>
|
|
<NormalTexture file="Interface\Buttons\UI-CheckBox-Up"/>
|
|
<PushedTexture file="Interface\Buttons\UI-CheckBox-Down"/>
|
|
<HighlightTexture file="Interface\Buttons\UI-CheckBox-Highlight" alphaMode="ADD"/>
|
|
<CheckedTexture file="Interface\Buttons\UI-CheckBox-Check"/>
|
|
<DisabledCheckedTexture file="Interface\Buttons\UI-CheckBox-Check-Disabled"/>
|
|
</CheckButton>
|
|
<CheckButton parentKey="DynamicUpdateButton">
|
|
<Size x="32" y="32"/>
|
|
<Anchors>
|
|
<Anchor point="LEFT" relativeKey="$parent.HighlightButton.Label" relativePoint="RIGHT" x="4" y="0"/>
|
|
</Anchors>
|
|
<Layers>
|
|
<Layer level="OVERLAY">
|
|
<FontString parentKey="Label" inherits="GameFontWhite" text="TI_DYNAMIC_UPDATES">
|
|
<Anchors>
|
|
<Anchor point="LEFT" relativePoint="RIGHT"/>
|
|
</Anchors>
|
|
</FontString>
|
|
</Layer>
|
|
</Layers>
|
|
<Scripts>
|
|
<OnClick function="TableAttributeDisplayDynamicUpdateButton_OnClick"/>
|
|
</Scripts>
|
|
<NormalTexture file="Interface\Buttons\UI-CheckBox-Up"/>
|
|
<PushedTexture file="Interface\Buttons\UI-CheckBox-Down"/>
|
|
<HighlightTexture file="Interface\Buttons\UI-CheckBox-Highlight" alphaMode="ADD"/>
|
|
<CheckedTexture file="Interface\Buttons\UI-CheckBox-Check"/>
|
|
<DisabledCheckedTexture file="Interface\Buttons\UI-CheckBox-Check-Disabled"/>
|
|
</CheckButton>
|
|
<EditBox parentKey="FilterBox" inherits="TableInspectorInputBoxTemplate" autoFocus="false" letters="64">
|
|
<Size x="130" y="16"/>
|
|
<Anchors>
|
|
<Anchor point="LEFT" relativeKey="$parent.DynamicUpdateButton.Label" relativePoint="RIGHT" x="12" y="0"/>
|
|
</Anchors>
|
|
<Scripts>
|
|
<OnEnterPressed function="TableInspectorFilterBox_OnEnterPressed"/>
|
|
<OnTextChanged function="TableInspectorFilterBox_OnTextChanged"/>
|
|
</Scripts>
|
|
<FontString inherits="ChatFontNormal"/>
|
|
</EditBox>
|
|
<Button parentKey="CloseButton" inherits="UIPanelCloseButton">
|
|
<Size x="24" y="24"/>
|
|
<Anchors>
|
|
<Anchor point="TOPRIGHT" x="-4" y="-2"/>
|
|
</Anchors>
|
|
</Button>
|
|
<Button parentKey="TitleButton" inherits="TruncatedTooltipScriptTemplate, PanelDragBarTemplate">
|
|
<Size x="375" y="16"/>
|
|
<Anchors>
|
|
<Anchor point="TOPLEFT" relativeKey="$parent.TitleBG"/>
|
|
<Anchor point="BOTTOMRIGHT" relativeKey="$parent.TitleBG"/>
|
|
</Anchors>
|
|
<Layers>
|
|
<Layer level="OVERLAY">
|
|
<FontString parentKey="Text" inherits="GameFontNormal" justifyH="LEFT">
|
|
<Size x="375" y="16"/>
|
|
<Anchors>
|
|
<Anchor point="LEFT" relativeKey="$parent.$parent.DuplicateButton" relativePoint="RIGHT" x="4"/>
|
|
</Anchors>
|
|
</FontString>
|
|
</Layer>
|
|
</Layers>
|
|
<Frames>
|
|
<Frame parentKey="Highlight" setAllPoints="true" hidden="true">
|
|
<Layers>
|
|
<Layer level="OVERLAY">
|
|
<Texture file="Interface\Buttons\UI-ListBox-Highlight" setAllPoints="true">
|
|
<Color r="1" g="1" b="1" a="0.4"/>
|
|
</Texture>
|
|
</Layer>
|
|
</Layers>
|
|
</Frame>
|
|
</Frames>
|
|
</Button>
|
|
<ScrollFrame parentKey="LinesScrollFrame" inherits="TableInspectorScrollFrameTemplate">
|
|
<Size x="430" y="300"/>
|
|
<Anchors>
|
|
<Anchor point="TOPLEFT" x="20" y="-70"/>
|
|
</Anchors>
|
|
<ScrollChild>
|
|
<Frame parentKey="LinesContainer">
|
|
<Size x="300" y="10"/>
|
|
<Anchors>
|
|
<Anchor point="TOPLEFT"/>
|
|
</Anchors>
|
|
</Frame>
|
|
</ScrollChild>
|
|
</ScrollFrame>
|
|
<Frame parentKey="ScrollFrameArt">
|
|
<Anchors>
|
|
<Anchor point="TOPLEFT" relativeKey="$parent.LinesScrollFrame" x="-6" y="6"/>
|
|
<Anchor point="BOTTOMRIGHT" relativeKey="$parent.LinesScrollFrame.ScrollBar" x="6" y="-14"/>
|
|
</Anchors>
|
|
<Backdrop edgeFile="Interface\Tooltips\UI-Tooltip-Border">
|
|
<EdgeSize>
|
|
<AbsValue val="16"/>
|
|
</EdgeSize>
|
|
</Backdrop>
|
|
</Frame>
|
|
<Frame parentKey="FrameHighlight" inherits="FrameHighlightTemplate"/>
|
|
</Frames>
|
|
</Frame>
|
|
|
|
<Frame name="TableAttributeDisplay" inherits="TableAttributeDisplayTemplate">
|
|
<Scripts>
|
|
<OnLoad method="OnLoad"/>
|
|
</Scripts>
|
|
</Frame>
|
|
</Ui>
|