WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Getting an AddOn frame to hide on VehicleUI (https://www.wowinterface.com/forums/showthread.php?t=57019)

Wolryr 02-10-19 06:17 PM

Getting an AddOn frame to hide on VehicleUI
 
Hello everyone.

Sorry in advance if this is posted in the wrong forum.

I'm looking for a way to hide an AddOn feature, specifically, the Marks Bar from ExorsusRaidTools (that one with the skull, star marks, etc) when my character enters a vehicleUI.

The AddOn has a feature to have that bar hidden during a Pet Battle for example, in its own .lua file: MarksBar.lua

Lua Code:
  1. module.frame:SetBackdrop({bgFile = ExRT.F.barImg})
  2. module.frame:SetBackdropColor(0,0,0,0.8)
  3. module.frame:Hide()
  4. module:RegisterHideOnPetBattle(module.frame)

Since my knowledge in LUA coding is super limited right now, I'm just trying to randomly mess with the .lua file for said MarksBar without luck. Honestly, I don't really know what I'm doing... trying to copy paste pieces of the same code that worked and recreate that, but without luck:

Lua Code:
  1. module.frame:SetBackdrop({bgFile = ExRT.F.barImg})
  2. module.frame:SetBackdropColor(0,0,0,0.8)
  3. module.frame:Hide()
  4. module:RegisterHideOnVehicleUI(module.frame)

I was hoping maybe some of you guys know that AddOn or can lend me a hand. I would really appreciate it if anybody knows how to approach this kind of thing. Just to make so that bar hides itself when entering a vehicleUI and then shows right after leaving it.

(I'm talking about that vehicleUI you get during some bosses or WQ, like that one turtle World Quest from Nola, from when you shot sand out of)

I'm talking about this: https://imgur.com/v7S8mJF



Thanks!

I can upload the original LUA file if needed. I just don't know if I can attach files here, or how.

Tim 02-10-19 07:50 PM

Code:

RegisterStateDriver(frame, "visibility", "[petbattle][vehicleui] hide; show")
You can either hard code the frame in there or type /fstack to get the frame name and apply the code somewhere else outside of the actual addon.

Terenna 02-10-19 08:39 PM

Wouldn't that code make it show only when the vehicle or pet battle UI is open? And then hide it when he's not pet battling/in a vehicle?

Wolryr 02-10-19 09:23 PM

Thank you guys for your answers. Will definitely be testing that. :)

Tim 02-11-19 01:16 PM

Quote:

Originally Posted by Terenna (Post 331545)
Wouldn't that code make it show only when the vehicle or pet battle UI is open? And then hide it when he's not pet battling/in a vehicle?

Yes, I forgot to adjust it to do the opposite. My post is altered now.

Wolryr 02-11-19 04:36 PM

Quote:

Originally Posted by Tim (Post 331551)
Yes, I forgot to adjust it to do the opposite. My post is altered now.

Awesome, thanks!


All times are GMT -6. The time now is 02:27 PM.

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