Thread Tools Display Modes
05-04-09, 10:16 AM   #21
Tristanian
Andúril
Premium Member
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 279
Ok, the way I see it, nUI is hooking a function (TitanPanelBarButton_ToggleBarsShown) that does not get called on initialization, meaning on PLAYER_ENTERING_WORLD, when both top and bottom bars are enabled. On the other hand nUI is correctly hooking TitanPanelBarButton_TogglePosition that does get called on PEW, when only the top bar is present and displayed.

A quick fix (may not be perfect since I've only done basic testing), I've found is the following :

local function onTitanPanelEvent()

-- nUI_ProfileStart( ProfileCounter, "onTitanPanelEvent", event );

if IsAddOnLoaded( "Titan" ) then

hooksecurefunc( "TitanPanelBarButton_ToggleAutoHide", DetectTitanBars );
hooksecurefunc( "TitanPanelBarButton_ToggleAuxAutoHide", DetectTitanBars );
hooksecurefunc( "TitanPanelBarButton_TogglePosition", DetectTitanBars );
-- Tristanian : Hook DisplayBarsWanted instead of ToggleBarsShown, as the later
-- isn't called on PLAYER_ENTERING_WORLD and ToggleBarsShown will call DisplayBarsWanted
-- by itself.
--hooksecurefunc( "TitanPanelBarButton_ToggleBarsShown", DetectTitanBars );
hooksecurefunc( "TitanPanelBarButton_DisplayBarsWanted", DetectTitanBars );
hooksecurefunc( "TitanPanelBarButton_Hide", DetectTitanBars );
hooksecurefunc( "TitanPanelBarButton_Show", DetectTitanBars );

DetectTitanBars();

frame:UnregisterEvent( "PLAYER_ENTERING_WORLD" );

-- Titan creates this annoying bar at the bottom of the display that interferes with
-- everything even when there is no bottom bar enabled. This should clean it up.

-- Tristanian : The following lines are not required. Titan hides the TitanPanelAuxBarButtonHider
-- frame when no bottom bars are present. In addition it repositions it properly when only one bottom bar is shown. This enables the bottom bar to function properly with nUI, with or without auto-hide.

--if TitanPanelAuxBarButtonHider then
--TitanPanelAuxBarButtonHider:EnableMouse( false );
--end

end

-- nUI_ProfileStop();

end
There is still one more issue to research but I haven't got the time, since I need to raid soon :P

nUI will not play nice with a 2nd bottom bar but that can be fixed by refining the DetectTitanBars() a bit.

Last but not least, never attempt to set Titan's strata to BACKGROUND when nUI is present, it's too low and textures will overlap. It shouldn't even be needed anyway but I thought I should mention it to prevent any future issues
__________________
 
05-09-09, 09:56 AM   #22
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
Tristanian --

I wanted to thank you, again, for taking the time to look into this... I know you were under zero obligation to do so. It is deeply appreciated.

I've implemented your suggested changes and will have them in the next update. In my initial testing it appears to have gotten the job done. We'll see when it's in the field.

Thanks again.
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
 
 

WoWInterface » Featured Projects » nUI, MozzFullWorldMap and PartySpotter » Support » nUI: Technical Support » nUI + Titan Panel


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