-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathBasicControls.xml
136 lines (126 loc) · 4 KB
/
BasicControls.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<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">
<!-- This script turns on verbose messages in the FrameXML log -->
<Script>
--FrameXML_Debug(1);
</Script>
<!-- This function is called when a script error occurs -->
<Script>
_ERROR_COUNT = 0;
_ERROR_LIMIT = 1000;
function _ERRORMESSAGE(message)
debuginfo() -- Debugging information for internal use.
LoadAddOn("Blizzard_DebugTools");
local loaded = IsAddOnLoaded("Blizzard_DebugTools");
if ( GetCVarBool("scriptErrors") ) then
if ( not loaded or DEBUG_DEBUGTOOLS ) then
BasicScriptErrorsText:SetText(message);
BasicScriptErrors:Show();
if ( DEBUG_DEBUGTOOLS ) then
ScriptErrorsFrame_OnError(message);
end
else
ScriptErrorsFrame_OnError(message);
end
elseif ( loaded ) then
local HIDE_ERROR_FRAME = true;
ScriptErrorsFrame_OnError(message, HIDE_ERROR_FRAME);
end
-- Show a warning if there are too many errors
_ERROR_COUNT = _ERROR_COUNT + 1;
if ( _ERROR_COUNT == _ERROR_LIMIT ) then
StaticPopup_Show("TOO_MANY_LUA_ERRORS");
end
return message;
end
seterrorhandler(_ERRORMESSAGE);
</Script>
<!-- This function can be used to show debugging messages -->
<Script>
function message(text)
if ( not BasicScriptErrors:IsShown() ) then
BasicScriptErrorsText:SetText(text);
BasicScriptErrors:Show();
end
end
</Script>
<!-- This function is used to translate text (DEPRECATED: actually it's already translated as-is) -->
<Script>
function TEXT(text)
return text;
end
</Script>
<!-- These are basic attributes for dialogs -->
<Texture name="DialogButtonNormalTexture" file="Interface\Buttons\UI-Panel-Button-Up" virtual="true">
<TexCoords left="0" right="0.625" top="0" bottom="0.6875"/>
</Texture>
<Texture name="DialogButtonPushedTexture" file="Interface\Buttons\UI-Panel-Button-Down" virtual="true">
<TexCoords left="0" right="0.625" top="0" bottom="0.6875"/>
</Texture>
<Texture name="DialogButtonHighlightTexture" file="Interface\Buttons\UI-Panel-Button-Highlight" alphaMode="ADD" virtual="true">
<TexCoords left="0" right="0.625" top="0" bottom="0.6875"/>
</Texture>
<Frame name="DialogBoxFrame" virtual="true" toplevel="true" frameStrata="DIALOG" hidden="true">
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
<EdgeSize>
<AbsValue val="32"/>
</EdgeSize>
<TileSize>
<AbsValue val="32"/>
</TileSize>
<BackgroundInsets>
<AbsInset left="11" right="12" top="12" bottom="11"/>
</BackgroundInsets>
</Backdrop>
<Frames>
<Button name="$parentButton">
<Size>
<AbsDimension x="128" y="32"/>
</Size>
<Anchors>
<Anchor point="BOTTOM">
<Offset>
<AbsDimension x="0" y="16"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
self:GetParent():Hide();
</OnClick>
</Scripts>
<NormalTexture inherits="DialogButtonNormalTexture"/>
<PushedTexture inherits="DialogButtonPushedTexture"/>
<HighlightTexture inherits="DialogButtonHighlightTexture"/>
<ButtonText text="OKAY"/>
<NormalFont style="DialogButtonNormalText"/>
<HighlightFont style="DialogButtonHighlightText"/>
</Button>
</Frames>
</Frame>
<!-- This is the general scripting error dialog -->
<Frame name="BasicScriptErrors" inherits="DialogBoxFrame">
<Size>
<AbsDimension x="384" y="128"/>
</Size>
<Layers>
<Layer level="ARTWORK">
<FontString name="BasicScriptErrorsText" inherits="GameFontRedLarge" justifyH="CENTER" justifyV="TOP" nonspacewrap="true">
<Size>
<AbsDimension x="360" y="0"/>
</Size>
<Anchors>
<Anchor point="TOP">
<Offset>
<AbsDimension x="0" y="-16"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
</Frame>
</Ui>