comparison options.lua @ 122:fb4bda3ad05c

Various trivial cleanups.
author Farmbuyer of US-Kilrogg <farmbuyer@gmail.com>
date Fri, 17 Aug 2012 01:04:38 -0400
parents 4dd67f8116f4
children ccca3d8d2b22
comparison
equal deleted inserted replaced
121:4dd67f8116f4 122:fb4bda3ad05c
204 local pair = AceGUI:Create("InlineGroup") 204 local pair = AceGUI:Create("InlineGroup")
205 pair:SetLayout("List") 205 pair:SetLayout("List")
206 pair:SetRelativeWidth(0.49) 206 pair:SetRelativeWidth(0.49)
207 pair:SetTitle('Keybinding for "/ouroloot toggle"') 207 pair:SetTitle('Keybinding for "/ouroloot toggle"')
208 local checkbox, button 208 local checkbox, button
209 --[=[
210 editbox = mkbutton("EditBox", nil, opts.keybinding_text,
211 [[Keybinding text format is fragile! (All caps, ALT then CTRL then SHIFT.) Relog to take effect.]])
212 editbox:SetFullWidth(true)
213 editbox:SetLabel("Keybinding text")
214 editbox:SetCallback("OnEnterPressed", function(_w,event,value)
215 opts.keybinding_text = value
216 end)
217 editbox:SetDisabled(not opts.keybinding)
218 ]=]
219 checkbox = mktoggle('keybinding', "Register keybinding", 1, 209 checkbox = mktoggle('keybinding', "Register keybinding", 1,
220 [[Whether to register a keybinding to toggle the loot display. Relog to take effect.]], 210 [[Whether to register a keybinding to toggle the loot display. Relog to take effect.]],
221 function (_w,_,value) 211 function (_w,_,value)
222 opts.keybinding = value 212 opts.keybinding = value
223 --editbox:SetDisabled(not opts.keybinding)
224 button:SetDisabled(not opts.keybinding) 213 button:SetDisabled(not opts.keybinding)
225 end) 214 end)
226 checkbox:SetFullWidth(true) 215 checkbox:SetFullWidth(true)
227 button = mkbutton("Keybinding", nil, "", 216 button = mkbutton("Keybinding", nil, "",
228 -- This wording is not quite accurate, but auto-l10n is nice. 217 -- This wording is not quite accurate, but auto-l10n is nice.
247 SaveBindings(c) 236 SaveBindings(c)
248 end 237 end
249 end 238 end
250 end 239 end
251 end) 240 end)
252 pair:AddChildren (checkbox, button)--, editbox) 241 pair:AddChildren (checkbox, button)
253 container:AddChild(pair) 242 container:AddChild(pair)
254 end 243 end
255 244
256 -- replacement for slashloot 245 -- replacement for slashloot
257 do 246 do
460 --local ilink = select(2,GetItemInfo(key_id)) 449 --local ilink = select(2,GetItemInfo(key_id))
461 opts.itemfilter[tonumber(key_id)] = nil 450 opts.itemfilter[tonumber(key_id)] = nil
462 --addon:Print("No longer filtering out", ilink) 451 --addon:Print("No longer filtering out", ilink)
463 addon:Print("No longer filtering out", val_name) 452 addon:Print("No longer filtering out", val_name)
464 end) 453 end)
465 --w:SetCallback("OnDropdownShown",do_warning)
466 w:SetCallback("OnDropdownShown", function() 454 w:SetCallback("OnDropdownShown", function()
467 do_warning(container) 455 do_warning(container)
468 end) 456 end)
469 container:AddChild(w) 457 container:AddChild(w)
470 458