Thread Tools Display Modes
06-15-10, 11:59 PM   #1
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
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?
  Reply With Quote
06-16-10, 01:44 AM   #2
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
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.
  Reply With Quote
06-16-10, 03:23 AM   #3
v6o
An Onyxian Warder
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 399
So this doesn't work at all because of SLDT?
Attached Thumbnails
Click image for larger version

Name:	slightlyeasier.jpg
Views:	891
Size:	109.7 KB
ID:	4415  
__________________
I stopped playing back World of Warcraft in 2010 and I have no plans on returning.
This is a dead account and if you want to continue any of my addons or make a fork then feel free to do so.
This is your permission slip.

If you need to contact me, do so on Twitter @v6ooo

Best regards, v6.
  Reply With Quote
06-16-10, 03:57 AM   #4
Ferous
Sheer Sense of Doom
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 863
Originally Posted by v6o View Post
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.
  Reply With Quote
06-18-10, 07:28 AM   #5
Chimaine
A Deviate Faerie Dragon
 
Chimaine's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 17
Code:
TimeManagerClockButton:UnregisterAllEvents()
TimeManagerClockButton:Hide()
TimeManagerClockButton:ClearAllPoints()
Also works without hooking or overwriting existing functions.
__________________
Author cAddOns
Chimaine on EU-Destromath.

ATTN! A german writing english!
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » TimeManagerClockButton Help?

Thread Tools
Display Modes

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