comparison ReAction.lua @ 81:57f8151ea0f0

- Fixed some snafus with creating bars - Added support for opening the bar editor to a particular path - Creating bars/states now selects the new bar/state in the config editor - moved Bar:SetStateAttribute() back to working optionally on buttons rather than buttonFrame container
author Flick <flickerstreak@gmail.com>
date Wed, 25 Jun 2008 21:07:18 +0000
parents da8ba8783924
children fc83b3f5b322
comparison
equal deleted inserted replaced
80:42ec2938d65a 81:57f8151ea0f0
285 config.btnWidth = select(4,...) or config.btnWidth or 36 285 config.btnWidth = select(4,...) or config.btnWidth or 36
286 config.btnHeight = select(4,...) or config.btnHeight or 36 286 config.btnHeight = select(4,...) or config.btnHeight or 36
287 config.spacing = select(5,...) or config.spacing or 3 287 config.spacing = select(5,...) or config.spacing or 3
288 config.width = config.width or config.btnColumns*(config.btnWidth + config.spacing) + 1 288 config.width = config.width or config.btnColumns*(config.btnWidth + config.spacing) + 1
289 config.height = config.height or config.btnRows*(config.btnHeight + config.spacing) + 1 289 config.height = config.height or config.btnRows*(config.btnHeight + config.spacing) + 1
290 config.anchor = config.anchor or "BOTTOM" 290 config.anchor = config.anchor or "UIParent"
291 config.anchorTo = config.anchorTo or "UIParent" 291 config.point = config.point or "BOTTOM"
292 config.relativePoint = config.relativePoint or "BOTTOM" 292 config.relpoint = config.relpoint or "BOTTOM"
293 config.y = config.y or 200 293 config.y = config.y or 200
294 config.x = config.x or 0 294 config.x = config.x or 0
295 end 295 end
296 local profile = self.db.profile 296 local profile = self.db.profile
297 config = config or DeepCopy(profile.defaultBar) 297 config = config or DeepCopy(profile.defaultBar)
357 end 357 end
358 358
359 function ReAction:RegisterBarType( name, config, isDefaultChoice ) 359 function ReAction:RegisterBarType( name, config, isDefaultChoice )
360 defaultBarConfig[name] = config 360 defaultBarConfig[name] = config
361 if isDefaultChoice then 361 if isDefaultChoice then
362 defaultBarConfigChoice = name 362 private.defaultBarConfigChoice = name
363 end 363 end
364 self:RefreshOptions() 364 self:RefreshOptions()
365 end 365 end
366 366
367 function ReAction:UnregisterBarType( name ) 367 function ReAction:UnregisterBarType( name )
460 460
461 function ReAction:ShowConfig() 461 function ReAction:ShowConfig()
462 CallModuleMethod("ConfigUI","OpenConfig") 462 CallModuleMethod("ConfigUI","OpenConfig")
463 end 463 end
464 464
465 function ReAction:ShowEditor(bar) 465 function ReAction:ShowEditor(bar, ...)
466 CallModuleMethod("ConfigUI","LaunchBarEditor",bar) 466 CallModuleMethod("ConfigUI","LaunchBarEditor",bar, ...)
467 end 467 end