Skip to content

Commit

Permalink
Add Player Frame Visibility options
Browse files Browse the repository at this point in the history
  • Loading branch information
greven committed Jul 27, 2018
1 parent 63f8280 commit 04d202b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions config/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ cfg.units = {
frequentUpdates =Ttrue,
smooth = true,
},
visibility = "[combat][mod][@target,exists,nodead][vehicleui][group] show; hide",
name = {
show = true
},
Expand Down
11 changes: 6 additions & 5 deletions units/player.lua
Original file line number Diff line number Diff line change
Expand Up @@ -596,17 +596,18 @@ local createStyle = function(self)
barTimers.PostUpdateIcon = PostUpdateBarTimer
self.Buffs = barTimers
end

-- Frame Visibility
RegisterStateDriver(self, "visibility", cfg.units[frame].visibility)
end

-- -----------------------------------
-- > SPAWN UNIT
-- -----------------------------------
if cfg.units[frame].show then
print(A..frame)
oUF:RegisterStyle(A..frame:gsub("^%l", string.upper), createStyle)
oUF:SetActiveStyle(A..frame:gsub("^%l", string.upper))
oUF:Spawn(frame, A..frame:gsub("^%l", string.upper))
local f = oUF:Spawn(frame, A..frame:gsub("^%l", string.upper))
-- Frame Visibility
if cfg.units[frame].visibility then
f:Disable()
RegisterStateDriver(f, "visibility", cfg.units[frame].visibility)
end
end

3 comments on commit 04d202b

@Fr1tzl1
Copy link

@Fr1tzl1 Fr1tzl1 commented on 04d202b Jul 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can i disable the Visibility options, that the player units are always visible

visibility = "..........." ????

@greven
Copy link
Owner Author

@greven greven commented on 04d202b Jul 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

visibility = show

I'll add that as a comment in the config in the future. :)

@Fr1tzl1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks

Please sign in to comment.