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 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 |
local DATA_TYPE_QUICKSLOT_ITEM = 1
local DATA_TYPE_COLLECTIBLE_ITEM = 2
local DATA_TYPE_QUICKSLOT_QUEST_ITEM = 3
local STOLEN_ICON_TEXTURE = "EsoUI/Art/Inventory/inventory_stolenItem_icon.dds"
local LIST_ENTRY_HEIGHT = 52
-------------------
--Keyboard Quickslot Screen
-------------------
if newState == SCENE_FRAGMENT_SHOWING then
elseif newState == SCENE_FRAGMENT_HIDDEN then
end
end )
end
ZO_ScrollList_AddDataType ( self . list , DATA_TYPE_QUICKSLOT_ITEM , "ZO_PlayerInventorySlot" , LIST_ENTRY_HEIGHT , function ( control , data ) self : SetUpQuickSlot ( control , data ) end , nil , nil , ZO_InventorySlot_OnPoolReset )
ZO_ScrollList_AddDataType ( self . list , DATA_TYPE_COLLECTIBLE_ITEM , "ZO_CollectionsSlot_Keyboard_Template" , LIST_ENTRY_HEIGHT , function ( control , data ) self : SetUpCollectionSlot ( control , data ) end , nil , nil , ZO_InventorySlot_OnPoolReset )
ZO_ScrollList_AddDataType ( self . list , DATA_TYPE_QUICKSLOT_QUEST_ITEM , "ZO_PlayerInventorySlot" , LIST_ENTRY_HEIGHT , function ( control , data ) self : SetUpQuestItemSlot ( control , data ) end , nil , nil , ZO_InventorySlot_OnPoolReset )
local quickslotFilterTargetDescriptor =
{
[ BACKGROUND_LIST_FILTER_TARGET_BAG_SLOT ] =
{
searchFilterList =
{
BACKGROUND_LIST_FILTER_TYPE_NAME ,
} ,
{
BAG_BACKPACK ,
}
} ,
[ BACKGROUND_LIST_FILTER_TARGET_QUEST_ITEM_ID ] =
{
searchFilterList =
{
BACKGROUND_LIST_FILTER_TYPE_NAME ,
} ,
} ,
[ BACKGROUND_LIST_FILTER_TARGET_COLLECTIBLE_ID ] =
{
searchFilterList =
{
BACKGROUND_LIST_FILTER_TYPE_NAME ,
} ,
local collectibleIdList = { }
local NO_CATEGORY_FILTERS = nil
local dataList = ZO_COLLECTIBLE_DATA_MANAGER : GetAllCollectibleDataObjects ( NO_CATEGORY_FILTERS , { ZO_CollectibleData . IsUnlocked , ZO_CollectibleData . IsValidForPlayer , ZO_CollectibleData . IsSlottable } )
end
return collectibleIdList
end ,
} ,
}
end
local SUPPRESS_TEXT_CHANGED_CALLBACK = true
self . searchBox : SetText ( TEXT_SEARCH_MANAGER : GetSearchText ( "quickslotTextSearch" ) , SUPPRESS_TEXT_CHANGED_CALLBACK )
end
end
local wheelData =
{
hotbarCategories = { HOTBAR_CATEGORY_QUICKSLOT_WHEEL } ,
numSlots = ACTION_BAR_UTILITY_BAR_SIZE ,
showCategoryLabel = true ,
--Display the accessibility keybinds on the wheel if the setting is enabled
}
"EsoUI/Art/Inventory/inventory_tabIcon_quest_up.dds" ,
"EsoUI/Art/Inventory/inventory_tabIcon_quest_down.dds" ,
"EsoUI/Art/Inventory/inventory_tabIcon_quest_over.dds" ) )
"EsoUI/Art/Inventory/inventory_tabIcon_items_up.dds" ,
"EsoUI/Art/Inventory/inventory_tabIcon_items_down.dds" ,
"EsoUI/Art/Inventory/inventory_tabIcon_items_over.dds" ) )
"EsoUI/Art/Inventory/inventory_tabIcon_all_up.dds" ,
"EsoUI/Art/Inventory/inventory_tabIcon_all_down.dds" ,
"EsoUI/Art/Inventory/inventory_tabIcon_all_over.dds" ) )
local menuBarData =
{
initialButtonAnchorPoint = RIGHT ,
buttonTemplate = "ZO_QuickSlotTab_Keyboard_Template" ,
normalSize = 51 ,
downSize = 64 ,
buttonPadding = - 15 ,
animationDuration = 180 ,
}
end
end
end
end
end
end
end
for i = 1 , # scrollData do
local dataEntry = scrollData [ i ]
break
end
end
end
if bagId == BAG_BACKPACK then
end
end
if bagId == BAG_BACKPACK then
end
end
end
self . control : RegisterForEvent ( EVENT_LEVEL_UPDATE , function ( eventCode , unitTag ) if unitTag == "player" then HandleInventoryChanged ( ) end end )
self . control : RegisterForEvent ( EVENT_ACTION_SLOTS_ACTIVE_HOTBAR_UPDATED , function ( ) self . wheel : UpdateAllSlots ( ) end )
end
end
end
return ZO_IsElementInNumericallyIndexedTable ( itemData . filterData , ITEMFILTERTYPE_QUICKSLOT ) and TEXT_SEARCH_MANAGER : IsDataInSearchTextResults ( "quickslotTextSearch" , BACKGROUND_LIST_FILTER_TARGET_BAG_SLOT , itemData . bagId , itemData . slotIndex )
end
return ZO_IsElementInNumericallyIndexedTable ( questItemData . filterData , ITEMFILTERTYPE_QUEST_QUICKSLOT ) and TEXT_SEARCH_MANAGER : IsDataInSearchTextResults ( "quickslotTextSearch" , BACKGROUND_LIST_FILTER_TARGET_QUEST_ITEM_ID , questItemData . questItemId )
end
local sortKeys =
{
age = { tiebreaker = "name" , isNumeric = true } ,
stackSellPrice = { tiebreaker = "name" , isNumeric = true } ,
}
end
end
end
end
end
end
for i = 1 , ACTION_BAR_UTILITY_BAR_SIZE do
end
end
if currentFilterType == ITEMFILTERTYPE_ALL then
elseif currentFilterType == ITEMFILTERTYPE_QUICKSLOT then
elseif currentFilterType == ITEMFILTERTYPE_COLLECTIBLE then
elseif currentFilterType == ITEMFILTERTYPE_QUEST_QUICKSLOT then
end
end
for slotIndex = 0 , bagSlots - 1 do
if slotData and slotData . stackCount > 0 then
local itemData =
{
iconFile = slotData . iconFile ,
stackCount = slotData . stackCount ,
sellPrice = slotData . sellPrice ,
stackSellPrice = slotData . stackCount * slotData . sellPrice ,
bagId = BAG_BACKPACK ,
slotIndex = slotIndex ,
meetsUsageRequirement = slotData . meetsUsageRequirement ,
locked = slotData . locked ,
functionalQuality = slotData . functionalQuality ,
displayQuality = slotData . displayQuality ,
-- slotData.quality is deprecated, included here for addon backwards compatibility
quality = slotData . displayQuality ,
slotType = SLOT_TYPE_ITEM ,
age = slotData . age ,
isGemmable = slotData . isGemmable ,
searchData =
{
bagId = BAG_BACKPACK ,
slotIndex = slotIndex ,
} ,
}
end
end
end
end
local dataObjects
if collectibleCategoryData then
dataObjects = collectibleCategoryData : GetAllCollectibleDataObjects ( { ZO_CollectibleData . IsUnlocked , ZO_CollectibleData . IsValidForPlayer , ZO_CollectibleData . IsSlottable } )
else
dataObjects = ZO_COLLECTIBLE_DATA_MANAGER : GetAllCollectibleDataObjects ( { ZO_CollectibleCategoryData . IsStandardCategory } , { ZO_CollectibleData . IsUnlocked , ZO_CollectibleData . IsValidForPlayer , ZO_CollectibleData . IsSlottable } )
end
collectibleData . searchData =
{
collectibleId = collectibleData . collectibleId ,
}
if TEXT_SEARCH_MANAGER : IsDataInSearchTextResults ( "quickslotTextSearch" , BACKGROUND_LIST_FILTER_TARGET_COLLECTIBLE_ID , collectibleData . collectibleId ) then
table . insert ( scrollData , ZO_ScrollList_CreateDataEntry ( DATA_TYPE_COLLECTIBLE_ITEM , collectibleData ) )
end
end
end
if questItemData . toolIndex then
questItemData . searchData =
{
questIndex = questItemData . questIndex ,
toolIndex = questItemData . toolIndex ,
index = questItemData . slotIndex ,
}
else
questItemData . searchData =
{
questIndex = questItemData . questIndex ,
stepIndex = questItemData . stepIndex ,
conditionIndex = questItemData . conditionIndex ,
toolIndex = questItemData . toolIndex ,
index = questItemData . slotIndex ,
}
end
table . insert ( scrollData , ZO_ScrollList_CreateDataEntry ( DATA_TYPE_QUICKSLOT_QUEST_ITEM , questItemData ) )
end
end
end
end
end
-- data.quality is deprecated, included here for addon backwards compatibility
ZO_CurrencyControl_SetSimpleCurrency ( sellPriceControl , CURT_MONEY , data . stackSellPrice , ITEM_SLOT_CURRENCY_OPTIONS )
ZO_PlayerInventorySlot_SetupSlot ( control , data . stackCount , data . iconFile , data . meetsUsageRequirement , data . locked )
end
end
end
slot . inCooldown = false
end
local r , g , b = GetInterfaceColor ( INTERFACE_COLOR_TYPE_ITEM_TOOLTIP , ITEM_TOOLTIP_COLOR_QUEST_ITEM_NAME )
questItem . slotControl = rowControl
ZO_Inventory_SetupQuestSlot ( inventorySlot , questItem . questIndex , questItem . toolIndex , questItem . stepIndex , questItem . conditionIndex )
end
if numUsedSlots < numSlots then
self . freeSlotsLabel : SetText ( zo_strformat ( SI_INVENTORY_BACKPACK_REMAINING_SPACES , numUsedSlots , numSlots ) )
else
self . freeSlotsLabel : SetText ( zo_strformat ( SI_INVENTORY_BACKPACK_COMPLETELY_FULL , numUsedSlots , numSlots ) )
end
end
local data = self : CreateNewTabFilterData ( ITEMFILTERTYPE_COLLECTIBLE , name , normalIcon , pressedIcon , mouseoverIcon , categoryData )
end
end
end
function ZO_Quickslot_Keyboard : CreateNewTabFilterData ( filterType , text , normal , pressed , highlight , extraInfo )
local tabData =
{
-- Custom data
sortKey = "name" ,
sortOrder = ZO_SORT_ORDER_UP ,
extraInfo = extraInfo ,
-- Menu bar data
}
return tabData
end
-------------------
-- Global functions
-------------------
end
end
end |