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 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 |
BANKING_GAMEPAD_MODE_WITHDRAW = 1
BANKING_GAMEPAD_MODE_DEPOSIT = 2
local BANK_SEARCH_SORT_PRIMARY_KEY =
{
[ ITEM_LIST_SORT_TYPE_CATEGORY ] = "bestGamepadItemCategoryName" ,
[ ITEM_LIST_SORT_TYPE_ITEM_NAME ] = "name" ,
[ ITEM_LIST_SORT_TYPE_ITEM_QUALITY ] = "displayQuality" ,
[ ITEM_LIST_SORT_TYPE_STACK_COUNT ] = "stackCount" ,
[ ITEM_LIST_SORT_TYPE_VALUE ] = "sellPrice" ,
}
local BANK_SEARCH_FILTERS =
{
ITEMFILTERTYPE_WEAPONS ,
ITEMFILTERTYPE_ARMOR ,
ITEMFILTERTYPE_JEWELRY ,
ITEMFILTERTYPE_CONSUMABLE ,
ITEMFILTERTYPE_CRAFTING ,
ITEMFILTERTYPE_FURNISHING ,
ITEMFILTERTYPE_MISCELLANEOUS ,
}
ZO_ICON_SORT_ARROW_UP = "EsoUI/Art/Miscellaneous/list_sortUp.dds"
ZO_ICON_SORT_ARROW_DOWN = "EsoUI/Art/Miscellaneous/list_sortDown.dds"
-------------------------------------
-- Gamepad Guild Bank Inventory List
-------------------------------------
self . list : AddDataTemplate ( "ZO_GamepadBankCurrencySelectorTemplate" , ZO_SharedGamepadEntry_OnSetup , ZO_GamepadMenuEntryTemplateParametricListFunction )
end
end
end
end
end
end
--[[
-- ZO_BankingCommon_Gamepad
--]]
local DONT_ACTIVATE_LIST_ON_SHOW = false
ZO_Gamepad_ParametricList_BagsSearch_Screen . Initialize ( self , searchContext , control , ZO_GAMEPAD_HEADER_TABBAR_CREATE , DONT_ACTIVATE_LIST_ON_SHOW , bankScene )
end
local SORT_OPTIONS =
{
bestGamepadItemCategoryName = { tiebreaker = "name" } ,
displayQuality = { tiebreaker = "name" , tieBreakerSortOrder = ZO_SORT_ORDER_UP } ,
stackCount = { tiebreaker = "name" , tieBreakerSortOrder = ZO_SORT_ORDER_UP } ,
sellPrice = { tiebreaker = "name" , tieBreakerSortOrder = ZO_SORT_ORDER_UP } ,
requiredLevel = { tiebreaker = "requiredChampionPoints" , isNumeric = true } ,
requiredChampionPoints = { tiebreaker = "iconFile" , isNumeric = true } ,
iconFile = { tiebreaker = "uniqueId" } ,
uniqueId = { isId64 = true } ,
}
return BANK_SEARCH_SORT_PRIMARY_KEY [ self . withdrawList . currentSortType ] , SORT_OPTIONS , self . withdrawList . currentSortOrder
end
if dialog . dropdowns then
end
end
dialog . dropdowns = nil
end
{
gamepadInfo =
{
dialogType = GAMEPAD_DIALOGS . PARAMETRIC ,
} ,
ZO_GenericGamepadDialog_RefreshText ( dialog , GetString ( SI_GAMEPAD_GUILD_BROWSER_FILTERS_DIALOG_HEADER ) )
dialog . dropdowns = { }
dialog . selectedSortType = dialog . selectedSortType or ITEM_LIST_SORT_TYPE_ITERATION_BEGIN
local DONT_LIMIT_NUM_ENTRIES = nil
end ,
parametricList =
{
{
template = "ZO_GamepadDropdownItem" ,
templateData =
{
local withdrawList = dialogData . bankObject and dialogData . bankObject . withdrawList
withdrawList . currentSortType = entry . sortType
end
for i = ITEM_LIST_SORT_TYPE_ITERATION_BEGIN , ITEM_LIST_SORT_TYPE_ITERATION_END do
local entryText = ZO_CachedStrFormat ( SI_GAMEPAD_BANK_FILTER_ENTRY_FORMATTER , GetString ( "SI_ITEMLISTSORTTYPE" , i ) )
newEntry . sortType = i
end
end ,
end ,
} ,
} ,
{
template = "ZO_GamepadDropdownItem" ,
templateData =
{
local withdrawList = dialogData . bankObject and dialogData . bankObject . withdrawList
withdrawList . currentSortOrder = entry . sortOrder
withdrawList . currentSortOrderIndex = entry . index
end
local sortUpEntry = control . dropdown : CreateItemEntry ( GetString ( SI_GAMEPAD_BANK_SORT_ORDER_UP_TEXT ) , OnSelectedCallback )
sortUpEntry . sortOrder = ZO_SORT_ORDER_UP
sortUpEntry . index = 1
local sortDownEntry = control . dropdown : CreateItemEntry ( GetString ( SI_GAMEPAD_BANK_SORT_ORDER_DOWN_TEXT ) , OnSelectedCallback )
sortDownEntry . sortOrder = ZO_SORT_ORDER_DOWN
sortDownEntry . index = 2
end ,
end ,
} ,
} ,
{
template = "ZO_GamepadMultiSelectionDropdownItem" ,
templateData =
{
local withdrawList = dialogData . bankObject and dialogData . bankObject . withdrawList
local newEntry = ZO_ComboBox_Base : CreateItemEntry ( ZO_CachedStrFormat ( SI_GAMEPAD_BANK_FILTER_ENTRY_FORMATTER , GetString ( "SI_ITEMFILTERTYPE" , filterType ) ) )
if isSelected then
withdrawList . filterCategories [ item . category ] = item . category
else
withdrawList . filterCategories [ item . category ] = nil
end
end
end
end
end ,
end ,
} ,
} ,
} ,
blockDialogReleaseOnPress = true ,
buttons =
{
{
end
end ,
} ,
{
local withdrawList = dialogData . bankObject and dialogData . bankObject . withdrawList
end ,
} ,
{
end ,
end ,
} ,
} ,
} )
end
end
end
if newState == SCENE_SHOWING then
elseif newState == SCENE_SHOWN then
elseif newState == SCENE_HIDING then
elseif newState == SCENE_HIDDEN then
end
end
do
local ENTRY_ORDER_CURRENCY = 1
local ENTRY_ORDER_OTHER = 2
local leftOrder = ENTRY_ORDER_OTHER
if left . isCurrenciesMenuEntry or left . currencyType then
leftOrder = ENTRY_ORDER_CURRENCY
end
local rightOrder = ENTRY_ORDER_OTHER
if right . isCurrenciesMenuEntry or right . currencyType then
rightOrder = ENTRY_ORDER_CURRENCY
end
if leftOrder < rightOrder then
return true
elseif leftOrder > rightOrder then
return false
elseif leftOrder == ENTRY_ORDER_OTHER then
else
return false
end
end )
end
end
-- create tabs
local withdrawTabData = self : CreateModeData ( SI_BANK_WITHDRAW , BANKING_GAMEPAD_MODE_WITHDRAW , self . withdrawList , self . withdrawKeybindStripDescriptor )
local depositTabData = self : CreateModeData ( SI_BANK_DEPOSIT , BANKING_GAMEPAD_MODE_DEPOSIT , self . depositList , self . depositKeybindStripDescriptor )
{
{
} ,
{
} ,
}
-- create header
{
}
end
end
end
self . selector : RegisterCallback ( "OnValueChanged" , function ( ) self : UpdateInput ( self . selector : GetValue ( ) ) end )
end
{
{
end
end ,
end ,
end
end ,
} ,
{
end ,
} ,
}
end
end
KEYBIND_STRIP : UpdateKeybindButtonGroup ( self . selectorKeybindStripDescriptor ) -- The keybindings need visible to check for self.hasEnough
end
local selector = selectedData . selectorContainer
if selector then
selectedData . selectorContainer = nil
end
end
if targetControl then
else
--if the targetControl doesn't exist because of trigger scrolling, wait til selection changed to hide control
if targetData then
end
end
end
end
end
end
end
end
end
end
end
end
end
-- set the bag(s) that will be banked from, banked is a word.
else
end
end
-- set the bag that the player is carrying, probably always backpack
end
end
end
end
end
end
return {
mode = mode ,
itemList = itemList ,
}
end
else
else
end
end
end
end
self : SetSimpleCurrency ( control , moneyAmount , self . currencyType , BANKING_GAMEPAD_MODE_DEPOSIT , ZO_BANKING_CURRENCY_LABEL_OPTIONS )
-- must return a non-nil value so that the control isn't auto-hidden
return true
end
return ZO_Currency_FormatGamepad ( self . currencyType , self : GetDepositMoneyAmount ( ) , ZO_CURRENCY_FORMAT_AMOUNT_NAME )
end
self : SetSimpleCurrency ( control , moneyAmount , self . currencyType , BANKING_GAMEPAD_MODE_WITHDRAW , currencyOptions , obfuscateAmount )
-- must return a non-nil value so that the control isn't auto-hidden
return true
end
local displayOptions =
{
}
return ZO_Currency_FormatGamepad ( self . currencyType , self : GetWithdrawMoneyAmount ( ) , ZO_CURRENCY_FORMAT_AMOUNT_NAME , displayOptions )
end
end
-- private functions
function ZO_BankingCommon_Gamepad : SetSimpleCurrency ( control , amount , currencyType , colorMinValueForMode , options , obfuscateAmount )
if ( colorMinValueForMode == self . mode and amount == 0 ) or ( colorMinValueForMode ~= self . mode and amount == self : GetMaxBankedFunds ( currencyType ) ) then
end
if ( colorMinValueForMode == self . mode and amount == 0 ) or ( colorMinValueForMode ~= self . mode and amount == GetMaxPossibleCurrency ( currencyType , CURRENCY_LOCATION_CHARACTER ) ) then
end
end
local displayOptions =
{
obfuscateAmount = obfuscateAmount ,
}
ZO_CurrencyControl_SetSimpleCurrency ( control , currencyType , amount , options , CURRENCY_SHOW_ALL , CURRENCY_IGNORE_HAS_ENOUGH , displayOptions )
end
end
end
local usedSlots = 0
local bagSize = 0
end
end
end
end
end
if inventoryData and inventoryData . bagId then
ZO_LayoutBagItemEquippedComparison ( GAMEPAD_RIGHT_TOOLTIP , inventoryData . bagId , inventoryData . slotIndex )
end
end
if currentList then
end
end
end
end
end
end
-- functions that must be overwritten
end
end
end
end
end
end
end
end
end
end
-- optional functions for subclasses
end
end
end
end
local TRIGGER_CALLBACK = true
end
end
end
end
end
end
end |