Add UI click sounds (#22410)
* Add UI click sounds * tweaks * Significant cleanup * Audio options and numerous fixes * Fix the remaining UI elements * new click sound --------- Co-authored-by: Kara <lunarautomaton6@gmail.com>
This commit is contained in:
@@ -285,7 +285,7 @@ public sealed class ActionUIController : UIController, IOnStateChanged<GameplayS
|
||||
private void OnWindowOpened()
|
||||
{
|
||||
if (ActionButton != null)
|
||||
ActionButton.Pressed = true;
|
||||
ActionButton.SetClickPressed(true);
|
||||
|
||||
SearchAndDisplay();
|
||||
}
|
||||
@@ -293,7 +293,7 @@ public sealed class ActionUIController : UIController, IOnStateChanged<GameplayS
|
||||
private void OnWindowClosed()
|
||||
{
|
||||
if (ActionButton != null)
|
||||
ActionButton.Pressed = false;
|
||||
ActionButton.SetClickPressed(false);
|
||||
}
|
||||
|
||||
public void OnStateExited(GameplayState state)
|
||||
|
||||
@@ -355,6 +355,7 @@ public sealed class ActionButton : Control, IEntityControl
|
||||
{
|
||||
base.MouseEntered();
|
||||
|
||||
UserInterfaceManager.HoverSound();
|
||||
_beingHovered = true;
|
||||
DrawModeChanged();
|
||||
}
|
||||
|
||||
@@ -127,14 +127,12 @@ public sealed class AdminUIController : UIController, IOnStateEntered<GameplaySt
|
||||
|
||||
private void OnWindowOpen()
|
||||
{
|
||||
if (AdminButton != null)
|
||||
AdminButton.Pressed = true;
|
||||
AdminButton?.SetClickPressed(true);
|
||||
}
|
||||
|
||||
private void OnWindowClosed()
|
||||
{
|
||||
if (AdminButton != null)
|
||||
AdminButton.Pressed = false;
|
||||
AdminButton?.SetClickPressed(false);
|
||||
}
|
||||
|
||||
private void OnWindowDisposed()
|
||||
|
||||
@@ -121,6 +121,7 @@ public sealed class AHelpUIController: UIController, IOnSystemChanged<BwoinkSyst
|
||||
LobbyAHelpButton.Pressed = pressed;
|
||||
}
|
||||
|
||||
UIManager.ClickSound();
|
||||
UnreadAHelpRead();
|
||||
}
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@ public sealed class CharacterUIController : UIController, IOnStateEntered<Gamepl
|
||||
|
||||
if (CharacterButton != null)
|
||||
{
|
||||
CharacterButton.Pressed = !_window.IsOpen;
|
||||
CharacterButton.SetClickPressed(!_window.IsOpen);
|
||||
}
|
||||
|
||||
if (_window.IsOpen)
|
||||
|
||||
@@ -51,8 +51,8 @@ public sealed class EscapeUIController : UIController, IOnStateEntered<GameplayS
|
||||
EscapeButton.OnPressed += EscapeButtonOnOnPressed;
|
||||
}
|
||||
|
||||
private void ActivateButton() => EscapeButton!.Pressed = true;
|
||||
private void DeactivateButton() => EscapeButton!.Pressed = false;
|
||||
private void ActivateButton() => EscapeButton!.SetClickPressed(true);
|
||||
private void DeactivateButton() => EscapeButton!.SetClickPressed(false);
|
||||
|
||||
public void OnStateEntered(GameplayState state)
|
||||
{
|
||||
|
||||
@@ -139,12 +139,13 @@ public sealed class GuidebookUIController : UIController, IOnStateEntered<LobbyS
|
||||
|
||||
if (_guideWindow.IsOpen)
|
||||
{
|
||||
UIManager.ClickSound();
|
||||
_guideWindow.Close();
|
||||
return;
|
||||
}
|
||||
|
||||
if (GuidebookButton != null)
|
||||
GuidebookButton.Pressed = !_guideWindow.IsOpen;
|
||||
GuidebookButton.SetClickPressed(!_guideWindow.IsOpen);
|
||||
|
||||
if (guides == null)
|
||||
{
|
||||
|
||||
@@ -243,7 +243,9 @@ public sealed class InventoryUIController : UIController, IOnStateEntered<Gamepl
|
||||
}
|
||||
|
||||
UpdateInventoryHotbar(_playerInventory);
|
||||
_inventoryHotbar.Visible = !_inventoryHotbar.Visible;
|
||||
var shouldBeVisible = !_inventoryHotbar.Visible;
|
||||
_inventoryHotbar.Visible = shouldBeVisible;
|
||||
|
||||
}
|
||||
|
||||
// Neuron Activation
|
||||
|
||||
@@ -172,10 +172,12 @@ public sealed class SandboxUIController : UIController, IOnStateChanged<Gameplay
|
||||
return;
|
||||
if (_sandbox.SandboxAllowed && _window.IsOpen != true)
|
||||
{
|
||||
UIManager.ClickSound();
|
||||
_window.OpenCentered();
|
||||
}
|
||||
else
|
||||
{
|
||||
UIManager.ClickSound();
|
||||
_window.Close();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user