text color highlight for main window
This commit is contained in:
parent
be443c353b
commit
72cb2417d2
70
main.lua
70
main.lua
@ -56,6 +56,8 @@ local textMarginB = 20; --> margin between
|
|||||||
local textMarginT = 25; --> margin top
|
local textMarginT = 25; --> margin top
|
||||||
local textMarginL = 25; --> margin left
|
local textMarginL = 25; --> margin left
|
||||||
|
|
||||||
|
local textCol_value = "|cFFFFD044"; --> text color string vor values
|
||||||
|
|
||||||
local fsDeaths = mainFrame:CreateFontString(nil, "OVERLAY", textFont);
|
local fsDeaths = mainFrame:CreateFontString(nil, "OVERLAY", textFont);
|
||||||
Trackster_deathOffset = 0;
|
Trackster_deathOffset = 0;
|
||||||
|
|
||||||
@ -354,9 +356,9 @@ function UpdateDistanceTravelled(self, deltaTime, forceTextUpdate)
|
|||||||
|
|
||||||
if (timer__all >= updateDelayS__all or forceTextUpdate) then --> Update UI text every deltaTime seconds
|
if (timer__all >= updateDelayS__all or forceTextUpdate) then --> Update UI text every deltaTime seconds
|
||||||
if (val__all < 10000) then
|
if (val__all < 10000) then
|
||||||
fsDist:SetText("Distance travelled: " .. val__all .. "m");
|
fsDist:SetText("Distance travelled: " .. textCol_value .. val__all .. "m");
|
||||||
else
|
else
|
||||||
fsDist:SetText("Distance travelled: " .. Round(val__all/1000) .. "km");
|
fsDist:SetText("Distance travelled: " .. textCol_value .. Round(val__all/1000) .. "km");
|
||||||
end
|
end
|
||||||
|
|
||||||
timer__all = 0;
|
timer__all = 0;
|
||||||
@ -364,9 +366,9 @@ function UpdateDistanceTravelled(self, deltaTime, forceTextUpdate)
|
|||||||
|
|
||||||
if (timer__swam >= updateDelayS__swam or forceTextUpdate) then --> Update UI text every deltaTime seconds
|
if (timer__swam >= updateDelayS__swam or forceTextUpdate) then --> Update UI text every deltaTime seconds
|
||||||
if (val__swam < 10000) then
|
if (val__swam < 10000) then
|
||||||
fsDist__swam:SetText("Distance swam: " .. val__swam .. "m");
|
fsDist__swam:SetText("Distance swam: " .. textCol_value .. val__swam .. "m");
|
||||||
else
|
else
|
||||||
fsDist__swam:SetText("Distance swam: " .. Round(val__swam/1000) .. "km");
|
fsDist__swam:SetText("Distance swam: " .. textCol_value .. Round(val__swam/1000) .. "km");
|
||||||
end
|
end
|
||||||
|
|
||||||
timer__swam = 0;
|
timer__swam = 0;
|
||||||
@ -374,9 +376,9 @@ function UpdateDistanceTravelled(self, deltaTime, forceTextUpdate)
|
|||||||
|
|
||||||
if (timer__walked >= updateDelayS__walked or forceTextUpdate) then --> Update UI text every deltaTime seconds
|
if (timer__walked >= updateDelayS__walked or forceTextUpdate) then --> Update UI text every deltaTime seconds
|
||||||
if (val__walked < 10000) then
|
if (val__walked < 10000) then
|
||||||
fsDist__walked:SetText("Distance by foot: " .. val__walked .. "m");
|
fsDist__walked:SetText("Distance by foot: " .. textCol_value .. val__walked .. "m");
|
||||||
else
|
else
|
||||||
fsDist__walked:SetText("Distance by foot: " .. Round(val__walked/1000) .. "km");
|
fsDist__walked:SetText("Distance by foot: " .. textCol_value .. Round(val__walked/1000) .. "km");
|
||||||
end
|
end
|
||||||
|
|
||||||
timer__walked = 0;
|
timer__walked = 0;
|
||||||
@ -384,9 +386,9 @@ function UpdateDistanceTravelled(self, deltaTime, forceTextUpdate)
|
|||||||
|
|
||||||
if (timer__groundmount >= updateDelayS__groundmount or forceTextUpdate) then --> Update UI text every deltaTime seconds
|
if (timer__groundmount >= updateDelayS__groundmount or forceTextUpdate) then --> Update UI text every deltaTime seconds
|
||||||
if (val__groundmount < 10000) then
|
if (val__groundmount < 10000) then
|
||||||
fsDist__groundmount:SetText("Distance rode: " .. val__groundmount .. "m");
|
fsDist__groundmount:SetText("Distance rode: " .. textCol_value .. val__groundmount .. "m");
|
||||||
else
|
else
|
||||||
fsDist__groundmount:SetText("Distance rode: " .. Round(val__groundmount/1000) .. "km");
|
fsDist__groundmount:SetText("Distance rode: " .. textCol_value .. Round(val__groundmount/1000) .. "km");
|
||||||
end
|
end
|
||||||
|
|
||||||
timer__groundmount = 0;
|
timer__groundmount = 0;
|
||||||
@ -394,9 +396,9 @@ function UpdateDistanceTravelled(self, deltaTime, forceTextUpdate)
|
|||||||
|
|
||||||
if (timer__flight >= updateDelayS__flight or forceTextUpdate) then --> Update UI text every deltaTime seconds
|
if (timer__flight >= updateDelayS__flight or forceTextUpdate) then --> Update UI text every deltaTime seconds
|
||||||
if (val__flight < 10000) then
|
if (val__flight < 10000) then
|
||||||
fsDist__flight:SetText("Distance flew: " .. val__flight .. "m");
|
fsDist__flight:SetText("Distance flown: " .. textCol_value .. val__flight .. "m");
|
||||||
else
|
else
|
||||||
fsDist__flight:SetText("Distance flew: " .. Round(val__flight/1000) .. "km");
|
fsDist__flight:SetText("Distance flown: " .. textCol_value .. Round(val__flight/1000) .. "km");
|
||||||
end
|
end
|
||||||
|
|
||||||
timer__flight = 0;
|
timer__flight = 0;
|
||||||
@ -404,9 +406,9 @@ function UpdateDistanceTravelled(self, deltaTime, forceTextUpdate)
|
|||||||
|
|
||||||
if (timer__taxi >= updateDelayS__taxi or forceTextUpdate) then --> Update UI text every deltaTime seconds
|
if (timer__taxi >= updateDelayS__taxi or forceTextUpdate) then --> Update UI text every deltaTime seconds
|
||||||
if (val__taxi < 10000) then
|
if (val__taxi < 10000) then
|
||||||
fsDist__taxi:SetText("Distance on taxi: " .. val__taxi .. "m");
|
fsDist__taxi:SetText("Distance on taxi: " .. textCol_value .. val__taxi .. "m");
|
||||||
else
|
else
|
||||||
fsDist__taxi:SetText("Distance on taxi: " .. Round(val__taxi/1000) .. "km");
|
fsDist__taxi:SetText("Distance on taxi: " .. textCol_value .. Round(val__taxi/1000) .. "km");
|
||||||
end
|
end
|
||||||
|
|
||||||
timer__taxi = 0;
|
timer__taxi = 0;
|
||||||
@ -414,9 +416,9 @@ function UpdateDistanceTravelled(self, deltaTime, forceTextUpdate)
|
|||||||
|
|
||||||
if (timer__ghost >= updateDelayS__ghost or forceTextUpdate) then --> Update UI text every deltaTime seconds
|
if (timer__ghost >= updateDelayS__ghost or forceTextUpdate) then --> Update UI text every deltaTime seconds
|
||||||
if (val__ghost < 10000) then
|
if (val__ghost < 10000) then
|
||||||
fsDist__ghost:SetText("Distance haunted: " .. val__ghost .. "m");
|
fsDist__ghost:SetText("Distance haunted: " .. textCol_value .. val__ghost .. "m");
|
||||||
else
|
else
|
||||||
fsDist__ghost:SetText("Distance haunted: " .. Round(val__ghost/1000) .. "km");
|
fsDist__ghost:SetText("Distance haunted: " .. textCol_value .. Round(val__ghost/1000) .. "km");
|
||||||
end
|
end
|
||||||
|
|
||||||
timer__ghost = 0;
|
timer__ghost = 0;
|
||||||
@ -424,7 +426,7 @@ function UpdateDistanceTravelled(self, deltaTime, forceTextUpdate)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function UpdatePlvl()
|
function UpdatePlvl()
|
||||||
fsPlvl:SetText("Character level: " .. UnitLevel("PLAYER"));
|
fsPlvl:SetText("Character level: " .. textCol_value .. UnitLevel("PLAYER"));
|
||||||
end
|
end
|
||||||
|
|
||||||
function UpdateDeaths()
|
function UpdateDeaths()
|
||||||
@ -433,9 +435,9 @@ function UpdateDeaths()
|
|||||||
local val = select(1, GetStatistic(60));
|
local val = select(1, GetStatistic(60));
|
||||||
|
|
||||||
if (val == "--") then
|
if (val == "--") then
|
||||||
fsDeaths:SetText("Death count: " .. (Trackster_deathOffset));
|
fsDeaths:SetText("Death count: " .. textCol_value .. (Trackster_deathOffset));
|
||||||
else
|
else
|
||||||
fsDeaths:SetText("Death count: " .. (val + Trackster_deathOffset));
|
fsDeaths:SetText("Death count: " .. textCol_value .. (val + Trackster_deathOffset));
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -445,9 +447,9 @@ local function UpdateKills()
|
|||||||
local val = select(1, GetStatistic(1197));
|
local val = select(1, GetStatistic(1197));
|
||||||
|
|
||||||
if (val == "--") then
|
if (val == "--") then
|
||||||
fsKills:SetText("Kill count: " .. (Trackster_killsOffset));
|
fsKills:SetText("Kill count: " .. textCol_value .. (Trackster_killsOffset));
|
||||||
else
|
else
|
||||||
fsKills:SetText("Kill count: " .. (val + Trackster_killsOffset));
|
fsKills:SetText("Kill count: " .. textCol_value .. (val + Trackster_killsOffset));
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -457,9 +459,9 @@ local function UpdateQuests()
|
|||||||
local val = select(1, GetStatistic(98));
|
local val = select(1, GetStatistic(98));
|
||||||
|
|
||||||
if (val == "--") then
|
if (val == "--") then
|
||||||
fsQuests:SetText("Quest count: " .. (Trackster_questsOffset));
|
fsQuests:SetText("Quest count: " .. textCol_value .. (Trackster_questsOffset));
|
||||||
else
|
else
|
||||||
fsQuests:SetText("Quest count: " .. (val + Trackster_questsOffset));
|
fsQuests:SetText("Quest count: " .. textCol_value .. (val + Trackster_questsOffset));
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -469,9 +471,9 @@ local function UpdateHearthstones()
|
|||||||
local val = select(1, GetStatistic(353));
|
local val = select(1, GetStatistic(353));
|
||||||
|
|
||||||
if (val == "--") then
|
if (val == "--") then
|
||||||
fsHearthstones:SetText("Hearthed: " .. (Trackster_HearthstonesOffset) .. " times");
|
fsHearthstones:SetText("Hearthed: " .. textCol_value .. (Trackster_HearthstonesOffset) .. " times");
|
||||||
else
|
else
|
||||||
fsHearthstones:SetText("Hearthed: " .. (val + Trackster_HearthstonesOffset) .. " times");
|
fsHearthstones:SetText("Hearthed: " .. textCol_value .. (val + Trackster_HearthstonesOffset) .. " times");
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -499,7 +501,7 @@ end
|
|||||||
|
|
||||||
local function UpdateJump()
|
local function UpdateJump()
|
||||||
Trackster_jumpOffset = round(Trackster_jumpOffset);
|
Trackster_jumpOffset = round(Trackster_jumpOffset);
|
||||||
fsJump:SetText("Jump count: " .. (Trackster_jumpCounter + Trackster_jumpOffset));
|
fsJump:SetText("Jump count: " .. textCol_value .. (Trackster_jumpCounter + Trackster_jumpOffset));
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -515,25 +517,25 @@ local function UpdateCasts()
|
|||||||
elseif(val >= 100000) then val = tostring(round(val / 1000), 0) .. "K";
|
elseif(val >= 100000) then val = tostring(round(val / 1000), 0) .. "K";
|
||||||
end
|
end
|
||||||
|
|
||||||
fsCasts:SetText("Cast count: " .. val);
|
fsCasts:SetText("Cast count: " .. textCol_value .. val);
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function UpdateCrits()
|
local function UpdateCrits()
|
||||||
Trackster_critOffset = round(Trackster_critOffset);
|
Trackster_critOffset = round(Trackster_critOffset);
|
||||||
fsCrits:SetText("Crit count: " .. (Trackster_critCounter + Trackster_critOffset));
|
fsCrits:SetText("Crit count: " .. textCol_value .. (Trackster_critCounter + Trackster_critOffset));
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function UpdateLogins()
|
local function UpdateLogins()
|
||||||
Trackster_loginOffset = round(Trackster_loginOffset);
|
Trackster_loginOffset = round(Trackster_loginOffset);
|
||||||
fsLogins:SetText("Login count: " .. (Trackster_loginCounter + Trackster_loginOffset));
|
fsLogins:SetText("Login count: " .. textCol_value .. (Trackster_loginCounter + Trackster_loginOffset));
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function UpdateBoss()
|
local function UpdateBoss()
|
||||||
Trackster_bossOffset = round(Trackster_bossOffset);
|
Trackster_bossOffset = round(Trackster_bossOffset);
|
||||||
fsBoss:SetText("Boss count: " .. (Trackster_bossCounter + Trackster_bossOffset));
|
fsBoss:SetText("Boss count: " .. textCol_value .. (Trackster_bossCounter + Trackster_bossOffset));
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -543,23 +545,23 @@ local function UpdateIlvl()
|
|||||||
local val = math.floor(equipped + Trackster_IlvlOffset);
|
local val = math.floor(equipped + Trackster_IlvlOffset);
|
||||||
|
|
||||||
|
|
||||||
fsIlvl:SetText("ItemLvl: " .. val);
|
fsIlvl:SetText("ItemLvl: " .. textCol_value .. val);
|
||||||
end
|
end
|
||||||
|
|
||||||
local function UpdateGold()
|
local function UpdateGold()
|
||||||
--local val = select(1, GetStatistic(328));
|
--local val = select(1, GetStatistic(328));
|
||||||
local val = GetCoinTextureString(Trackster_goldCounter + Trackster_goldOffset);
|
local val = GetCoinTextureString(Trackster_goldCounter + Trackster_goldOffset);
|
||||||
fsGold:SetText("Gold total: " .. val);
|
fsGold:SetText("Gold total: " .. textCol_value .. val);
|
||||||
end
|
end
|
||||||
|
|
||||||
local function UpdateChat()
|
local function UpdateChat()
|
||||||
Trackster_chatOffset = round(Trackster_chatOffset);
|
Trackster_chatOffset = round(Trackster_chatOffset);
|
||||||
fsChat:SetText("Chat msgs sent: " .. (Trackster_chatCounter + Trackster_chatOffset));
|
fsChat:SetText("Chat msgs sent: " .. textCol_value .. (Trackster_chatCounter + Trackster_chatOffset));
|
||||||
end
|
end
|
||||||
|
|
||||||
local function UpdateItem()
|
local function UpdateItem()
|
||||||
Trackster_itemOffset = round(Trackster_itemOffset);
|
Trackster_itemOffset = round(Trackster_itemOffset);
|
||||||
fsItem:SetText("Items collected: " .. (Trackster_itemCounter + Trackster_itemOffset));
|
fsItem:SetText("Items collected: " .. textCol_value .. (Trackster_itemCounter + Trackster_itemOffset));
|
||||||
end
|
end
|
||||||
|
|
||||||
local function UpdateTime()
|
local function UpdateTime()
|
||||||
@ -567,10 +569,10 @@ local function UpdateTime()
|
|||||||
|
|
||||||
local d, h, m, s = select(1, FormatTime(lastConfirmedTime + internalTimeOffset + Trackster_timeOffset));
|
local d, h, m, s = select(1, FormatTime(lastConfirmedTime + internalTimeOffset + Trackster_timeOffset));
|
||||||
|
|
||||||
fsTime:SetText("Time played: " .. d .. " days, " .. h .. ":" .. m .. ":" .. s);
|
fsTime:SetText("Time played: " .. textCol_value .. d .. " days, " .. h .. ":" .. m .. ":" .. s);
|
||||||
|
|
||||||
local d, h, m, s = select(1, FormatTime(time() - Trackster_timestampRunBegin));
|
local d, h, m, s = select(1, FormatTime(time() - Trackster_timestampRunBegin));
|
||||||
fsAbsTime:SetText("Time (real): " .. d .. " days, " .. h .. ":" .. m .. ":" .. s);
|
fsAbsTime:SetText("Time (real): " .. textCol_value .. d .. " days, " .. h .. ":" .. m .. ":" .. s);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user