Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Commit

Permalink
Merge pull request #31 from Gamersven/Merge2
Browse files Browse the repository at this point in the history
Added ReMenuToggle.Value getter and setter
  • Loading branch information
RequiDev committed Jul 8, 2022
2 parents 57afc40 + 22de5d6 commit a8732be
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion UI/QuickMenu/ReMenuToggle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ public bool Interactable
}

private bool _valueHolder;
public bool Value
{
get => _valueHolder;
set => Toggle(value);
}

private StyleElement _toggleStyleElement;

Expand Down Expand Up @@ -149,7 +154,7 @@ private void OnValueChanged(bool arg0)
_onValueChanged.Add((Action)Delegate.CreateDelegate(typeof(Action), _toggleIcon, methodInfo));
}
}

_valueHolder = arg0;
foreach (var onValueChanged in _onValueChanged)
{
onValueChanged();
Expand Down

0 comments on commit a8732be

Please sign in to comment.