C# Class Project290.Menus.VolumeControlDisplayEntry

Used for both controlling volume and displaying the volume.
Inheritance: DescriptionMenuEntry
Exibir arquivo Open project: scastle/Solitude Class Usage Examples

Public Methods

Method Description
Draw ( Vector2 offsetPosition, bool highlighted ) : void

Draws the menu entry at the specified position.

Update ( bool highlighted ) : void

Updates the specified highlighted.

VolumeControlDisplayEntry ( string text, string description, MenuAction actions, Vector2 position, Vector2 numberDisplayPosition, float scale, float numberLayerDepth, bool musicVolume, bool ignoreOffsetPosition ) : System

Initializes a new instance of the VolumeControlDisplayEntry class.

Private Methods

Method Description
ChangeVolume ( int amount ) : void

Changes the volume by the specified amount.

Disappear ( ) : void

Has all scales go to 0.

GetVolume ( ) : int

Gets the volume in the range [0, 10].

UpdateTValues ( ) : void

Updates the T values (positions and scales) based on volume.

Method Details

Draw() public method

Draws the menu entry at the specified position.
public Draw ( Vector2 offsetPosition, bool highlighted ) : void
offsetPosition Vector2 The offset position.
highlighted bool Specifies whether or not this menu entry /// is the highlighted menu entry in the list of menu entries.
return void

Update() public method

Updates the specified highlighted.
public Update ( bool highlighted ) : void
highlighted bool Specifies whether or not this menu entry /// is the highlighted menu entry in the list of menu entries.
return void

VolumeControlDisplayEntry() public method

Initializes a new instance of the VolumeControlDisplayEntry class.
public VolumeControlDisplayEntry ( string text, string description, MenuAction actions, Vector2 position, Vector2 numberDisplayPosition, float scale, float numberLayerDepth, bool musicVolume, bool ignoreOffsetPosition ) : System
text string The text.
description string The description.
actions MenuAction The actions.
position Vector2 The position.
numberDisplayPosition Vector2 The number display position.
scale float The scale of the largest number.
numberLayerDepth float The number layer depth.
musicVolume bool Is this for music volume? Else, sound volume.
ignoreOffsetPosition bool if set to true [ignore offset position].
return System