vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | <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/"> |
2 | |||
3 | <Button name="myTargetModelFrame" movable="true" parent="UIParent" hidden="false" frameStrata="LOW"> |
||
4 | <Size> |
||
5 | <AbsDimension x="233" y="224"/> |
||
6 | </Size> |
||
7 | <Anchors> |
||
8 | <Anchor point="CENTER"/> |
||
9 | </Anchors> |
||
10 | <Frames> |
||
11 | <PlayerModel name="$parent_TargetModel" hidden="true"> |
||
12 | <Size> |
||
13 | <AbsDimension x="233" y="224"/> |
||
14 | </Size> |
||
15 | <Anchors> |
||
16 | <Anchor point="CENTER"/> |
||
17 | </Anchors> |
||
18 | <Scripts> |
||
19 | <OnLoad> |
||
20 | this:SetUnit("player"); |
||
21 | this:RegisterEvent("DISPLAY_SIZE_CHANGED"); |
||
22 | this:RegisterEvent("UNIT_MODEL_CHANGED"); |
||
23 | this:RegisterEvent("PLAYER_TARGET_CHANGED"); |
||
24 | </OnLoad> |
||
25 | <OnEvent> |
||
26 | if (event == "DISPLAY_SIZE_CHANGED") then |
||
27 | this:RefreshUnit(); |
||
28 | elseif (event == "PLAYER_TARGET_CHANGED") then |
||
29 | if (UnitExists("target")) then |
||
30 | this:SetUnit("target"); |
||
31 | this:Show(); |
||
32 | else |
||
33 | this:Hide(); |
||
34 | end |
||
35 | else |
||
36 | this:SetUnit("target"); |
||
37 | end |
||
38 | </OnEvent> |
||
39 | </Scripts> |
||
40 | </PlayerModel> |
||
41 | </Frames> |
||
42 | <Scripts> |
||
43 | <OnLoad> |
||
44 | this:RegisterForDrag("LeftButton", "RightButton"); |
||
45 | </OnLoad> |
||
46 | <OnDragStart> |
||
47 | if( IsShiftKeyDown() ) then |
||
48 | this:StartMoving(); |
||
49 | end |
||
50 | </OnDragStart> |
||
51 | <OnDragStop> |
||
52 | this:StopMovingOrSizing(); |
||
53 | </OnDragStop> |
||
54 | <OnHide> |
||
55 | this:StopMovingOrSizing(); |
||
56 | </OnHide> |
||
57 | </Scripts> |
||
58 | </Button> |
||
59 | |||
60 | </Ui> |