Skip to content

Commit

Permalink
Fixed hidden flags usage in editor
Browse files Browse the repository at this point in the history
  • Loading branch information
weeeBox committed Aug 10, 2020
1 parent cc4cde3 commit 767c15d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ void OnActionGUI(CAction action)

void OnVariableGUI(CVar cvar)
{
if (cvar.IsHidden)
{
return;
}

if (cvar.IsDefault)
{
OnVariableFieldGUI(cvar);
Expand Down
6 changes: 6 additions & 0 deletions Project/Assets/LunarConsole/Scripts/Actions/CVar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public bool IsValid
}
}

[Flags]
public enum CFlags
{
/// <summary>
Expand Down Expand Up @@ -377,6 +378,11 @@ public CFlags Flags
get { return m_flags; }
}

public bool IsHidden
{
get { return (m_flags & CFlags.Hidden) != 0; }
}

#endregion

#region Operators
Expand Down

0 comments on commit 767c15d

Please sign in to comment.