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 |
-- Globals used by multiple crafting files
ZO_GAMEPAD_CRAFTING_UTILS_SLOT_SPACING = 231
-- Note: call this towards the end of your keybind setup function...if you call this before you do something like self.keybindStripDescriptor = {keybinds} you'll destroy these
if keybindDescriptor == nil then
keybindDescriptor = { }
end
local genericStartButton = {
alignment = KEYBIND_STRIP_ALIGN_LEFT ,
keybind = "UI_SHORTCUT_EXIT" ,
order = - 10000 ,
end ,
end ,
ethereal = true ,
}
local genericBackButton = {
alignment = KEYBIND_STRIP_ALIGN_LEFT ,
keybind = "UI_SHORTCUT_NEGATIVE" ,
order = - 10000 ,
end ,
end
}
end
function ZO_GamepadCraftingUtils_AddListTriggerKeybindDescriptors ( descriptor , list , optionalHeaderComparator )
local leftTrigger , rightTrigger = ZO_Gamepad_CreateListTriggerKeybindDescriptors ( list , optionalHeaderComparator )
end
end
-- Generic crafting header functions
end
craftingObject . header = craftingObject . control : GetNamedChild ( "HeaderContainer" ) : GetNamedChild ( "Header" )
end
function ZO_GamepadCraftingUtils_SetupGenericHeader ( craftingObject , titleString , contextTitleTextString , tabBarEntries )
end
return zo_strformat ( SI_GAMEPAD_INVENTORY_CAPACITY_FORMAT , GetNumBagUsedSlots ( BAG_BACKPACK ) , GetBagSize ( BAG_BACKPACK ) )
end
craftingObject . headerData = {
contextTitleText = contextTitleTextString ,
}
local ENABLE_PIPS = true
if tabBarEntries and # tabBarEntries > 1 then
end
end
end
-- Crafting slot manipulation functions
-- Note: These amounts are scaled on both sides of the slot, so the slot will actually be scaled by twice the amount
local SELECTED_SLOT_X_SCALE_AMOUNT = 20
local SELECTED_SLOT_Y_SCALE_AMOUNT = 36
if slot then
local X_OFFSET_INDEX = 4
local Y_OFFSET_INDEX = 5
newAnchor : SetOffsets ( bg . savedAnchor1 [ X_OFFSET_INDEX ] - SELECTED_SLOT_X_SCALE_AMOUNT , bg . savedAnchor1 [ Y_OFFSET_INDEX ] - SELECTED_SLOT_Y_SCALE_AMOUNT )
newAnchor : SetOffsets ( bg . savedAnchor2 [ X_OFFSET_INDEX ] + SELECTED_SLOT_X_SCALE_AMOUNT , bg . savedAnchor2 [ Y_OFFSET_INDEX ] + SELECTED_SLOT_Y_SCALE_AMOUNT )
end
end
if slot then
end
end
if slot then
slot . control . bounceAnimation = ANIMATION_MANAGER : CreateTimelineFromVirtual ( "ZO_CraftingSlot_Gamepad_Bounce" , slot . control )
end
end
end
-- Utility functions
if not headerContainerParent then
headerContainerParent = inventoryParent
end
-- anchor inventory under header so it doesn't smash into it when scrolling
local backpack = inventoryParent : GetNamedChild ( "Inventory" ) : GetNamedChild ( "Item" ) : GetNamedChild ( "Container" ) : GetNamedChild ( "Backpack" )
end
if craftingObject . optionList then
if selectedOptionData then
selectedOptionData . currentValue = not selectedOptionData . currentValue
end
end
end |