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 |
-- Globals used by multiple crafting files
ZO_GAMEPAD_CRAFTING_UTILS_SLOT_SPACING = 231
ZO_GAMEPAD_CRAFTING_UTILS_FLOATING_PADDING_Y = 50
ZO_GAMEPAD_CRAFTING_UTILS_FLOATING_SLOT_STANDARD_HEIGHT = 190
ZO_GAMEPAD_CRAFTING_UTILS_FLOATING_BOTTOM_OFFSET = ZO_GAMEPAD_QUADRANT_BOTTOM_OFFSET - ZO_GAMEPAD_CRAFTING_UTILS_FLOATING_PADDING_Y
-- 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
end
end
function ZO_GamepadCraftingUtils_SetupGenericHeader ( craftingObject , titleString , tabBarEntries , showCapacity )
if tabBarEntries and # tabBarEntries == 1 then
local tabBarFirstEntry = tabBarEntries [ 1 ]
end
end
return zo_strformat ( SI_GAMEPAD_INVENTORY_CAPACITY_FORMAT , GetNumBagUsedSlots ( BAG_BACKPACK ) , GetBagSize ( BAG_BACKPACK ) )
end
craftingObject . headerData = {
}
if showCapacity or showCapacity == nil then
end
if tabBarEntries and # tabBarEntries > 1 then
end
end
craftingObject . headerData . data2HeaderText = headerText
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
if craftingObject . optionList then
if targetOptionData then
targetOptionData . currentValue = not targetOptionData . currentValue
end
end
end
end
local maxHeight = GuiRoot : GetHeight ( ) - ZO_GAMEPAD_PANEL_FLOATING_HEIGHT_DISCOUNT - ( ZO_GAMEPAD_CRAFTING_UTILS_FLOATING_PADDING_Y * 2 )
end
local CRAFTING_TOOLTIP_OFFSET_X = - 3
ZO_ResizingFloatingScrollTooltip_Gamepad_OnInitialized ( control , ZO_CRAFTING_TOOLTIP_STYLES , resizeHandler , RIGHT , CRAFTING_TOOLTIP_OFFSET_X )
end |