Mercurial > wow > ouroloot
comparison gui.lua @ 81:0f6355bcfe68
Initial version of reassign_loot that handles remote broadcasting, tested in sandbox. Catch tab generation errors at a higher level and take apart the window (including STs) rather than propagating Lua errors upwards.
| author | Farmbuyer of US-Kilrogg <farmbuyer@gmail.com> |
|---|---|
| date | Fri, 15 Jun 2012 20:04:05 +0000 |
| parents | 0235a1695b83 |
| children | 940e53dd18c3 |
comparison
equal
deleted
inserted
replaced
| 80:f01d8d1b8f82 | 81:0f6355bcfe68 |
|---|---|
| 839 ["Show only this player"] = function(rowi) | 839 ["Show only this player"] = function(rowi) |
| 840 local st = _d:GetUserData("eoiST") | 840 local st = _d:GetUserData("eoiST") |
| 841 _d:SetUserData("player filter name", g_loot[rowi].person) | 841 _d:SetUserData("player filter name", g_loot[rowi].person) |
| 842 st:SetFilter(_d:GetUserData("player filter by name")) | 842 st:SetFilter(_d:GetUserData("player filter by name")) |
| 843 _d:GetUserData("eoi_filter_reset"):SetDisabled(false) | 843 _d:GetUserData("eoi_filter_reset"):SetDisabled(false) |
| 844 -- it'd be more futureproof to get the button and call some kind | |
| 845 -- of :GetText() on it, but no such function is provided by acegui | |
| 846 setstatus[[Use the "Reset Player Filter" button in the lower-right to return to normal.]] | |
| 844 end, | 847 end, |
| 845 | 848 |
| 846 ["Change from 'wipe' to 'kill'"] = function(rowi) | 849 ["Change from 'wipe' to 'kill'"] = function(rowi) |
| 847 addon:_mark_boss_kill(rowi) | 850 addon:_mark_boss_kill(rowi) |
| 848 -- the fillout function called automatically will start too far down the list | 851 -- the fillout function called automatically will start too far down the list |
| 852 ["Edit note"] = function(rowi) | 855 ["Edit note"] = function(rowi) |
| 853 eoi_editcell (rowi, _d:GetUserData("DD loot cell")) | 856 eoi_editcell (rowi, _d:GetUserData("DD loot cell")) |
| 854 end, | 857 end, |
| 855 | 858 |
| 856 df_REASSIGN = function(rowi,to_whom) | 859 df_REASSIGN = function(rowi,to_whom) |
| 857 addon:reassign_loot (rowi, to_whom) | 860 addon:reassign_loot ("local", rowi, to_whom) |
| 858 CloseDropDownMenus() -- also need to close parent menu | 861 CloseDropDownMenus() -- also need to close parent menu |
| 859 end, | 862 end, |
| 860 ["Enter name..."] = function(rowi) | 863 ["Enter name..."] = function(rowi) |
| 861 CloseDropDownMenus() -- also need to close parent menu | 864 CloseDropDownMenus() -- also need to close parent menu |
| 862 local dialog = StaticPopup_Show "OUROL_REASSIGN_ENTER" | 865 local dialog = StaticPopup_Show "OUROL_REASSIGN_ENTER" |
| 972 tt:SetOwner (cellFrame, "ANCHOR_RIGHT", -20, 0) | 975 tt:SetOwner (cellFrame, "ANCHOR_RIGHT", -20, 0) |
| 973 if e.cache_miss then | 976 if e.cache_miss then |
| 974 tt:ClearLines() | 977 tt:ClearLines() |
| 975 tt:AddLine("Missing Cache Data") | 978 tt:AddLine("Missing Cache Data") |
| 976 tt:AddLine([[Wait a few seconds, then type]], 0.8, 0.8, 0.8, 1) | 979 tt:AddLine([[Wait a few seconds, then type]], 0.8, 0.8, 0.8, 1) |
| 977 tt:AddLine([[/ouroloot fixcache]], 0, 1, 64/255, nil) | 980 tt:AddLine([[/ouroloot fix cache]], 0, 1, 64/255, nil) |
| 978 tt:AddLine([[and redisplay this window.]], 0.8, 0.8, 0.8, 1) | 981 tt:AddLine([[and redisplay this window.]], 0.8, 0.8, 0.8, 1) |
| 979 tt:Show() | 982 tt:Show() |
| 980 elseif e.itemlink then | 983 elseif e.itemlink then |
| 981 tt:SetHyperlink (e.itemlink) | 984 tt:SetHyperlink (e.itemlink) |
| 982 end | 985 end |
| 2288 -- this is the druid class color reworked into hex | 2291 -- this is the druid class color reworked into hex |
| 2289 fmt = fmt .. " |cffff7d0aHistory recording suppressed.|r" | 2292 fmt = fmt .. " |cffff7d0aHistory recording suppressed.|r" |
| 2290 end | 2293 end |
| 2291 tabs.titletext:SetFormattedText (fmt, addon.sender_list.activeI) | 2294 tabs.titletext:SetFormattedText (fmt, addon.sender_list.activeI) |
| 2292 end | 2295 end |
| 2293 return tabs_OnGroupSelected[group](tabs,spec,group) | 2296 local status,err = pcall (tabs_OnGroupSelected[group], tabs, spec, group) |
| 2297 if not status then | |
| 2298 addon:horrible_horrible_error(err) | |
| 2299 end | |
| 2294 --[====[ | 2300 --[====[ |
| 2295 Unfortunately, :GetHeight() called on anything useful out of a TabGroup | 2301 Unfortunately, :GetHeight() called on anything useful out of a TabGroup |
| 2296 returns the static default size (about 50 pixels) until the refresh | 2302 returns the static default size (about 50 pixels) until the refresh |
| 2297 cycle *after* all the frames are shown. Trying to fix it up after a | 2303 cycle *after* all the frames are shown. Trying to fix it up after a |
| 2298 single OnUpdate doesn't work either. So for now it's all hardcoded. | 2304 single OnUpdate doesn't work either. So for now it's all hardcoded. |
| 2918 dialog.editBox:SetText("") | 2924 dialog.editBox:SetText("") |
| 2919 dialog.editBox:SetFocus() | 2925 dialog.editBox:SetFocus() |
| 2920 end,]] | 2926 end,]] |
| 2921 OnAccept = function(dialog, data) | 2927 OnAccept = function(dialog, data) |
| 2922 local name = dialog.usertext --editBox:GetText() | 2928 local name = dialog.usertext --editBox:GetText() |
| 2923 addon:reassign_loot (data.index, name) | 2929 addon:reassign_loot ("local", data.index, name) |
| 2924 data.display:GetUserData("eoiST"):OuroLoot_Refresh(data.index) | 2930 data.display:GetUserData("eoiST"):OuroLoot_Refresh(data.index) |
| 2925 end, | 2931 end, |
| 2926 } | 2932 } |
| 2927 | 2933 |
| 2928 StaticPopupDialogs["OUROL_SAVE_SAVEAS"] = flib.StaticPopup{ | 2934 StaticPopupDialogs["OUROL_SAVE_SAVEAS"] = flib.StaticPopup{ |
