diff --git a/modules/panel.lua b/modules/panel.lua index c24fe453..25bc11cc 100644 --- a/modules/panel.lua +++ b/modules/panel.lua @@ -31,12 +31,23 @@ pfUI:RegisterModule("panel", "vanilla:tbc", function() GameTooltip:AddDoubleLine(T["Localtime"], "|cffffffff" .. time) GameTooltip:AddDoubleLine(T["Servertime"], "|cffffffff".. servertime) GameTooltip:AddLine(" ") - GameTooltip:AddDoubleLine(T["Left Click"], "|cffffffff" .. T["Show/Hide Timer"]) - GameTooltip:AddDoubleLine(T["Right Click"], "|cffffffff" .. T["Reset Timer"]) + if TimeManagerFrame then + GameTooltip:AddDoubleLine(T["Left Click"], "|cffffffff" .. T["Show/Hide TimeManager"]) + else + GameTooltip:AddDoubleLine(T["Left Click"], "|cffffffff" .. T["Show/Hide Timer"]) + GameTooltip:AddDoubleLine(T["Right Click"], "|cffffffff" .. T["Reset Timer"]) + end GameTooltip:Show() end widget.Click = function() this:RegisterForClicks("LeftButtonUp", "RightButtonUp") + if TimeManagerFrame then + if TimeManagerClockButton.alarmFiring then + TimeManager_TurnOffAlarm() + end + ToggleTimeManager() + return + end if arg1 == "LeftButton" then if widget.timerFrame:IsShown() then widget.timerFrame:Hide() diff --git a/skins/blizzard/time_manager.lua b/skins/blizzard/time_manager.lua index a0c3c321..dfa4eb88 100644 --- a/skins/blizzard/time_manager.lua +++ b/skins/blizzard/time_manager.lua @@ -7,6 +7,8 @@ pfUI:RegisterSkin("Time Manager", "tbc", function () StripTextures(TimeManagerFrame) CreateBackdrop(TimeManagerFrame, nil, nil, .75) CreateBackdropShadow(TimeManagerFrame) + TimeManagerClockButton:Hide() + TimeManagerClockButton.Show = function() return end TimeManagerFrame.backdrop:SetPoint("TOPLEFT", 10, -10) TimeManagerFrame.backdrop:SetPoint("BOTTOMRIGHT", -48, 1) @@ -116,21 +118,5 @@ pfUI:RegisterSkin("Time Manager", "tbc", function () StopwatchTicker:SetHeight(16) StopwatchTicker:SetPoint("RIGHT", StopwatchPlayPauseButton, "LEFT", -2*border + 1, 0) end - - hooksecurefunc("TimeManagerClockButton_UpdateTooltip", function() - GameTooltip:AddLine(" ") - GameTooltip:AddLine(TIMEMANAGER_TOOLTIP_TOGGLE_CLOCK_SETTINGS) - GameTooltip:Show() - end) - - -- needed insecure hook - function _G.TimeManagerClockButton_OnClick(self) - if self.alarmFiring then - PlaySound("igMainMenuQuit") - TimeManager_TurnOffAlarm() - else - ToggleTimeManager() - end - end end) end)