UI Accessibility Plugin  Version 1.0.2
Make your UI accessible for visually impaired users
AccessiblePluginToggle Class Reference

Use this if the toggle is used in the Settings to indicate whether the Accessibility plugin is on/off. You don't have to use this necessarily, but it will set the correct toggle state automatically, even when the gesture is used to change the state while the toggle is visible. This will set or unset the toggle - so you OnChange listeners need to check whether there is anything to do before acting (whether plugin enabled state matches the toggle state). More...

Inheritance diagram for AccessiblePluginToggle:
AccessibleToggle UAP_BaseElement

Public Member Functions

void OnToggleStateChanged (bool newState)
 
void AccessibilitiyPlugin_StateChanged (bool newEnabledState)
 
- Public Member Functions inherited from AccessibleToggle
override bool IsElementActive ()
 
override bool IsInteractable ()
 
override void Interact ()
 
override string GetCurrentValueAsText ()
 
bool IsChecked ()
 
void SetToggleState (bool toggleState)
 
override AudioClip GetCurrentValueAsAudio ()
 
override bool AutoFillTextLabel ()
 
override void HoverHighlight (bool enable)
 
- Public Member Functions inherited from UAP_BaseElement
void Initialize ()
 
virtual void InteractEnd ()
 
virtual void InteractAbort ()
 End the interaction but - if it makes sense - restore previous value.
 
virtual string GetText ()
 
void SelectItem (bool forceRepeatItem=false)
 
virtual bool Increment ()
 
virtual bool Decrement ()
 
GameObject GetTargetGameObject ()
 
bool IsNameLocalizationKey ()
 
string GetCustomHint ()
 

Public Attributes

bool m_HandleActivation = true
 If true, this component will not just set the toggle state, but also react when the toggle is changed by the user - and then it will enable/disable the plugin. The reason that this is optional, is that some games prefer to show an additional confirmation window before enabling the plugin and drastically changing the game's input. More...
 
- Public Attributes inherited from AccessibleToggle
bool m_UseCustomOnOff = false
 
string m_CustomOn = "Checked"
 
string m_CustomOff = "Not Checked"
 
bool m_CustomHintsAreLocalizationKeys = false
 
AudioClip m_CustomOnAudio = null
 
AudioClip m_CustomOffAudio = null
 
- Public Attributes inherited from UAP_BaseElement
bool m_ForceStartHere = false
 
int m_ManualPositionOrder = -1
 
GameObject m_ManualPositionParent = null
 
bool m_UseTargetForOutline = false
 
int m_PositionOrder = 0
 
int m_SecondaryOrder = 0
 
Vector2 m_Pos = new Vector2(0, 0)
 
AudioClip m_TextAsAudio = null
 
string m_Text = ""
 This variable contains the text that will be read aloud if this UI element receives focus. This variable will only be used if the plugin is not reading text directly from a text label. More...
 
GameObject m_NameLabel = null
 Label that contains the name or description of the edit box. Use this to directly read localized content.

More...
 
bool m_IsLocalizationKey = false
 Uses the text inside m_NameLabel and requests translation. More...
 
bool m_TryToReadLabel = true
 Only works if there is a text label component either on this GameObject or set as a reference.
 
GameObject m_ReferenceElement = null
 Only set this if the accessibility component doesn't sit on the same GameObject.
 
bool m_AllowVoiceOver = true
 In very specific circumstances it can make sense to deliberately prevent using VoiceOver from speaking this element. VoiceOver lowers the rest of the volume of the application, which is sometimes unneccessary.
 
bool m_ReadType = true
 In very specific circumstances you might want to suppress the reading of the type.
 
bool m_WasJustAdded = true
 
AccessibleUIGroupRoot.EUIElement m_Type = AccessibleUIGroupRoot.EUIElement.EUndefined
 
bool m_CustomHint = false
 
AudioClip m_HintAsAudio = null
 
string m_Hint = ""
 
bool m_HintIsLocalizationKey = false
 
bool m_IsInsideScrollView = false
 
bool m_IsInitialized = false
 

Additional Inherited Members

- Protected Member Functions inherited from AccessibleToggle
Toggle GetToggle ()
 
override void AutoInitialize ()
 Do not call this function directly, use Initialize() instead. More...
 

Detailed Description

Use this if the toggle is used in the Settings to indicate whether the Accessibility plugin is on/off. You don't have to use this necessarily, but it will set the correct toggle state automatically, even when the gesture is used to change the state while the toggle is visible. This will set or unset the toggle - so you OnChange listeners need to check whether there is anything to do before acting (whether plugin enabled state matches the toggle state).

Member Data Documentation

bool AccessiblePluginToggle.m_HandleActivation = true

If true, this component will not just set the toggle state, but also react when the toggle is changed by the user - and then it will enable/disable the plugin. The reason that this is optional, is that some games prefer to show an additional confirmation window before enabling the plugin and drastically changing the game's input.


The documentation for this class was generated from the following file: