Mercurial > wow > ouroloot
diff gui.lua @ 47:1070a14cfee4
Updated lib-st widget from WRDW. Properly notice new generating tabs. Updated help text.
author | Farmbuyer of US-Kilrogg <farmbuyer@gmail.com> |
---|---|
date | Sat, 28 Jan 2012 18:24:22 +0000 |
parents | 0b1e703a6954 |
children | fd3dd12f96ce |
line wrap: on
line diff
--- a/gui.lua Sat Jan 21 01:39:44 2012 +0000 +++ b/gui.lua Sat Jan 28 18:24:22 2012 +0000 @@ -45,6 +45,7 @@ local g_loot = nil local g_generated = nil local window_title = "Ouro Loot" +local dirty_tabs = nil local pairs, ipairs, tinsert, tremove, tonumber = pairs, ipairs, table.insert, table.remove, tonumber @@ -108,6 +109,7 @@ next_insertion_position = next_insertion_position + 1 text_gen_funcs[text_type] = generator specials_gen_funcs[text_type] = opt_specgen + dirty_tabs = true end -- Called by tabs_generated_text_OGS @@ -372,6 +374,7 @@ tabs_OnGroupSelected[v] = tabs_generated_text_OGS end end + dirty_tabs = nil end --[[ @@ -1790,7 +1793,7 @@ elseif not status then opt_widget_type, opt_key, label, status = "Button", opt_widget_type, opt_key, label end - local button = GUI:Create(opt_widget_type) + local button = assert(GUI:Create(opt_widget_type)) if button.SetText then button:SetText(tostring(label)) end status = status:gsub("[%+<>]",replacement_colors) button:SetCallback("OnEnter", function() setstatus(status) end) -- maybe factor that closure out @@ -1814,6 +1817,11 @@ local prev_fade_time = UIDROPDOWNMENU_SHOW_TIME UIDROPDOWNMENU_SHOW_TIME = 4 + if dirty_tabs then + self:gui_init(g_loot) -- pointer known to be good by now + self:zero_printed_fenceposts() + end + local display = GUI:Create("Frame") if _d then display:SetUserData("eoiST",_d) -- warning! warning! kludge detected! @@ -1824,9 +1832,7 @@ display:SetStatusText(self.status_text) display:SetLayout("Flow") display:SetStatusTable{width=900,height=550} -- default height is 500 - if display.EnableResize then -- FIXME after next Ace3 release, this can be assumed - display:EnableResize(false) - end + display:EnableResize(false) display:SetCallback("OnClose", function(_display) UIDROPDOWNMENU_SHOW_TIME = prev_fade_time _d = _display:GetUserData("eoiST")