Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions modules/turtle-wow.lua
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ pfUI:RegisterModule("turtle-wow", "vanilla", function ()
sh = sh + 12
sh = sh >= 24 and sh - 24 or sh
end

-- perform am/pm calculations
if C.global.twentyfour == "0" then
local zn, sn = " AM", " AM"
Expand Down Expand Up @@ -193,12 +193,21 @@ pfUI:RegisterModule("turtle-wow", "vanilla", function ()
servertime = string.format("%.2d:%.2d", sh, sm)
zonetime = string.format("%.2d:%.2d", zh, zm)
end


-- pick color for zone time based on day/night
local zoneColor
if zh >= 6 and zh < 18 then
zoneColor = "|cffffbb00" -- orange (day)
else
zoneColor = "|cff0074FF" -- blue (night)
end

-- create the tooltip
GameTooltip:AddLine("|cff555555" .. T["Time"])
GameTooltip:AddDoubleLine(T["Localtime"], "|cffffffff" .. time)
GameTooltip:AddDoubleLine(T["Servertime"], "|cffffffff".. servertime)
GameTooltip:AddDoubleLine(T["Zonetime"], "|cffffffff".. zonetime)
GameTooltip:AddDoubleLine(T["Zonetime"], zoneColor .. zonetime)
GameTooltip:AddLine(" ")
if TimeManagerFrame then
GameTooltip:AddDoubleLine(T["Left Click"], "|cffffffff" .. T["Show/Hide TimeManager"])
Expand Down