WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   TimeManagerClockButton Help? (https://www.wowinterface.com/forums/showthread.php?t=33208)

suicidalkatt 06-15-10 11:59 PM

TimeManagerClockButton Help?
 
So I'm looking for the proper way to hide the TimeManagerClockButton and keep it hidden.

The problem I'm coming into is after going into any interface options and then exiting them, the TimeManagerClockButton reappears.

SLDT does this which does hide it on load, however the button returns as mentioned:

Code:


function Clock:OnEnable()
        if ( TimeManagerClockButton and TimeManagerClockButton:IsShown() ) then TimeManagerClockButton:Hide() end
    if ( db.hideGameTime ) then
        if ( GameTimeFrame and GameTimeFrame:IsShown() ) then GameTimeFrame:Hide() end
    end
    buildModule(self)
    if ( not self.frame:IsShown() ) then self.frame:Show() end
end

function Clock:OnDisable()
    self:UnregisterEvent("PLAYER_ENTERING_WORLD")
    f:SetScript("OnUpdate", nil)
    self.button:SetScript("OnClick", nil)
    if ( TimeManagerClockButton and not TimeManagerClockButton:IsShown() ) then TimeManagerClockButton:Show() end
    if ( db.hideGameTime ) then
        if ( GameTimeFrame and not GameTimeFrame:IsShown() ) then GameTimeFrame:Show() end
    end
        if ( self.frame:IsShown() ) then self.frame:Hide() end
end

I've also read this:
http://forums.wowace.com/showthread.php?t=14105

However I can't seem to find any information on the reappearance issue.

Anyone else run into this?

suicidalkatt 06-16-10 01:44 AM

Seem to have found the solution:

Adding this:

function TimeManagerClockButton_Show() TimeManagerClockButton:Hide(); end

Seems to prevent the Blizzard_TimeManager addon from showing the button again.

v6o 06-16-10 03:23 AM

1 Attachment(s)
So this doesn't work at all because of SLDT?

Ferous 06-16-10 03:57 AM

Quote:

Originally Posted by v6o (Post 192387)
So this doesn't work at all because of SLDT?

If you hide it, you have to Reload your UI I believe, depending on the Minimap AddOn you're using.

Chimaine 06-18-10 07:28 AM

Code:

TimeManagerClockButton:UnregisterAllEvents()
TimeManagerClockButton:Hide()
TimeManagerClockButton:ClearAllPoints()

Also works without hooking or overwriting existing functions.


All times are GMT -6. The time now is 09:26 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI