need help with mouseovers and hiding frames
Im trying to make a minimal UI because there are a lot of frames i dont need, Below is what im trying to accomplish in lua.
mouseover for action bar 1, so unless i put my mouse over the bar it is always alpha 0 or hidden. Always have the objective tracker frames minimized, UNLESS I click to expand it myself. (if its possible to just hide it, id like that more) hide minimap or have minimap only show on mouseover i currently use the following and it does not work, it instead remove the textures and make the map transparent. Code:
Minimap:SetAlpha(0) this is pretty much what i want to achieve, this isnt mine. http://i.imgur.com/a02VGtn.jpg |
This should works perfectly, this code will Hide your Minimap and Objective tracker frame, and it will show Minimap onEnter event:
Lua Code:
If you want to hide special frame, for example target, self, focus. party, raid, then change this line: Lua Code:
Lua Code:
Lua Code:
For your action bars I suggest you to use Bartender of other similar AddOns. Remember that you can't :Hide() and :Show() Action Bars in combat (Blizzard block this for security and anti-cheat/bot reason), but you can :SetAlpha([value]) P.S. Use this code after "PLAYER_ENTERING_WORLD" Event to make thing works correctly, for sure hide all frames when LogIn, other way, some frames might not be hidden. I use XML to load my AddOn, and track an events (but most of AddOn authors uses lua), this is XML i use to load my own AddOns: Code:
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ |
1 Attachment(s)
Just to make everything easier for you, I build and pack all above in to simple AddOn.
For hiding PlayerFrame and TargetFrame i suggest you to use code from this topic. |
Quote:
|
As Phanx pointed out that is not necessary. If you are concerned about variable scoping you can use a do-end block.
Lua Code:
|
Quote:
I never programmed before, so I don't know any languages at all, only a bit of lua, and I'm learing the best practice. And for sure, i want to write my code well and in correct way. But even when i see Blizzard's code (who could think, it's one of the top game company in a world, and most known company), and their interface code looks messy in some files, and style of code different, and looks like that they don't even have a code standard, I find this very strange. Same thing about graphic UI standard, there are lot's of little bugs or mess. |
Quote:
https://www.townlong-yak.com/framexm...arent.lua#3627 Whoever wrote that apparently did not know about string.upper. :rolleyes: |
All times are GMT -6. The time now is 01:46 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI