Drag[en]gine Script Module DragonScript Script API  1.0
QuickUseManager Class Reference

Set of quick use slots holding elements to quickly use if activated. More...

Inheritance diagram for QuickUseManager:

Public Member Functions

Element getItem (int index)
 Item from indexed slot. More...
 
int getSlotCount ()
 Number of slots. More...
 
int indexOfNextFreeSlot ()
 Index of next free slot or -1 if all are full. More...
 
int indexOfSlotWith (Element item)
 Index of slot item is located in or -1 if absent. More...
 
QuickUseManager new (int slotCount)
 Create quick use manager. More...
 
void removeItemIfPresent (Element item)
 Remove item if present in any slots. More...
 
void setItem (int index, Element item)
 Set item in slot. More...
 
void setSlotCount (int count)
 Set number of slots. More...
 

Detailed Description

Set of quick use slots holding elements to quickly use if activated.

Member Function Documentation

§ getItem()

Element getItem ( int  index)

Item from indexed slot.

§ getSlotCount()

int getSlotCount ( )

Number of slots.

§ indexOfNextFreeSlot()

int indexOfNextFreeSlot ( )

Index of next free slot or -1 if all are full.

§ indexOfSlotWith()

int indexOfSlotWith ( Element  item)

Index of slot item is located in or -1 if absent.

§ new()

QuickUseManager new ( int  slotCount)

Create quick use manager.

§ removeItemIfPresent()

void removeItemIfPresent ( Element  item)

Remove item if present in any slots.

§ setItem()

void setItem ( int  index,
Element  item 
)

Set item in slot.

Can be null to clear the slot. If item is not null and it is already in another slot it is moved.

§ setSlotCount()

void setSlotCount ( int  count)

Set number of slots.


The documentation for this class was generated from the following file: