Namespace LlamaSoftware.UI
Classes
ButtonClickSoundPlayer
Finds all UnityEngine.UI.Button, UnityEngine.EventSystems.EventTrigger, and UnityEngine.UI.Toggle components and adds a UnityEngine.UI.Button.onClick / UnityEngine.EventSystems.EventTriggerType.PointerUp / UnityEngine.UI.Toggle.onValueChanged event that plays the provided UnityEngine.AudioClip.
The purpose of that is to batch all LlamaSoftware.UI.ButtonClickSoundPlayer.AudioSources for each of these components into a single LlamaSoftware.UI.ButtonClickSoundPlayer.AudioSource. Each AudioSource in the scene has some CPU overhead. Batching controls that will play separately allows a great reduction of AudioSources in the scene, and thsu frees many CPU cycles. This comes at the downside of each control should utilize the same UnityEngine.AudioClip.
If you would like different sounds for a UnityEngine.UI.Button click versus a UnityEngine.UI.Toggle change, you can attach 2 of these components to the root UnityEngine.Canvas and configure one to LlamaSoftware.UI.ButtonClickSoundPlayer.IncludeButtons = true and one to LlamaSoftware.UI.ButtonClickSoundPlayer.IncludeToggles = true.
Draggable
Allows this UnityEngine.RectTransform object to be dragged when the user holds UnityEngine.KeyCode.Mouse0.
EUIPButton
Used to build custom editor for buttons. Mostly just provides interface to interact with button component.
EUIPSlider
Slider component. Extends functionality of the UnityEngine.UI.Slider by grouping the control of an TMPro.TMP_InputField or displaying the value in a TMPro.TextMeshProUGUI text field.
If constructing via script, by the time Start() is called you should hook up InputField reference if you plan on using the WithInputField option. If constructing via script, by the time Start() is called you should hook up LabelText reference if you plan on using the WithLabel option.
InputFieldSliderValueDisplay
Sets the value of this TMP_InputField to the value received from a Slider. Attach this to a TMP_InputField, bind the OnChange event of a Slider to call SetValue.
MenuController
The Controller for all of your pages. Use only 1 per Canvas. All Page Management should be done via a single instance of MenuController.
MultiValueToggle
Component that supports swapping between options with left/right arrows. Fully controlled component can be configured in the inspector. You may also configure Values via the control functions of AddValue(String) and AddValues(IEnumerable<String>), or RemoveValue(String) / RemoveValues(IEnumerable<String>). It is recommended that you start from a prefab to manage via script.
MultiValueToggleArrow
Provides callbacks to MultiValueToggle and fades color similarly to a UnityEngine.UI.Selectable.
Page
Class to represent a Page that should be pushed/popped from the PageStack. You can subclass this to add specific page behavior, or make a separate class and bind actions in PrePopAction, PostPopAction, PrePushAction, and PostPushAction.
Popover
Manages Visibility of the popover. Will dismiss itself when the user clicks outside of the popover if HideOnOutsideClick = true
ProgressBar
Class manage display of a progress bar. Animates over AnimationTime duration by filling a sprite from 0 to 100% width. Optionally, based on Text being null or disabled, will also update a TMPro.TextMeshProUGUI with the progress.
ScrollViewZoomFixer
Utility class to fix issues with ScrollRects when adjusting scale with ZOOM animation specifically. Optionally will always scroll to top of a ScrollRect when a Page enters.
SliderValueDisplay
Displays the value of a Slider on a TextMeshProUGUI component. Bind SetText(Single) to the OnChange event of a Slider.
SliderValueSetter
Sets the value of a Slider. Bind the SetValue(String) method to the OnEndEdit event of a TMP_InputField. Do NOT bind it to the OnChange event of a TMP_InputField - this will result in incorrect behavior when using a Slider OnChange to set the value of an InputField
Spinner
Component to allow custom editor for managing Spinners. There is no additional code done here.
UIAnimationConstants
Collection of all constants used in Animations
Enums
EUIPButton.ButtonLabelStyle
EUIPSlider.DisplayFormat
Display Format of the Slider. SliderOnly has no input field nor label, so InputField, and LabelText can be unassigned, but are not required to be. WithLabel has a label, so LabelText must be assigned. WithInputField will display an input field next to the slider, so InputField must be assigned.
UIAnimationConstants.Direction
Used to specify which direction a SLIDE and ZOOM animation should occur. Note that when using ZOOM with the default Page Animation Controller, only TOP, BOTTOM, and NONE are supported. When using SLIDE, NONE is not supported by default.
UIAnimationConstants.EntryMode
Page Entry and Exit Modes. You can define any custom animation and bind it to one of these modes in your RuntimeAnimatorController. By Default the Page Controller has this all set up.
Delegates
MultiValueToggleArrow.OnPointerUpCallback
Callback to trigger on click. called MultiValueToggleArrow.OnPointerUpCallback