Thread Tools Display Modes
11-27-09, 09:14 AM   #1
Syllius
A Kobold Labourer
Join Date: Nov 2009
Posts: 1
Lua help...

I am trying to alter this Titan panel addon to include the BG mark graphics next to the number of current marks. Any help would be greatly appreciated. Thanks in advanced!

function TitanPanelHonorButton_GetButtonText(id)
local button, id = TitanUtils_GetButton(id, true);
local res = "";
local ns = GetCurrencyListSize();
local my_av_marks = 0;
local my_ab_marks = 0;
local my_eos_marks = 0;
local my_ioc_marks = 0;
local my_sota_marks = 0;
local my_wg_marks = 0;
local my_wgsp_marks = 0;
local my_arena_points = 0;
local my_honor = 0;

for i=1,ns do
local name, isHeader, isExpanded, isUnused, isWatched, count, extraCurrencyType, icn = GetCurrencyListInfo(i);
if extraCurrencyType == 1 then --arena points
my_arena_points = count;
elseif extraCurrencyType == 2 then --honor
my_honor = count;
else -- marks
if (icn == "Interface\\Icons\\INV_Jewelry_Necklace_21") then
my_av_marks = count;
elseif (icn == "Interface\\Icons\\INV_Jewelry_Amulet_07") then
my_ab_marks = count;
elseif (icn == "Interface\\Icons\\Spell_Nature_EyeOfTheStorm") then
my_eos_marks = count;
elseif (icn == "Interface\\Icons\\INV_Jewelry_Necklace_27") then
my_ioc_marks = count;
elseif (icn == "Interface\\Icons\\INV_Jewelry_Amulet_01") then
my_sota_marks = count;
elseif (icn == "Interface\\Icons\\INV_Misc_Rune_07") then
my_wg_marks = count;
elseif (icn == "Interface\\Icons\\INV_Jewelry_Ring_66") then
my_wgsp_marks = count;
end;
end;

end;
if (TitanGetVar(TITAN_HONOR_ID, "ShowHonor") ~= nil) then
res = res .. TitanHonor_HL_text(my_honor);
end;
if (TitanGetVar(TITAN_HONOR_ID, "ShowAVMarks") ~= nil) then
res = res .. " AV: " .. TitanHonor_HL_text(my_av_marks);
end;
if (TitanGetVar(TITAN_HONOR_ID, "ShowABMarks") ~= nil) then
res = res .. " AB: " .. TitanHonor_HL_text(my_ab_marks);
end;
if (TitanGetVar(TITAN_HONOR_ID, "ShowEOSMarks") ~= nil) then
res = res .. " ES: " .. TitanHonor_HL_text(my_eos_marks);
end;
if (TitanGetVar(TITAN_HONOR_ID, "ShowIOCMarks") ~= nil) then
res = res .. " IC: " .. TitanHonor_HL_text(my_ioc_marks);
end;
if (TitanGetVar(TITAN_HONOR_ID, "ShowSOTAMarks") ~= nil) then
res = res .. " SA: " .. TitanHonor_HL_text(my_sota_marks);
end;
if (TitanGetVar(TITAN_HONOR_ID, "ShowWGMarks") ~= nil) then
res = res .. " WG: " .. TitanHonor_HL_text(my_wg_marks);
end;
if (TitanGetVar(TITAN_HONOR_ID, "ShowWGSPMarks") ~= nil) then
res = res .. " WGSP: " .. TitanHonor_HL_text(my_wgsp_marks);
end;
if (TitanGetVar(TITAN_HONOR_ID, "ShowArenaPoints") ~= nil) then
res = res .. " ArenaP: " .. TitanHonor_HL_text(my_arena_points);
end;
return res;
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Lua help...


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off