📄 tcc_option.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/ ..\..\UI.xsd">
<Button name="tCC_OptionButtonTemplate" inherits="UIPanelButtonTemplate" virtual="true">
<Size x="60" y="26"/>
<Scripts>
<OnClick>
getglobal("tCC_Option"..tCC_Option.index):Enable()
this:Disable()
tCC_Option.index = this.index
tCC_Option_LoadOptions(tCC_Option.index)
</OnClick>
</Scripts>
</Button>
<CheckButton name="tCC_OptionCheckButtonTemplate" inherits="UIOptionsCheckButtonTemplate" virtual="true">
<HitRectInsets>
<AbsInset left="0" right="0" top="0" bottom="0"/>
</HitRectInsets>
<Size x="24" y="25"/>
<Layers>
<Layer level="ARTWORK">
<FontString name="$parentText" inherits="GameFontNormalSmall" justifyH="LEFT">
<Anchors>
<Anchor point="LEFT" relativePoint="RIGHT"/>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnClick>
local check = this:GetChecked() and true
tCCDB[tCC_Option.index][this.var] = check
tCC_Option_UpdateEnOrDis(this.auto, check)
</OnClick>
</Scripts>
</CheckButton>
<Slider name="tCC_OptionSliderTemplate" inherits="OptionsSliderTemplate" virtual="true">
<Size x="150" y="17"/>
<Scripts>
<OnValueChanged>
local value = this:GetValue()
if this.disable then
if tCCDB[tCC_Option.index][this.var] ~= value then
this:SetValue(tCCDB[tCC_Option.index][this.var])
end
else
tCCDB[tCC_Option.index][this.var] = value
if math.floor(value) ~= value then
value = math.floor(value * 100) / 100
end
if this.string then
value = this.string[value] or value
end
this.font:SetText(this.text .. value)
end
</OnValueChanged>
</Scripts>
</Slider>
<EditBox name="tCC_OptionEditBoxTemplate" inherits="InputBoxTemplate" enableMouse="false" autoFocus="false" virtual="true">
<Size x="150" y="20"/>
<Layers>
<Layer level="ARTWORK">
<FontString name="$parentText" inherits="GameFontNormalSmall" justifyH="CENTER">
<Anchors>
<Anchor point="BOTTOM" relativePoint="TOP"/>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnEscapePressed>
this:SetText(tCCDB[tCC_Option.index][string.lower(this.index)])
this:ClearFocus()
</OnEscapePressed>
<OnMouseUp>
if this.disable then
this:ClearFocus()
elseif this.drop then
ToggleDropDownMenu(1, nil, _G["tCC_Option"..this.drop], this, 0, 0)
end
</OnMouseUp>
</Scripts>
</EditBox>
<Button name="tCC_OptionColorPickerTemplate" virtual="true">
<Size x="32" y="32"/>
<Layers>
<Layer level="BACKGROUND">
<Texture name="$parentSwatchBackground">
<Size x="24" y="24"/>
<Anchors>
<Anchor point="LEFT"/>
</Anchors>
<Color r="0.5" g="0.5" b="0.5"/>
</Texture>
</Layer>
</Layers>
<NormalTexture name="$parentNormalTexture" file="Interface\ChatFrame\ChatFrameColorSwatch">
<Size x="30" y="30"/>
<Anchors>
<Anchor point="LEFT">
<Offset x="-3" y="0"/>
</Anchor>
</Anchors>
</NormalTexture>
<ButtonText name="$parentText">
<Anchors>
<Anchor point="LEFT" relativeTo="$parentNormalTexture" relativePoint="RIGHT">
<Offset x="-2" y="0"/>
</Anchor>
</Anchors>
</ButtonText>
<NormalFont font="GameFontNormalSmall" justifyH="RIGHT"/>
<HighlightFont font="GameFontHighlightSmall" justifyH="RIGHT"/>
<Scripts>
<OnLoad>
this:RegisterForClicks("anyUp")
</OnLoad>
<OnHide>
this:UnlockHighlight()
</OnHide>
</Scripts>
</Button>
<Frame name="tCC_OptionFrameBoxTemplate" inherits="OptionFrameBoxTemplate" virtual="true">
<Scripts>
<OnLoad>
self:SetBackdropBorderColor(0.4, 0.4, 0.4)
self:SetBackdropColor(0.15, 0.15, 0.15, 0.5)
</OnLoad>
</Scripts>
</Frame>
<Frame name="tCC_OptionDropDownTemplate" inherits="UIDropDownMenuTemplate" virtual="true">
<Layers>
<Layer level="ARTWORK">
<FontString name="$parentText1" inherits="GameFontNormalSmall" justifyH="CENTER">
<Anchors>
<Anchor point="BOTTOM" relativePoint="TOP"/>
</Anchors>
</FontString>
</Layer>
</Layers>
</Frame>
<Script file="tCC_Option.lua"/>
</Ui>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -