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 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 |
--Data for hotbar categories that are supported by the assignable utility wheel. If a new category or action type is added that we want to support, this table needs to be updated
local SUPPORTED_HOTBAR_CATEGORY_DATA =
{
[ HOTBAR_CATEGORY_QUICKSLOT_WHEEL ] =
{
[ ACTION_TYPE_ITEM ] = true ,
[ ACTION_TYPE_COLLECTIBLE ] = true ,
[ ACTION_TYPE_QUEST_ITEM ] = true ,
[ ACTION_TYPE_EMOTE ] = true ,
[ ACTION_TYPE_QUICK_CHAT ] = true ,
} ,
[ HOTBAR_CATEGORY_EMOTE_WHEEL ] =
{
[ ACTION_TYPE_EMOTE ] = true ,
[ ACTION_TYPE_QUICK_CHAT ] = true ,
} ,
[ HOTBAR_CATEGORY_MEMENTO_WHEEL ] =
{
[ ACTION_TYPE_COLLECTIBLE ] = true ,
} ,
[ HOTBAR_CATEGORY_ALLY_WHEEL ] =
{
[ ACTION_TYPE_COLLECTIBLE ] = true ,
} ,
[ HOTBAR_CATEGORY_TOOL_WHEEL ] =
{
[ ACTION_TYPE_COLLECTIBLE ] = true ,
} ,
}
--Fake hotbar category used to denote that the wheel is currently hidden
ZO_UTILITY_WHEEL_HOTBAR_CATEGORY_HIDDEN = - 1
ZO_UTILITY_SLOT_EMPTY_TEXTURE = "EsoUI/Art/Quickslots/quickslot_emptySlot.dds"
--[[
The data table can support the following fields:
-hotbarCategories: Which hotbars this wheel represents. The order of the categories displayed is based off of the order of the categories here.
-numSlots: The number of slots that are in this wheel. Should match up with the size of the bar that the slots are stored in.
-startSlotIndex: The index that this wheel starts at on the hotbar(s). Example:
startSlotIndex = ACTION_BAR_FIRST_UTILITY_BAR_SLOT
-overrideShowNameLabels: Whether or not to show the names of each slot. This overrides the default behavior for all hotbar categories used in this wheel.
-By default, the emote wheel category will show name labels and the rest will not.
-showKeybinds: Whether or not to show the accessibility keybinds underneath each slot. Can be a boolean or a function that returns a boolean
-If this field is not set, we will not show the keybinds
-If this is set to true, we will not display name labels, regardless of what overrideShowNameLabels is set to
-showPendingIcon: Whether or not to show the icon of the item being slotted in the center of the wheel. Currently only supported for Gamepad
-showCategoryLabel: Whether nor not to show the name of the wheel currently being displayed
-includeHiddenState: Set this to true if we want one of the "Cycle Wheel" options to hide the wheel entirely
-onSelectionChangedCallback: Function called when the selected entry on the wheel changes. Currently only supported for Gamepad
-onHotbarCategoryChangedCallback: Function called when the current hotbar category on the wheel changes.
-overrideGamepadTooltip: Overrides the tooltip used when an entry is selected. Currently only supported for Gamepad.
-If this field is not set, GAMEPAD_QUAD1_TOOLTIP will be used
-overrideTooltipScrollEnabled: Can be set to a boolean to indicate whether or not tooltip scrolling is enabled for this wheel. Currently only supported for Gamepad.
-If this field is not set, whether or not tooltip scrolling is enabled will be controlled via a keybind that only appears if this field has not been set.
-overrideActivateOnShow: Can be set to a boolean to indicate whether or not the radial menu for this wheel should activate on showing. Currently only supported for Gamepad.
-If this field is not set, we assume true
-customNarrationObjectName: The unique name to use when registering the wheel for narration. Currently only supported for Gamepad.
-This field is required to be set for gamepad wheels in order for narration to function
-headerNarrationFunction: Function used to determine the header narration for this wheel. Currently only supported for Gamepad.
-If this field is not set, no header narration will be included
-If customNarrationObjectName is not set, this will do nothing
]]
end
end
local PLAY_ANIMATION = true
end
end
--This event is only relevant if this wheel supports emotes
end
end )
end
local numSlotted = 0
for i = actionBarOffset + 1 , actionBarOffset + numSlots do
numSlotted = numSlotted + 1
end
end
return numSlotted
end
end
end
end
end
end
end
end
if hotbarCategory == ZO_UTILITY_WHEEL_HOTBAR_CATEGORY_HIDDEN then
end
else
end
end
end
local validCategories = { }
local numValidCategories = 0
if SUPPORTED_HOTBAR_CATEGORY_DATA [ hotbarCategory ] ~= nil then
numValidCategories = numValidCategories + 1
end
end
if numValidCategories > 0 then
numValidCategories = numValidCategories + 1
end
return true
else
return false
end
end
-- We use self.data.hotbarCategories instead of self.hotbarCategories for the comparison because self.hotbarCategories includes the hidden state
--If we are setting the hotbar categories this wheel supports to something new, assume the hotbar category changed
end
end
end
end
if categoryData and categoryData [ actionType ] then
return true
else
return false
end
end
if hotbarCategory ~= ZO_UTILITY_WHEEL_HOTBAR_CATEGORY_HIDDEN then
else
end
end
end
end
else
end
end
--To be overridden
end
--To be overridden
end
return KEYBIND_STRIP_ALIGN_LEFT
else
return KEYBIND_STRIP_ALIGN_CENTER
end
end
{
-- Cycle
{
end ,
end ,
} ,
}
end |