-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
BonusRollPreview.xml
240 lines (230 loc) · 7.48 KB
/
BonusRollPreview.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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
<Ui>
<Script file='libs\LibStub\LibStub.lua'/>
<Include file='libs\Wasabi\embed.xml'/>
<Include file='libs\EJ_Ext\EJ_Ext.lua'/>
<Script file='locale\initialize.lua'/>
<Script file='locale\deDE.lua'/>
<Script file='locale\esES.lua'/>
<Script file='locale\esMX.lua'/>
<Script file='locale\frFR.lua'/>
<Script file='locale\itIT.lua'/>
<Script file='locale\koKR.lua'/>
<Script file='locale\ptBR.lua'/>
<Script file='locale\ruRU.lua'/>
<Script file='locale\zhCN.lua'/>
<Script file='locale\zhTW.lua'/>
<Script file='BonusRollPreview.lua'/>
<Script file='SpecButtons.lua'/>
<Script file='Options.lua'/>
<Button name='BonusRollPreviewHandle' parent='BonusRollFrame'>
<Size x='64' y='16'/>
<Layers>
<Layer level='BACKGROUND'>
<Texture name='$parentBackground' setAllPoints='true'>
<Color r='0' g='0' b='0' a='0.8'/>
</Texture>
</Layer>
<Layer level='BORDER'>
<Texture name='$parentTopLeft' parentKey='TopLeft' file='Interface\RaidFrame\RaidPanel-UpperLeft'>
<Size x='24' y='20'/>
<Anchors>
<Anchor point='TOPLEFT' x='-4' y='4'/>
</Anchors>
<TexCoords left='0' right='1' top='0' bottom='0.8'/>
</Texture>
<Texture name='$parentTopCenter' parentKey='TopCenter' file='Interface\RaidFrame\RaidPanel-UpperMiddle'>
<Size x='24' y='12'/>
<Anchors>
<Anchor point='TOP' x='0' y='4.5'/>
</Anchors>
</Texture>
<Texture name='$parentTopRight' parentKey='TopRight' file='Interface\RaidFrame\RaidPanel-UpperRight'>
<Size x='24' y='20'/>
<Anchors>
<Anchor point='TOPRIGHT' x='4' y='4'/>
</Anchors>
<TexCoords left='0' right='1' top='0' bottom='0.8'/>
</Texture>
<Texture name='$parentBottomLeft' parentKey='BottomLeft' file='Interface\RaidFrame\RaidPanel-BottomLeft'>
<Size x='24' y='22'/>
<Anchors>
<Anchor point='BOTTOMLEFT' x='-4' y='-6'/>
</Anchors>
<TexCoords left='0' right='1' top='0.1' bottom='1'/>
</Texture>
<Texture name='$parentBottomCenter' parentKey='BottomCenter' file='Interface\RaidFrame\RaidPanel-BottomMiddle'>
<Size x='24' y='12'/>
<Anchors>
<Anchor point='BOTTOM' x='0' y='-9'/>
</Anchors>
</Texture>
<Texture name='$parentBottomRight' parentKey='BottomRight' file='Interface\RaidFrame\RaidPanel-BottomRight'>
<Size x='24' y='22'/>
<Anchors>
<Anchor point='BOTTOMRIGHT' x='4' y='-6'/>
</Anchors>
<TexCoords left='0' right='1' top='0.1' bottom='1'/>
</Texture>
</Layer>
<Layer level='ARTWORK'>
<Texture name='$parentArrow' parentKey='Arrow' file='Interface\RaidFrame\RaidPanel-Toggle' setAllPoints='true'/>
</Layer>
</Layers>
<Scripts>
<OnClick>
BonusRollPreview:Toggle()
</OnClick>
</Scripts>
</Button>
<Frame name='BonusRollPreviewAnchor' parent='UIParent' clampedToScreen='true' frameStrata='HIGH' movable='true' hidden='true'>
<Size x='286' y='76'/>
<Layers>
<Layer level='BACKGROUND'>
<Texture setAllPoints='true'>
<Color r='0' g='0.5' b='0' a='0.3'/>
</Texture>
<FontString inherits='GameFontNormalMed3' justifyH='LEFT' text='MOVE_FRAME'>
<Anchors>
<Anchor point='CENTER'/>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnMouseDown>
self:StartMoving()
</OnMouseDown>
<OnMouseUp>
self:StopMovingOrSizing()
BonusRollPreview:UpdatePosition()
-- save new position
local point, _, relativePoint, x, y = self:GetPoint()
BonusRollPreviewDB.anchor[1] = point
BonusRollPreviewDB.anchor[3] = relativePoint
BonusRollPreviewDB.anchor[4] = x
BonusRollPreviewDB.anchor[5] = y
</OnMouseUp>
</Scripts>
</Frame>
<Frame name='BonusRollPreview' parent='BonusRollFrame' mixin='BonusRollPreviewMixin' frameLevel='3' hidden='true'>
<Size x='286' y='0'/>
<Frames>
<ScrollFrame parentKey='ScrollFrame'>
<Anchors>
<Anchor point='TOPLEFT' x='6' y='-6'/>
<Anchor point='BOTTOMRIGHT' x='-6' y='6'/>
</Anchors>
<ScrollChild>
<Frame name='$parentScrollChild' parentKey='ScrollChild'>
<Size x='1' y='1'/>
</Frame>
</ScrollChild>
<Frames>
<Slider name='$parentSlider' parentKey='Slider' inherits='UIPanelScrollBarTemplate'>
<Anchors>
<Anchor point='TOPRIGHT' x='2' y='-14'/>
<Anchor point='BOTTOMRIGHT' x='2' y='14'/>
</Anchors>
<Scripts>
<OnValueChanged>
local min, max = self:GetMinMaxValues()
self.ScrollUpButton:SetEnabled(value ~= min)
self.ScrollDownButton:SetEnabled(value ~= max)
local parent = self:GetParent()
if(parent:GetObjectType() == 'ScrollFrame') then
parent:SetVerticalScroll(value)
parent:GetScrollChild():SetPoint('TOP', 0, value)
end
</OnValueChanged>
<OnMinMaxChanged>
self:SetValue(self:GetValue() or min)
</OnMinMaxChanged>
</Scripts>
</Slider>
</Frames>
<Scripts>
<OnMouseWheel>
if(delta > 0) then
self.Slider:SetValue(self.Slider:GetValue() - self.Slider:GetHeight() / 3)
else
self.Slider:SetValue(self.Slider:GetValue() + self.Slider:GetHeight() / 3)
end
</OnMouseWheel>
</Scripts>
</ScrollFrame>
</Frames>
<Scripts>
<OnLoad method='OnLoad'/>
<OnEvent method='OnEvent'/>
</Scripts>
</Frame>
<Button name='BonusRollPreviewButtonTemplate' virtual='true'>
<Size x='0' y='38'/>
<Layers>
<Layer layer='BACKGROUND'>
<Texture parentKey='Icon'>
<Size x='36' y='36'/>
<Anchors>
<Anchor point='TOPLEFT' x='1' y='-1'/>
</Anchors>
</Texture>
<Texture parentKey='Background' file='Interface\EncounterJournal\UI-EncounterJournalTextures' desaturated='true' setAllPoints='true'>
<TexCoords left='0.00195313' right='0.62890625' top='0.61816406' bottom='0.66210938'/>
</Texture>
</Layer>
<Layer layer='ARTWORK'>
<FontString parentKey='Name' inherits='GameFontNormalMed3' justifyH='LEFT'>
<Size x='0' y='12'/>
<Anchors>
<Anchor point='TOPLEFT' relativeKey='$parent.Icon' relativePoint='TOPRIGHT' x='7' y='-4'/>
<Anchor point='TOPRIGHT' x='-6' y='-4'/>
</Anchors>
</FontString>
<FontString parentKey='Class' inherits='GameFontHighlight' justifyH='RIGHT'>
<Size x='0' y='12'/>
<Anchors>
<Anchor point='BOTTOMRIGHT' x='-6' y='5'/>
</Anchors>
</FontString>
<FontString parentKey='Slot' inherits='GameFontHighlight' justifyH='LEFT'>
<Size x='0' y='12'/>
<Anchors>
<Anchor point='BOTTOMLEFT' relativeKey='$parent.Icon' relativePoint='BOTTOMRIGHT' x='7' y='4'/>
<Anchor point='BOTTOMRIGHT' relativeKey='$parent.Class' relativePoint='BOTTOMLEFT' x='-15' y='0'/>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnClick>
if(self.itemLink) then
HandleModifiedItemClick(self.itemLink)
end
</OnClick>
<OnEnter>
if(self.itemLink) then
GameTooltip:SetOwner(self, 'ANCHOR_NONE')
ContainerFrameItemButton_CalculateItemTooltipAnchors(self, GameTooltip)
GameTooltip:SetHyperlink(self.itemLink)
self:RegisterEvent('MODIFIER_STATE_CHANGED')
end
</OnEnter>
<OnLeave>
GameTooltip_HideResetCursor()
self:UnregisterEvent('MODIFIER_STATE_CHANGED')
</OnLeave>
<OnEvent>
if(IsModifiedClick('COMPAREITEMS') or GetCVarBool('alwaysCompareItems')) then
GameTooltip_ShowCompareItem()
else
GameTooltip_HideShoppingTooltips(GameTooltip)
end
if(IsModifiedClick('DRESSUP')) then
ShowInspectCursor()
else
ResetCursor()
end
</OnEvent>
</Scripts>
</Button>
</Ui>