Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
kianzarrin committed Jul 11, 2022
1 parent e51f3c4 commit 2650aee
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
12 changes: 6 additions & 6 deletions UnifiedUILib/UnifiedUILib.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions UnifiedUIMod/LifeCycle/UUISettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public static void Reset() {
MainPanel.RowInstance_?.Close();
HideOriginalButtons.value = true;
HandleESC.value = true;
Grabber.Instance?.RemoveAll();
UUIGrabberData.ResetSettings();
FloatingButton.ResetSettings();
MainPanel.ResetSettings();
Expand Down
8 changes: 8 additions & 0 deletions UnifiedUIMod/Tool/Grabber.cs
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,14 @@ IEnumerator RestoreButton() {
} catch (Exception ex) { ex.Log(); }
}

public void RemoveAll() {
var buttons = GrabbedButtons.Keys.ToArray();
foreach (var button in buttons) {
RemoveButton(button);
}
GrabbedButtons.Clear();
}

bool changing_;
void ButtonSizeChanged(UIComponent button, Vector2 __) {
if (changing_)
Expand Down

0 comments on commit 2650aee

Please sign in to comment.