Mercurial > wow > ouroloot
comparison gui.lua @ 19:f560cf82e7d3
Smarter handling of missed item cache entries. Basic persistent logging of
debug messages (options panel or /loot debug alsolog) and script to print same.
author | Farmbuyer of US-Kilrogg <farmbuyer@gmail.com> |
---|---|
date | Mon, 29 Aug 2011 01:29:13 +0000 |
parents | d929c40cdb09 |
children | d89aeb6b9f9e |
comparison
equal
deleted
inserted
replaced
18:ca797c0f32d4 | 19:f560cf82e7d3 |
---|---|
300 if itexture and iname then | 300 if itexture and iname then |
301 textured = eoi_st_textured_item_format:format (itexture, | 301 textured = eoi_st_textured_item_format:format (itexture, |
302 ITEM_QUALITY_COLORS[iquality].hex, iname, loot.count or "") | 302 ITEM_QUALITY_COLORS[iquality].hex, iname, loot.count or "") |
303 else | 303 else |
304 textured = eoi_st_textured_item_format:format ([[ICONS\INV_Misc_QuestionMark]], | 304 textured = eoi_st_textured_item_format:format ([[ICONS\INV_Misc_QuestionMark]], |
305 ITEM_QUALITY_COLORS[ITEM_QUALITY_COMMON].hex, 'UNKNOWN - TRY AGAIN', "") | 305 ITEM_QUALITY_COLORS[ITEM_QUALITY_COMMON].hex, 'UNKNOWN - REDISPLAY LATER', "") |
306 cache_okay = false | 306 cache_okay = false |
307 end | 307 end |
308 col2.value = textured | 308 col2.value = textured |
309 | 309 |
310 local dotcols = new (col1, col2, col3) | 310 local dotcols = new (col1, col2, col3) |
610 if (row == nil) or (realrow == nil) then return end -- mouseover column header | 610 if (row == nil) or (realrow == nil) then return end -- mouseover column header |
611 local e = data[realrow] | 611 local e = data[realrow] |
612 local kind = e.kind | 612 local kind = e.kind |
613 | 613 |
614 if (kind == 'loot' and column == 1) or (kind == 'history' and column == 2) then | 614 if (kind == 'loot' and column == 1) or (kind == 'history' and column == 2) then |
615 if e.itemlink then | 615 GameTooltip:SetOwner (cellFrame, "ANCHOR_RIGHT", -20, 0) |
616 GameTooltip:SetOwner (cellFrame, "ANCHOR_RIGHT", -20, 0) | 616 if e.cache_miss then |
617 GameTooltip:ClearLines() | |
618 GameTooltip:AddLine("Missing Cache Data") | |
619 GameTooltip:AddLine([[Wait a few seconds, then type]], 0.8, 0.8, 0.8, 1) | |
620 GameTooltip:AddLine([[/ouroloot fixcache]], 0, 1, 64/255, nil) | |
621 GameTooltip:AddLine([[and redisplay this window.]], 0.8, 0.8, 0.8, 1) | |
622 GameTooltip:Show() | |
623 elseif e.itemlink then | |
617 GameTooltip:SetHyperlink (e.itemlink) | 624 GameTooltip:SetHyperlink (e.itemlink) |
618 end | 625 end |
619 | 626 |
620 elseif kind == 'loot' and column == 2 then | 627 elseif kind == 'loot' and column == 2 then |
621 GameTooltip:SetOwner (cellFrame, "ANCHOR_BOTTOMRIGHT", -50, 5) | 628 GameTooltip:SetOwner (cellFrame, "ANCHOR_BOTTOMRIGHT", -50, 5) |
1409 simple:SetLayout("List") | 1416 simple:SetLayout("List") |
1410 simple:SetRelativeWidth(0.3) | 1417 simple:SetRelativeWidth(0.3) |
1411 w = GUI:Create("CheckBoxSmallLabel") | 1418 w = GUI:Create("CheckBoxSmallLabel") |
1412 w:SetFullWidth(true) | 1419 w:SetFullWidth(true) |
1413 w:SetType("checkbox") | 1420 w:SetType("checkbox") |
1414 w:SetLabel("master dtoggle") | 1421 w:SetLabel("debug toggle") |
1415 w:SetValue(addon.DEBUG_PRINT) | 1422 w:SetValue(addon.DEBUG_PRINT) |
1416 w:SetCallback("OnValueChanged", function(_w,event,value) addon.DEBUG_PRINT = value end) | 1423 w:SetCallback("OnValueChanged", function(_w,event,value) |
1424 addon.DEBUG_PRINT = value | |
1425 addon:redisplay() | |
1426 end) | |
1427 simple:AddChild(w) | |
1428 w = GUI:Create("CheckBoxSmallLabel") | |
1429 w:SetFullWidth(true) | |
1430 w:SetType("checkbox") | |
1431 w:SetLabel("GOP history mode") | |
1432 w:SetValue(false) | |
1433 w:SetCallback("OnValueChanged", function(_w,event,value) addon.history_suppress = value end) | |
1417 simple:AddChild(w) | 1434 simple:AddChild(w) |
1418 w = mkbutton("Clear All & Reload", | 1435 w = mkbutton("Clear All & Reload", |
1419 [[No confirmation! |cffff1010Erases absolutely all> Ouro Loot saved variables and reloads the UI.]]) | 1436 [[No confirmation! |cffff1010Erases absolutely all> Ouro Loot saved variables and reloads the UI.]]) |
1420 w:SetFullWidth(true) | 1437 w:SetFullWidth(true) |
1421 w:SetCallback("OnClick", function() | 1438 w:SetCallback("OnClick", function() |
1432 w:SetFullWidth(true) | 1449 w:SetFullWidth(true) |
1433 w:SetType("checkbox") | 1450 w:SetType("checkbox") |
1434 w:SetLabel(d) | 1451 w:SetLabel(d) |
1435 if d == "notraid" then | 1452 if d == "notraid" then |
1436 w:SetDescription("Tick this before enabling to make the addon work outside of raid groups") | 1453 w:SetDescription("Tick this before enabling to make the addon work outside of raid groups") |
1454 else | |
1455 w:SetDisabled(not addon.DEBUG_PRINT) | |
1437 end | 1456 end |
1438 w:SetValue(v) | 1457 w:SetValue(v) |
1439 w:SetCallback("OnValueChanged", function(_w,event,value) addon.debug[d] = value end) | 1458 w:SetCallback("OnValueChanged", function(_w,event,value) addon.debug[d] = value end) |
1440 simple:AddChild(w) | 1459 simple:AddChild(w) |
1441 end | 1460 end |