C# Class FlatRedBall.Gui.Window

This is the base class for most Gui elements.
The WindowClass contains common properties, events, and methods used by other Gui elements. Much like most FRB objects, Windows and window sub-classes should be created through the GuiManager.

Windows can be created and drawn two different ways. One is the default Gui. The default is drawn using the guiTex.png graphic. The appearance of the default Gui is similar to a regular Windows Gui. Most default-drawn Gui elements must be added through a Window instance rather than the GuiManager. It is common practice to create a Window through the GuiManager, then to add the children Gui elements through the newly-created Window.

To chnage the appearance of the Gui, most Gui elements can be constructed using SpriteFrames. SpriteFrame-created GuiElements can be created either through the GuiManager or a Window instance.

FlatRedBall.Gui.GuiManager.AddWindow() FlatRedBall.ManagedSpriteGroups.SpriteFrame
Inheritance: IScalable, IAnimationChainAnimatable, INameable, IWindow, IVisible:IWindow, IVisible
显示文件 Open project: vchelaru/FlatRedBall Class Usage Examples

Public Properties

Property Type Description
KeepWindowsInScreen bool

Protected Properties

Property Type Description
StaticVertices Microsoft.Xna.Framework.Graphics.VertexPositionColorTexture[]
mChildren WindowArray
mColor Microsoft.Xna.Framework.Color
mColor uint
mCursor Cursor
mFloatingWindows WindowArray
mMoveBar bool
mName string
mScaleX float
mScaleXVelocity float
mScaleY float
mScaleYVelocity float
mTextureBottom float
mTextureLeft float
mTextureRight float
mTextureTop float
mVisible bool
mWorldUnitRelativeX float
mWorldUnitRelativeY float
mWorldUnitX float
mWorldUnitY float

Private Properties

Property Type Description

Property Details

KeepWindowsInScreen public_oe static_oe property

Whether Windows should be repositioned to keep their move bar accessible to the mouse. Default true.
public static bool KeepWindowsInScreen
return bool

StaticVertices protected_oe static_oe property

Vertices used in the Draw methods.
Derived UI elements do not need to use this unless they are manually drawing new types of objects. Derived UI elements which simply use other base elements will not need to touch this field.
protected static VertexPositionColorTexture[],Microsoft.Xna.Framework.Graphics StaticVertices
return Microsoft.Xna.Framework.Graphics.VertexPositionColorTexture[]

mChildren protected_oe property

Windows that belong to and are positioned relative to this Window.
protected WindowArray mChildren
return WindowArray

mColor protected_oe property

protected Microsoft.Xna.Framework.Color mColor
return Microsoft.Xna.Framework.Color

mColor protected_oe property

Used to adjust the alpha of the Windows. Typically, faded Windows are disabled. Only the first 8 bytes are changed. The RGB components are not touched. This field is not exposed to the user - it's used internally.
protected uint mColor
return uint

mCursor protected_oe property

The cursor that this Window uses for UI interaction.
protected Cursor,FlatRedBall.Gui mCursor
return Cursor

mFloatingWindows protected_oe property

Windows that belong to this Window but are not positioned relative to it and do not have to be physically contained in this Window for the user to interact with them.
protected WindowArray mFloatingWindows
return WindowArray

mMoveBar protected_oe property

Whether the Window has a move bar which the user can click and drag over to reposition the Window. This is usually only true for regular Windows - objects inheriting from the Window class almost always have this set to false.
protected bool mMoveBar
return bool

mName protected_oe property

The Window's name.
protected string mName
return string

mScaleX protected_oe property

The X size of the Window.
protected float mScaleX
return float

mScaleXVelocity protected_oe property

The rate of change of mScaleX in units per second.
protected float mScaleXVelocity
return float

mScaleY protected_oe property

The Y size of the Window.
protected float mScaleY
return float

mScaleYVelocity protected_oe property

The rate of change of mScaleY in units per second
protected float mScaleYVelocity
return float

mTextureBottom protected_oe property

The bottom coordinate of the texture to use when drawing a non-null BaseTexture
protected float mTextureBottom
return float

mTextureLeft protected_oe property

The left coordinate of the texture to use when drawing a non-null BaseTexture
protected float mTextureLeft
return float

mTextureRight protected_oe property

The right coordinate of the texture to use when drawing a non-null BaseTexture
protected float mTextureRight
return float

mTextureTop protected_oe property

The top coordinate of the texture to use when drawing a non-null BaseTexture
protected float mTextureTop
return float

mVisible protected_oe property

protected bool mVisible
return bool

mWorldUnitRelativeX protected_oe property

The x position of the Window in world units relative to its Parent.
protected float mWorldUnitRelativeX
return float

mWorldUnitRelativeY protected_oe property

The y position of the Window in world units relative to its Parent. Although UI normally considers down to be positive Y, this value is just like Sprites - positive Y is up.
protected float mWorldUnitRelativeY
return float

mWorldUnitX protected_oe property

The x position of the Window in world units.
protected float mWorldUnitX
return float

mWorldUnitY protected_oe property

The y position of the Window in world units.
protected float mWorldUnitY
return float