comparison SkeletonKey/BindingsUI.lua @ 15:32d64e42ec9b

- resolve pet bar actions for binding slots - detect type of petaction (can be spell, stance, or 'PETACTION') - keep track of displayed pet ability slots and update them alongside pet cache refreshes
author Nenue
date Fri, 29 Jul 2016 03:27:15 -0400
parents 82170735e67c
children cdd387d39137
comparison
equal deleted inserted replaced
14:82170735e67c 15:32d64e42ec9b
224 224
225 225
226 --- Retrieves button at index; creates said button and instates any stored parameters 226 --- Retrieves button at index; creates said button and instates any stored parameters
227 do 227 do
228 local leftSlot, upSlot 228 local leftSlot, upSlot
229 local buttonsDepth = 0
230 kb.GetSlot = function(index) 229 kb.GetSlot = function(index)
231 230
232 local slot = index + kb.scrollOffset 231 local slot = index + kb.scrollOffset
233 232
234 if not kb.buttons[index] then 233 if not kb.buttons[index] then
243 local newRow = (mod(index, BINDS_PER_ROW) == 1) 242 local newRow = (mod(index, BINDS_PER_ROW) == 1)
244 243
245 if index == 1 then 244 if index == 1 then
246 button:SetPoint('TOPLEFT', kb.bg, 'TOPLEFT', BUTTON_PADDING, - BUTTON_PADDING) 245 button:SetPoint('TOPLEFT', kb.bg, 'TOPLEFT', BUTTON_PADDING, - BUTTON_PADDING)
247 upSlot = button 246 upSlot = button
248 buttonsDepth = KEY_BUTTON_SIZE + BUTTON_PADDING * 2
249 elseif newRow then 247 elseif newRow then
250 button:SetPoint('TOPLEFT', upSlot, 'BOTTOMLEFT', 0, -BUTTON_SPACING) 248 button:SetPoint('TOPLEFT', upSlot, 'BOTTOMLEFT', 0, -BUTTON_SPACING)
251 upSlot = button 249 upSlot = button
252 buttonsDepth = buttonsDepth + KEY_BUTTON_SIZE + BUTTON_SPACING
253 else 250 else
254 button:SetPoint('TOPLEFT', leftSlot, 'TOPRIGHT', BUTTON_HSPACING, 0) 251 button:SetPoint('TOPLEFT', leftSlot, 'TOPRIGHT', BUTTON_HSPACING, 0)
255 end 252 end
256 253
257 button:SetSize(KEY_BUTTON_SIZE, KEY_BUTTON_SIZE) 254 button:SetSize(KEY_BUTTON_SIZE, KEY_BUTTON_SIZE)