C# Class Divine_Right.InterfaceComponents.Components.ContextMenuComponent

The component for a context menu which is caused when the user right clicks
Inheritance: IGameInterfaceComponent
Afficher le fichier Open project: Haedrian/Divine-Right Class Usage Examples

Protected Properties

Свойство Type Description
contextMenuItems List
coordinate MapCoordinate
drawRectangle Microsoft.Xna.Framework.Rectangle

Méthodes publiques

Méthode Description
AddContextMenuItem ( ActionType action, object args, Microsoft.Xna.Framework.Content.ContentManager content ) : void

Adds a new Context Menu Item to the list from an actiontype and arguments

ContextMenuComponent ( int x, int y, MapCoordinate coordinate ) : System

Creates a new Context Menu starting at x,y

Draw ( Microsoft.Xna.Framework.Content.ContentManager content, SpriteBatch batch ) : void
HandleClick ( int x, int y, MouseActionEnum mouseAction, ActionType &actionType, InternalActionEnum &internalActionType, object &args, MapItem &itm, MapCoordinate &coord, bool &destroy ) : bool
HandleKeyboard ( Microsoft keyboard, ActionType &actionType, object &args, MapCoordinate &coord, bool &destroy ) : bool
HandleMouseOver ( int x, int y ) : void
IsModal ( ) : bool
PerformDrag ( int x, int y ) : void
ReturnLocation ( ) : Rectangle

Method Details

AddContextMenuItem() public méthode

Adds a new Context Menu Item to the list from an actiontype and arguments
public AddContextMenuItem ( ActionType action, object args, Microsoft.Xna.Framework.Content.ContentManager content ) : void
action ActionType
args object
content Microsoft.Xna.Framework.Content.ContentManager
Résultat void

ContextMenuComponent() public méthode

Creates a new Context Menu starting at x,y
public ContextMenuComponent ( int x, int y, MapCoordinate coordinate ) : System
x int
y int
coordinate MapCoordinate
Résultat System

Draw() public méthode

public Draw ( Microsoft.Xna.Framework.Content.ContentManager content, SpriteBatch batch ) : void
content Microsoft.Xna.Framework.Content.ContentManager
batch Microsoft.Xna.Framework.Graphics.SpriteBatch
Résultat void

HandleClick() public méthode

public HandleClick ( int x, int y, MouseActionEnum mouseAction, ActionType &actionType, InternalActionEnum &internalActionType, object &args, MapItem &itm, MapCoordinate &coord, bool &destroy ) : bool
x int
y int
mouseAction MouseActionEnum
actionType ActionType
internalActionType InternalActionEnum
args object
itm DRObjects.MapItem
coord MapCoordinate
destroy bool
Résultat bool

HandleKeyboard() public méthode

public HandleKeyboard ( Microsoft keyboard, ActionType &actionType, object &args, MapCoordinate &coord, bool &destroy ) : bool
keyboard Microsoft
actionType ActionType
args object
coord MapCoordinate
destroy bool
Résultat bool

HandleMouseOver() public méthode

public HandleMouseOver ( int x, int y ) : void
x int
y int
Résultat void

IsModal() public méthode

public IsModal ( ) : bool
Résultat bool

PerformDrag() public méthode

public PerformDrag ( int x, int y ) : void
x int
y int
Résultat void

ReturnLocation() public méthode

public ReturnLocation ( ) : Rectangle
Résultat Microsoft.Xna.Framework.Rectangle

Property Details

contextMenuItems protected_oe property

protected List contextMenuItems
Résultat List

coordinate protected_oe property

protected MapCoordinate coordinate
Résultat MapCoordinate

drawRectangle protected_oe property

protected Rectangle,Microsoft.Xna.Framework drawRectangle
Résultat Microsoft.Xna.Framework.Rectangle