forked from j-blandford/BetterUI
-
Notifications
You must be signed in to change notification settings - Fork 2
/
BUI_Shared.xml
128 lines (111 loc) · 7.15 KB
/
BUI_Shared.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
<GuiXml>
<Controls>
<Label name="BUI_GamepadSubMenuEntryLabelTemplate" font="ZoFontGamepad34" verticalAlignment="CENTER" wrapMode="ELLIPSIS" virtual="true">
<Anchor point="TOPLEFT" offsetX="BUI_GAMEPAD_DEFAULT_LIST_ENTRY_INDENT"/>
<Dimensions x="BUI_GAMEPAD_DEFAULT_LIST_ENTRY_WIDTH_AFTER_INDENT"/>
</Label>
<Cooldown name="BUI_GamepadMenuEntryCooldownTemplate" inherits="ZO_DefaultCooldown" exludeFromResizeToFitExtents="true" pixelRoundingEnabled="false" virtual="true">
<Anchor point="TOPLEFT" relativeTo="$(parent)Icon" />
<Anchor point="BOTTOMRIGHT" relativeTo="$(parent)Icon" />
</Cooldown>
<Texture name="BUI_GamepadMenuEntryStatusIndicationTemplate" inherits="ZO_MultiIcon" excludeFromResizeToFitExtents="true" hidden="true" virtual="true">
<Dimensions x="24" y="24" />
<!-- <Anchor point="CENTER" relativeTo="$(parent)Label" relativePoint="LEFT" offsetX="BUI_GAMEPAD_DEFAULT_LIST_ENTRY_ICON_X_OFFSET" /> -->
<Anchor point="RIGHT" relativeTo="$(parent)Icon" relativePoint="LEFT" offsetX="-10" />
</Texture>
<Texture name="BUI_GamepadMenuEntryIconTemplate" tier="MEDIUM" inherits="ZO_MultiIcon" excludeFromResizeToFitExtents="true" level="1" pixelRoundingEnabled="true" virtual="true">
<Dimensions x="24" y="24" />
<Anchor point="CENTER" relativeTo="$(parent)Label" relativePoint="LEFT" offsetX="BUI_GAMEPAD_DEFAULT_LIST_ENTRY_ICON_X_OFFSET" />
<Controls>
<Texture name="$(parent)Highlight" pixelRoundingEnabled="false" level="0">
<AnchorFill />
</Texture>
</Controls>
</Texture>
<Label name="BUI_GamepadMenuEntryLabelTemplate" font="ZoFontGamepad34" verticalAlignment="CENTER" wrapMode="ELLIPSIS" modifyTextType="UPPERCASE" virtual="true">
<Anchor point="TOPLEFT" offsetX="BUI_GAMEPAD_DEFAULT_LIST_ENTRY_INDENT"/>
<Dimensions x="BUI_GAMEPAD_DEFAULT_LIST_ENTRY_WIDTH_AFTER_INDENT"/>
</Label>
<Control name="BUI_GamepadMenuEntryDimensionsTemplate" resizeToFitDescendents="true" virtual="true">
<Controls>
<Control name="$(parent)RootSpacer">
<Anchor point="TOPLEFT"/>
<Dimensions x="BUI_GAMEPAD_DEFAULT_LIST_ENTRY_WIDTH" y="4"/>
</Control>
</Controls>
</Control>
<Control name="BUI_GamepadMenuEntryLabelSizedTemplate" virtual="true">
<OnInitialized>
ZO_SharedGamepadEntry_OnInitialized(self)
local function ComputeHeightFromLabelAndItemType(control)
local height = control.label:GetTextHeight()
local itemTypeControl = control:GetNamedChild("ItemType")
if itemTypeControl ~= nil then
local typeheight = itemTypeControl:GetTextHeight()
if height > typeheight then
return height
else
return typeheight
end
end
return height
end
self.GetHeight = ComputeHeightFromLabelAndItemType
</OnInitialized>
</Control>
<Control name="BUI_GamepadSubMenuEntryTemplate" inherits="BUI_GamepadMenuEntryDimensionsTemplate BUI_GamepadMenuEntryLabelSizedTemplate" virtual="true">
<Anchor point="TOPLEFT" offsetX="BUI_GAMEPAD_DEFAULT_HORIZ_PADDING"/>
<Dimensions x="BUI_GAMEPAD_DEFAULT_LIST_ENTRY_WIDTH"/>
<Controls>
<Label name="$(parent)Label" inherits="BUI_MenuEntryLabelTemplate" font="ZoFontGamepad42">
<Anchor point="TOPLEFT" offsetX="87"/>
<Dimensions x="540"/>
</Label>
<Texture name="$(parent)Icon" inherits="BUI_MenuEntryIconTemplate" edgeColor="00000000">
</Texture>
<Texture name="$(parent)EquippedMain" textureFile="BetterUI/Templates/Images/inv_equip.dds" excludeFromResizeToFitExtents="true" pixelRoundingEnabled="false">
<Dimensions x="28" y="24" />
<Anchor point="RIGHT" relativeTo="$(parent)Icon" relativePoint="LEFT" offsetX="-25" />
</Texture>
<Texture name="$(parent)StatusIndicator" inherits="BUI_GamepadMenuEntryStatusIndicationTemplate"/>
<Texture name="$(parent)PlayerLockedIcon" inherits="ZO_GamepadMenuEntryPlayerLockedTemplate" />
<!-- Will have to make the below more generic -->
<Label name="$(parent)ItemType" inherits="BUI_GamepadSubMenuEntryLabelTemplate" text="NONE" font="ZoFontGamepad27" override="true" verticalAlignment="CENTER" horizontalAlignment="LEFT" excludeFromResizeToFitExtents="true" wrapMode="ELLIPSIS">
<Anchor point="LEFT" relativeTo="$(parent)Label" offsetX="550"/>
<Dimensions x="250"/>
</Label>
<Label name="$(parent)Trait" inherits="BUI_GamepadSubMenuEntryLabelTemplate" text="-" font="ZoFontGamepad27" override="true" verticalAlignment="CENTER" horizontalAlignment="LEFT" excludeFromResizeToFitExtents="true">
<Anchor point="LEFT" relativeTo="$(parent)Label" offsetX="810"/>
<Dimensions x="160"/>
</Label>
<Label name="$(parent)Stat" inherits="BUI_GamepadSubMenuEntryLabelTemplate" text="-" font="ZoFontGamepad27" override="true" verticalAlignment="CENTER" horizontalAlignment="LEFT" excludeFromResizeToFitExtents="true">
<Anchor point="LEFT" relativeTo="$(parent)Label" offsetX="980"/>
</Label>
<Label name="$(parent)Value" inherits="BUI_GamepadSubMenuEntryLabelTemplate" text="0" font="ZoFontGamepad27" override="true" verticalAlignment="CENTER" horizontalAlignment="LEFT" excludeFromResizeToFitExtents="true">
<Anchor point="LEFT" relativeTo="$(parent)Label" offsetX="1100"/>
</Label>
</Controls>
</Control>
<Control name="BUI_GamepadItemSubEntryTemplate" inherits="BUI_GamepadSubMenuEntryTemplate" virtual="true">
<Controls>
<Cooldown name="$(parent)Cooldown" inherits="BUI_GamepadMenuEntryCooldownTemplate" tier="MEDIUM" excludeFromResizeToFitExtents="true"/>
</Controls>
</Control>
<Control name="BUI_GamepadMenuEntryTemplate" inherits="BUI_GamepadMenuEntryDimensionsTemplate BUI_GamepadMenuEntryLabelSizedTemplate" virtual="true">
<Controls>
<Label name="$(parent)Label" inherits="BUI_GamepadMenuEntryLabelTemplate" />
<Texture name="$(parent)Icon" inherits="BUI_GamepadMenuEntryIconTemplate">
<Controls>
<Label name="$(parent)StackCount" inherits="ZO_GamepadMenuEntryStackCountTemplate" />
</Controls>
</Texture>
</Controls>
</Control>
<!-- Item Slot Related Scroll List Templates -->
<Control name="BUI_GamepadItemEntryTemplate" inherits="BUI_GamepadMenuEntryTemplate" virtual="true">
<Controls>
<Texture name="$(parent)StatusIndicator" inherits="BUI_GamepadMenuEntryStatusIndicationTemplate" />
</Controls>
</Control>
</Controls>
</GuiXml>