C# Class Descent.GUI.SubElements.EquipmentPanel

A panel of EquipmentElements that expands and hides by user clicks. The panel links to a range of slots in an inventory and updates itself whenever the equipment at the slots change.
Inheritance: GUIElement
Show file Open project: nezbo/Descent

Public Methods

Method Description
EquipmentPanel ( Microsoft.Xna.Framework.Game game, string title, int x, int y, Inventory inv, int slots ) : System

Creates an EquipmentPanel that can be expanded and hidden by being clicked on by the user.

Update ( GameTime gameTime ) : void

Protected Methods

Method Description
ActOnDirectClick ( int x, int y ) : void

Private Methods

Method Description
GetSlotType ( int index ) : string
UpdateInventory ( ) : void

Method Details

ActOnDirectClick() protected method

protected ActOnDirectClick ( int x, int y ) : void
x int
y int
return void

EquipmentPanel() public method

Creates an EquipmentPanel that can be expanded and hidden by being clicked on by the user.
public EquipmentPanel ( Microsoft.Xna.Framework.Game game, string title, int x, int y, Inventory inv, int slots ) : System
game Microsoft.Xna.Framework.Game The current Game object.
title string The title to display at the top.
x int The top-left x-coordinate of the EquipmentPanel when hidden.
y int The top-left y-coordinate of the EquipmentPanel when hidden.
inv Descent.Model.Player.Figure.HeroStuff.Inventory The inventory to show equipment from.
slots int The indexes (slots) of the inventory to visualize.
return System

Update() public method

public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void