Mercurial > wow > ouroloot
comparison core.lua @ 44:a561a967b5e6
Add simple button to Blizzard options. Fix case insensitivity of tab title scanning from command line.
author | Farmbuyer of US-Kilrogg <farmbuyer@gmail.com> |
---|---|
date | Fri, 20 Jan 2012 10:46:58 +0000 |
parents | 4f1e71f62776 |
children | 1001dd95dbeb |
comparison
equal
deleted
inserted
replaced
43:78a25e2d25bf | 44:a561a967b5e6 |
---|---|
508 -- LOOT_ITEM_SELF = "You receive loot: %s." --> You receive loot: (.+)%. | 508 -- LOOT_ITEM_SELF = "You receive loot: %s." --> You receive loot: (.+)%. |
509 g_LOOT_ITEM_SELF_s = _G.LOOT_ITEM_SELF:gsub('%.$','%%.'):gsub('%%s','(.+)') | 509 g_LOOT_ITEM_SELF_s = _G.LOOT_ITEM_SELF:gsub('%.$','%%.'):gsub('%%s','(.+)') |
510 | 510 |
511 -- LOOT_ITEM_SELF_MULTIPLE = "You receive loot: %sx%d." --> You receive loot: (.+)(x%d+)%. | 511 -- LOOT_ITEM_SELF_MULTIPLE = "You receive loot: %sx%d." --> You receive loot: (.+)(x%d+)%. |
512 g_LOOT_ITEM_SELF_MULTIPLE_ss = _G.LOOT_ITEM_SELF_MULTIPLE:gsub('%.$','%%.'):gsub('%%s','(.+)'):gsub('x%%d','(x%%d+)') | 512 g_LOOT_ITEM_SELF_MULTIPLE_ss = _G.LOOT_ITEM_SELF_MULTIPLE:gsub('%.$','%%.'):gsub('%%s','(.+)'):gsub('x%%d','(x%%d+)') |
513 | |
514 --[[ | |
515 Stick something in the Blizzard addons options list, where most users | |
516 will probably look these days. Try to be conservative about needless | |
517 frame creation. | |
518 ]] | |
519 local bliz = CreateFrame("Frame") | |
520 bliz.name = "Ouro Loot" | |
521 bliz:SetScript("OnShow", function(_b) | |
522 local button = CreateFrame("Button",nil,_b,"UIPanelButtonTemplate") | |
523 button:SetWidth(150) | |
524 button:SetHeight(22) | |
525 button:SetScript("OnClick", function() | |
526 _G.InterfaceOptionsFrameCancel:Click() | |
527 _G.HideUIPanel(GameMenuFrame) | |
528 addon:OpenMainDisplayToTab"Options" | |
529 end) | |
530 button:SetText('"/ouroloot opt"') | |
531 button:SetPoint("TOPLEFT",20,-20) | |
532 _b:SetScript("OnShow",nil) | |
533 end) | |
534 _G.InterfaceOptions_AddCategory(bliz) | |
513 | 535 |
514 if self.debug.flow then self:Print"is in control-flow debug mode." end | 536 if self.debug.flow then self:Print"is in control-flow debug mode." end |
515 end | 537 end |
516 --function addon:OnDisable() end | 538 --function addon:OnDisable() end |
517 | 539 |