VoltAir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Groups Pages
Signals | Public Member Functions | Properties | List of all members
UiComponent Class Reference

Base class for UI sub-components that provides an API for showing, hiding, and focus changes. More...

Inheritance diagram for UiComponent:
KeyNavFocusArea Background Cinematic ConfirmDialog LevelSelectionMenu LoadingScreen MultiPlayerHud MultiPlayerScoringScreen Overlay PauseMenu SimpleListMenu SinglePlayerHud SinglePlayerScoringScreen Toast

Signals

void showCompleted ()
 Emitted when the UiComponent has completely shown. More...
 
void hideCompleted ()
 Emitted when the UiComponent has completely hidden. More...
 
- Signals inherited from KeyNavFocusArea
void pressed ()
 Emitted when this area receives a button press. More...
 
void released ()
 Emitted when this area receives a button release. More...
 
void escaped ()
 Emitted when a back navigation event occurs. More...
 

Public Member Functions

void show (int time)
 Shows the UiComponent over time milliseconds. More...
 
void hide (int time)
 Hides the UiComponent over time milliseconds. More...
 

Properties

string showState
 State transitioned to when show() is called. More...
 
string hideState
 State transitioned to when hide() is called. More...
 
int showDuration
 Time, in milliseconds, that the UiComponent takes to show. More...
 
int hideDuration
 Time, in milliseconds, that the UiComponent takes to hide. More...
 
bool showing
 Whether or not the UiComponent is shown or is transitioning to the showState. More...
 
bool shouldGainFocus
 Whether or not the UiComponent should gain focus when shown. More...
 
Item returnFocusTo
 Item that the component returns focus to if this UiComponent gained focus previously. More...
 
- Properties inherited from KeyNavFocusArea
Item focusUp
 Item to transfer focus to upon an "up" press. More...
 
Item focusDown
 Item to transfer focus to upon an "down" press. More...
 
Item focusLeft
 Item to transfer focus to upon an "left" press. More...
 
Item focusRight
 Item to transfer focus to upon an "right" press. More...
 
bool captureBackNavigation
 Whether or not the back button event is handled. More...
 
int backNavigationMode
 Mode that determines what keys behave as back buttons. More...
 

Detailed Description

Base class for UI sub-components that provides an API for showing, hiding, and focus changes.

Member Function Documentation

void UiComponent::hide ( int  time)

Hides the UiComponent over time milliseconds.

Parameters
timeDuration taken to hide the UiComponent
void UiComponent::hideCompleted ( )
signal

Emitted when the UiComponent has completely hidden.

void UiComponent::show ( int  time)

Shows the UiComponent over time milliseconds.

Parameters
timeDuration taken to show the UiComponent
void UiComponent::showCompleted ( )
signal

Emitted when the UiComponent has completely shown.

Property Documentation

int UiComponent::hideDuration

Time, in milliseconds, that the UiComponent takes to hide.

Note
This duration is a guideline and should be used by the implementing component, but is in no way strictly enforced.
string UiComponent::hideState

State transitioned to when hide() is called.

Note
It is the inheriting component's responsibility to change the opacity of this component from 1.0 to 0.0 when transitioning to hideState.
Item UiComponent::returnFocusTo

Item that the component returns focus to if this UiComponent gained focus previously.

bool UiComponent::shouldGainFocus

Whether or not the UiComponent should gain focus when shown.

int UiComponent::showDuration

Time, in milliseconds, that the UiComponent takes to show.

Note
This duration is a guideline and should be used by the implementing component, but is in no way strictly enforced.
bool UiComponent::showing

Whether or not the UiComponent is shown or is transitioning to the showState.

string UiComponent::showState

State transitioned to when show() is called.

Note
It is the inheriting component's responsibility to change the opacity of this component from 0.0 to 1.0 when transitioning to showState.