PowerQuest 0.20.6
Loading...
Searching...
No Matches
IInventoryPanel Interface Reference

Detailed Description

Gui Inventory Panel - A grid of inventory items

    InventoryPanel.MainInv.ScrollForward();
    InventoryPanel.MainInv.TargetCharacter = C.Barney;

Inherits IGuiControl.

Properties

ICharacter TargetCharacter [get, set]
 Gets/Sets the character who's inventoy is being shown by this inventory panel.
 
Vector2 ScrollOffset [get, set]
 Returns a vector2 of how much the inventory is scrolled in the x and y directions.
 
- Properties inherited from IGuiControl
MonoBehaviour Instance [get]
 Access to the actual game object component in the scene. Note that controls themselves can be cast to their component type if known.
 
bool Visible [get, set]
 Sets the control visible invisible the control.
 
Vector2 Position [get, set]
 Gets/Sets the position of the control. Note that this will be overridden if using AlignTo or FitTo component.
 
bool Focused [get]
 Gets/Sets whether this control is focused (ie: the mouse is hovering over it, or it's selected with keyboard)
 
bool HasKeyboardFocus [get, set]
 Gets/Sets whether this control has the current keyboard focus (can also be used for specifying which control has 'controller' focus)
 
string Description [get, set]
 Note: Not all gui controls implement these. But most do, so adding them here for convenience.
 
string Cursor [get, set]
 Gets or sets the cursor to show when hovering over the control (if it's clickable). If empty, default active cursor will be used.
 
string Text [get, set]
 Gets/Sets the text of the control (if it has any)
 
string Anim [get, set]
 Gets/Sets the Sprite (or animation) for the control. (if applicable). Note, that by default gui Image controls may not have a "Power Sprite Animation" component, and this needs to be added for them to play animations.
 
Color Color [get, set]
 Gets/Sets the color for the control (if applicable)
 

Public Member Functions

bool ScrollForward ()
 Scrolls the inventory forward one slot.
 
bool ScrollBack ()
 Scrolls the inventory backward one slot.
 
void NextRow ()
 Scrolls the inventory down one row.
 
void NextColumn ()
 Scrolls the inventory right one column.
 
void PrevRow ()
 Scrolls the inventory up one row.
 
void PrevColumn ()
 Scrolls the inventory left one column.
 
bool HasNextColumn ()
 Returns true if there is another column to the right.
 
bool HasPrevColumn ()
 Returns true if there is another column to the left.
 
bool HasNextRow ()
 Returns true if there is another row below.
 
bool HasPrevRow ()
 Returns true if there is another row above.
 
- Public Member Functions inherited from IGuiControl
void Show ()
 Shows the control.
 
void Hide ()
 Hides the control.
 
void SetPosition (float x, float y)
 Sets the position of the control. Note that this will be overridden if using AlignTo or FitTo component.
 
GuiControl DuplicateControl (string name=null, IGuiControl parent=null)
 Duplicates the control. Useful for adding elements dynamically to a gui. You can optionally specify a new name for the control, and a parent object (such as a grid container)
 

Property Documentation

◆ TargetCharacter

ICharacter TargetCharacter
getset

Gets/Sets the character who's inventoy is being shown by this inventory panel.

◆ ScrollOffset

Vector2 ScrollOffset
getset

Returns a vector2 of how much the inventory is scrolled in the x and y directions.

Member Function Documentation

◆ ScrollForward()

bool ScrollForward ( )

Scrolls the inventory forward one slot.

◆ ScrollBack()

bool ScrollBack ( )

Scrolls the inventory backward one slot.

◆ NextRow()

void NextRow ( )

Scrolls the inventory down one row.

◆ NextColumn()

void NextColumn ( )

Scrolls the inventory right one column.

◆ PrevRow()

void PrevRow ( )

Scrolls the inventory up one row.

◆ PrevColumn()

void PrevColumn ( )

Scrolls the inventory left one column.

◆ HasNextColumn()

bool HasNextColumn ( )

Returns true if there is another column to the right.

◆ HasPrevColumn()

bool HasPrevColumn ( )

Returns true if there is another column to the left.

◆ HasNextRow()

bool HasNextRow ( )

Returns true if there is another row below.

◆ HasPrevRow()

bool HasPrevRow ( )

Returns true if there is another row above.