Thread Tools Display Modes
10-27-10, 04:08 PM   #1
TuLe
A Black Drake
 
TuLe's Avatar
Join Date: Dec 2007
Posts: 87
Talking Hiding custon UI when in vehicle!

Hey guys heres my question is there a way to hide my custon UI (kgpanels, bartender etc) and have blizz original default vehicle UI (the one with original artwork for dragons or machines) pop up? All i can have is bartender goin single bar when that hapens! Any mod or scripts that can do this?
Thx a bunch!
  Reply With Quote
10-28-10, 12:38 AM   #2
Xubera
A Cobalt Mageweaver
 
Xubera's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 207
i thought the newest version of bartender allowed you to use the default vehicle bar


either way, if you select the bar you want keybound to your vehicle, lets say that bar has all keys bound '1' through '=' (top of the keyboard). Just select that bar in your Bartender config, and click the tab that says State Configuration. There is a checkbox to make that bar switch to Vehicle assignments when in a vehicle
__________________
Chat Consolidate is the solution to any out of control trade chat. Ignore lines, throttle chat, consolidate posts!Follow the link to find out how!

▲ ▲ WoWInterface wont let me triforce >.>
  Reply With Quote
10-29-10, 12:27 PM   #3
TuLe
A Black Drake
 
TuLe's Avatar
Join Date: Dec 2007
Posts: 87
Thx friend and yes bartender now has an neat function to hide its bars when u jump onto a vehicle but still i need to hide my KGpanels as well. Anyone know how to do this via an script maybe!
Thx
  Reply With Quote
10-29-10, 01:04 PM   #4
Quokka
A Chromatic Dragonspawn
 
Quokka's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2005
Posts: 196
Originally Posted by TuLe View Post
Thx friend and yes bartender now has an neat function to hide its bars when u jump onto a vehicle but still i need to hide my KGpanels as well. Anyone know how to do this via an script maybe!
Thx
you could use
Code:
[vehicleui]hide;show
if it know default macro commands
__________________
  Reply With Quote
10-29-10, 01:13 PM   #5
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Not for kgPanels.

You'll need to register for the proper events in your OnLoad script, and in the OnEvent, tell whether to hide or show accordingly.

Alternately, you can parent your textures to the bartender bar/button, if they have altered frame names from the default UI.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
10-29-10, 01:53 PM   #6
Quokka
A Chromatic Dragonspawn
 
Quokka's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2005
Posts: 196
The events are

Code:
Panel1:SetScript("OnEvent", function(self, event, ...)
if event == "UNIT_ENTERED_VEHICLE" then
  -- some kg panel command here to hide
else
   -- some kg panel command here to show
end


Panel1:RegisterEvent('UNIT_ENTERED_VEHICLE')
Panel1:RegisterEvent('UNIT_EXITED_VEHICLE')
than something like this should work

If i understood Seerah right
__________________
  Reply With Quote
10-29-10, 02:54 PM   #7
Rilgamon
Premium Member
 
Rilgamon's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 822
Setting the parent of the frames to hide to UIParent should work, too.
__________________
The cataclysm broke the world ... and the pandas could not fix it!
  Reply With Quote
10-29-10, 06:17 PM   #8
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
UIParent doesn't hide when you enter a vehicle.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
10-30-10, 01:48 AM   #9
Rilgamon
Premium Member
 
Rilgamon's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 822
Originally Posted by Seerah View Post
UIParent doesn't hide when you enter a vehicle.
In the beginning I had a bug in ProcWatch that it did not hide when entering
a vehicle or switching to fullscreen. After changing the main frames parent to
UIParent the problem was gone ... so I thought this was related.
__________________
The cataclysm broke the world ... and the pandas could not fix it!
  Reply With Quote
10-30-10, 05:35 AM   #10
Garual
A Deviate Faerie Dragon
Join Date: Oct 2010
Posts: 11
Originally Posted by Quokka View Post
than something like this should work

If i understood Seerah right
Yep your right. For every panel set OnLoad:
Code:
self:RegisterEvent('UNIT_ENTERED_VEHICLE')
self:RegisterEvent('UNIT_EXITED_VEHICLE')
and in OnEvent:
Code:
if event == "UNIT_ENTERED_VEHICLE" then
 self:Hide()
else
 self:Show()
end
  Reply With Quote
02-10-19, 09:41 PM   #11
Wolryr
A Deviate Faerie Dragon
Join Date: Dec 2017
Posts: 16
Originally Posted by Garual View Post
Yep your right. For every panel set OnLoad:
Code:
self:RegisterEvent('UNIT_ENTERED_VEHICLE')
self:RegisterEvent('UNIT_EXITED_VEHICLE')
and in OnEvent:
Code:
if event == "UNIT_ENTERED_VEHICLE" then
 self:Hide()
else
 self:Show()
end
Sorry to necro this post, but I was just recently testing this as my custom kg panels were having the same issue. I wanted to say Garual's code works fine, but it also makes it so the panels would hide on EVERY unit (party or raid member) entering the vehicleUI state, not only the player.

Do you guys know how to make it so it only hides the panels on PLAYER vehicle ui?

Thanks, and sorry again.
  Reply With Quote
02-10-19, 10:47 PM   #12
Terenna
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 105
Instead of self:RegisterEvent use self:RegisterUnitEvent('UNIT_ENTERED_VEHICLE', 'player') etc
  Reply With Quote
02-11-19, 12:24 PM   #13
Wolryr
A Deviate Faerie Dragon
Join Date: Dec 2017
Posts: 16
Originally Posted by Terenna View Post
Instead of self:RegisterEvent use self:RegisterUnitEvent('UNIT_ENTERED_VEHICLE', 'player') etc
Many thanks! Seems to be working just fine now.
  Reply With Quote
02-11-19, 12:41 PM   #14
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
To clarify, this is due to a change in the API in the last 8+ years.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Hiding custon UI when in vehicle!

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