comparison Bar.lua @ 283:f2ed8a8e2320

Add editor sliders for button grid and size
author Flick
date Thu, 12 May 2011 17:16:43 -0700
parents 5b9c0164a491
children d931fa418e17
comparison
equal deleted inserted replaced
282:7a9e82c0df15 283:f2ed8a8e2320
369 local s = cfg.spacing or 4 369 local s = cfg.spacing or 4
370 return r,c,s 370 return r,c,s
371 end 371 end
372 372
373 function Bar:SetButtonGrid(r,c,s) 373 function Bar:SetButtonGrid(r,c,s)
374 local cfg = self.config
375 r = r or cfg.btnRows
376 c = c or cfg.btnColumns
377 s = s or cfg.spacing
374 if r > 0 and c > 0 and s > 0 then 378 if r > 0 and c > 0 and s > 0 then
375 local cfg = self.config
376 cfg.btnRows = r 379 cfg.btnRows = r
377 cfg.btnColumns = c 380 cfg.btnColumns = c
378 cfg.spacing = s 381 cfg.spacing = s
379 end 382 end
380 self.buttonClass:SetupBar(self) 383 self.buttonClass:SetupBar(self)