C# Class FontEffectsLib.SpriteTypes.Panel

Create an expandable / collapsable panel.
Inheritance: SlidingSprite, IStateful
Afficher le fichier Open project: GreatMindsRobotics/FontEffectsLib

Protected Properties

Свойство Type Description
_minScale Vector2
_speed Vector2
_state PanelState

Méthodes publiques

Méthode Description
Collapse ( ) : bool

Collapse the panel. Panel must be in Open or Expanding states.

Expand ( ) : bool

Expand the panel. The panel must be in Collapsed or Collapsing state.

Panel ( GraphicsDevice graphics, Vector2 size, Vector2 speed, Vector2 position, Color color ) : System

Creates an expandable/collapsable panel

Update ( GameTime gameTime ) : void

Standard XNA Game loop Update method.

Méthodes protégées

Méthode Description
switchState ( PanelState panelState ) : void

Switches the current state of the panel, and fires StateChanged event, if there are any subscribers.

Method Details

Collapse() public méthode

Collapse the panel. Panel must be in Open or Expanding states.
public Collapse ( ) : bool
Résultat bool

Expand() public méthode

Expand the panel. The panel must be in Collapsed or Collapsing state.
public Expand ( ) : bool
Résultat bool

Panel() public méthode

Creates an expandable/collapsable panel
public Panel ( GraphicsDevice graphics, Vector2 size, Vector2 speed, Vector2 position, Color color ) : System
graphics GraphicsDevice Graphics device
size Vector2 Size of panel when fully expanded
speed Vector2 Speed of expansion/collapse
position Vector2 Position of center of the panel. Panel expands/collapses from/to this point
color Color Color of the panel
Résultat System

Update() public méthode

Standard XNA Game loop Update method.
public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime GameTime object for current game.
Résultat void

switchState() protected méthode

Switches the current state of the panel, and fires StateChanged event, if there are any subscribers.
protected switchState ( PanelState panelState ) : void
panelState PanelState New state for the current panel.
Résultat void

Property Details

_minScale protected_oe property

The smallest scale value to scale this panel to in Collapsed state. Default is Vector2.One
protected Vector2 _minScale
Résultat Vector2

_speed protected_oe property

Speed with which to expand/collapse the panel.
protected Vector2 _speed
Résultat Vector2

_state protected_oe property

Panel's current state.
protected PanelState _state
Résultat PanelState