comparison gui.lua @ 89:939569ded66f

- Also include revision numbers when sending/displaying version data. - Do a tweaked variant of the "ensure useful unique tags" code in _addLootEntry. - When debugging comms, send to raid *and* guild instead of either. - Remove flaky optimization in fixup_unique_replacements. Thanks to Hyndron for helping me test this with genuine non-contrived data.
author Farmbuyer of US-Kilrogg <farmbuyer@gmail.com>
date Thu, 28 Jun 2012 19:44:53 +0000
parents c9f955f9a285
children 92e0db376858
comparison
equal deleted inserted replaced
88:c9f955f9a285 89:939569ded66f
739 function addon:gui_init (loot_pointer, uniques_pointer) 739 function addon:gui_init (loot_pointer, uniques_pointer)
740 g_loot = assert(loot_pointer, "something went wrong at startup") 740 g_loot = assert(loot_pointer, "something went wrong at startup")
741 g_uniques = assert(uniques_pointer, "something went wrong at startup") 741 g_uniques = assert(uniques_pointer, "something went wrong at startup")
742 g_generated = nil 742 g_generated = nil
743 tabgroup_tabs = {} 743 tabgroup_tabs = {}
744 window_title = "Ouro Loot " .. self.revision 744 window_title = "Ouro Loot " .. self.version
745 -- TabGroup stretches out the tabs to fill the row but only if >75% of the 745 -- TabGroup stretches out the tabs to fill the row but only if >75% of the
746 -- row is already full. It turns out that not doing this looks like ass. 746 -- row is already full. It turns out that not doing this looks like ass.
747 -- If we won't have enough tabs to trigger this on its own, pad out the tab 747 -- If we won't have enough tabs to trigger this on its own, pad out the tab
748 -- titles (not looking quite as nice, ah well) to force it to trigger. 748 -- titles (not looking quite as nice, ah well) to force it to trigger.
749 local fmtstr = #_taborder > 6 and "%s" or " %s " 749 local fmtstr = #_taborder > 6 and "%s" or " %s "
2177 -- possible keybindings 2177 -- possible keybindings
2178 do 2178 do
2179 local pair = GUI:Create("InlineGroup") 2179 local pair = GUI:Create("InlineGroup")
2180 pair:SetLayout("List") 2180 pair:SetLayout("List")
2181 pair:SetRelativeWidth(0.49) 2181 pair:SetRelativeWidth(0.49)
2182 pair:SetTitle("Keybinding for '/ouroloot'")
2182 local editbox, checkbox 2183 local editbox, checkbox
2183 editbox = mkbutton("EditBox", nil, opts.keybinding_text, 2184 editbox = mkbutton("EditBox", nil, opts.keybinding_text,
2184 [[Keybinding text format is fragile (ALT then CTRL then SHIFT)! Relog to take effect.]]) 2185 [[Keybinding text format is fragile (ALT then CTRL then SHIFT)! Relog to take effect.]])
2185 editbox:SetFullWidth(true) 2186 editbox:SetFullWidth(true)
2186 editbox:SetLabel("Keybinding text") 2187 editbox:SetLabel("Keybinding text")
2792 button1 = YES, 2793 button1 = YES,
2793 button2 = NO, 2794 button2 = NO,
2794 OnShow = function (dialog, addon) 2795 OnShow = function (dialog, addon)
2795 local thistable = StaticPopupDialogs[dialog.which] 2796 local thistable = StaticPopupDialogs[dialog.which]
2796 -- StaticPopup_Resize does not take extraFrame into account, so we 2797 -- StaticPopup_Resize does not take extraFrame into account, so we
2797 -- hook the sizing method that _Resize calls at the end. 2798 -- monkeypatch the sizing method that _Resize calls at the end.
2798 dialog.saved_setheight = dialog.SetHeight 2799 dialog.saved_setheight = dialog.SetHeight
2799 dialog.SetHeight = function (d, h) 2800 dialog.SetHeight = function (d, h)
2800 return d.saved_setheight(d,h+35) 2801 return d.saved_setheight(d,h+35)
2801 end 2802 end
2802 dialog.extraFrame:ClearAllPoints() 2803 dialog.extraFrame:ClearAllPoints()
2876 addon:Activate(nil,true) 2877 addon:Activate(nil,true)
2877 end, 2878 end,
2878 OnAlt = function (dialog, addon) 2879 OnAlt = function (dialog, addon)
2879 -- hitting escape also calls this, but the 3rd arg would be "clicked" 2880 -- hitting escape also calls this, but the 3rd arg would be "clicked"
2880 -- in both cases, not useful here. 2881 -- in both cases, not useful here.
2881 local helpbutton = dialog.button2 2882 if MouseIsOver(dialog.button3) then
2882 local ismousing = MouseIsOver(helpbutton)
2883 if ismousing then
2884 -- they actually clicked the button (or at least the mouse was over "Help" 2883 -- they actually clicked the button (or at least the mouse was over "Help"
2885 -- when they hit escape... sigh) 2884 -- when they hit escape... sigh)
2886 addon:BuildMainDisplay('help') 2885 addon:BuildMainDisplay('help')
2887 else 2886 else
2888 addon.popped = true 2887 addon.popped = true