Mercurial > wow > reaction
comparison ReAction.lua @ 50:c3c64e2def50
Assorted cleanup for hide/show grid, action ID labels, draggable resizing, etc
author | Flick <flickerstreak@gmail.com> |
---|---|
date | Tue, 22 Apr 2008 20:37:44 +0000 |
parents | 7b7d178dec52 |
children | 7e09c02ae620 |
comparison
equal
deleted
inserted
replaced
49:dcf8116560a1 | 50:c3c64e2def50 |
---|---|
39 SelectBar = function(x) | 39 SelectBar = function(x) |
40 local bar, name | 40 local bar, name |
41 if type(x) == "string" then | 41 if type(x) == "string" then |
42 name = x | 42 name = x |
43 bar = ReAction:GetBar(name) | 43 bar = ReAction:GetBar(name) |
44 elseif ReAction.Bar:IsInstance(x) then | 44 else |
45 bar = x | |
46 for k,v in pairs(ReAction.bars) do | 45 for k,v in pairs(ReAction.bars) do |
47 if v == bar then | 46 if v == x then |
48 name = k | 47 name = k |
48 bar = x | |
49 end | 49 end |
50 end | 50 end |
51 else | |
52 error("bad argument to SelectBar") | |
53 end | 51 end |
54 return bar, name | 52 return bar, name |
55 end | 53 end |
56 | 54 |
57 DestroyBar = function(x) | 55 DestroyBar = function(x) |
116 SlashHandler = function(option) | 114 SlashHandler = function(option) |
117 if option == "config" then | 115 if option == "config" then |
118 ReAction:ShowConfig() | 116 ReAction:ShowConfig() |
119 elseif option == "layout" then | 117 elseif option == "layout" then |
120 ReAction:ShowLayout() | 118 ReAction:ShowLayout() |
119 elseif option == "unlock" then | |
120 ReAction:SetConfigMode(true) | |
121 elseif option == "lock" then | |
122 ReAction:SetConfigMode(false) | |
121 else | 123 else |
122 ReAction:Print(("%3.1f.%d"):format(ReAction.version,ReAction.revision)) | 124 ReAction:Print(("%3.1f.%d"):format(ReAction.version,ReAction.revision)) |
123 ReAction:Print("/reaction config") | 125 ReAction:Print("/reaction config") |
124 ReAction:Print("/reaction layout") | 126 ReAction:Print("/reaction layout") |
127 ReAction:Print("/reaction lock") | |
128 ReAction:Print("/reaction unlock") | |
125 end | 129 end |
126 end | 130 end |
127 end | 131 end |
128 | 132 |
129 | 133 |