Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
Hotbar.Page Class Reference
Inheritance diagram for Hotbar.Page:
EClass

Public Member Functions

void SetItem (Hotbar h, HotItem item, int index)
 
HotItem GetItem (int index)
 

Public Attributes

List< HotItemitems = new List<HotItem>()
 
int selected = -1
 

Properties

HotItem SelectedItem [get]
 
- Properties inherited from EClass
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static FactionBranch Branch [get]
 
static FactionBranch BranchOrHomeBranch [get]
 
static Faction Home [get]
 
static Faction Wilds [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static GameSetting setting [get]
 
static GameData gamedata [get]
 
static ColorProfile Colors [get]
 
static World world [get]
 
static SourceManager sources [get]
 
static SourceManager editorSources [get]
 
static SoundManager Sound [get]
 
static CoreDebug debug [get]
 

Additional Inherited Members

- Static Public Member Functions inherited from EClass
static int rnd (int a)
 
static int curve (int a, int start, int step, int rate=75)
 
static int rndHalf (int a)
 
static float rndf (float a)
 
static int rndSqrt (int a)
 
static void Wait (float a, Card c)
 
static void Wait (float a, Point p)
 
static int Bigger (int a, int b)
 
static int Smaller (int a, int b)
 
- Static Public Attributes inherited from EClass
static Core core
 

Detailed Description

Definition at line 13 of file Hotbar.cs.

Member Function Documentation

◆ GetItem()

HotItem Hotbar.Page.GetItem ( int  index)
inline

Definition at line 57 of file Hotbar.cs.

58 {
59 if (index >= items.Count)
60 {
61 return null;
62 }
63 return items[index];
64 }
List< HotItem > items
Definition: Hotbar.cs:16

References Hotbar.Page.items.

◆ SetItem()

void Hotbar.Page.SetItem ( Hotbar  h,
HotItem  item,
int  index 
)
inline

Definition at line 33 of file Hotbar.cs.

34 {
35 if (index == -1)
36 {
37 for (int i = 0; i < items.Count; i++)
38 {
39 if (items[i] == null)
40 {
41 index = i;
42 break;
43 }
44 }
45 if (index == -1)
46 {
47 return;
48 }
49 }
50 if (items[index] != null)
51 {
52 items[index].button = null;
53 }
54 items[index] = item;
55 }

References item, and Hotbar.Page.items.

Referenced by Hotbar.SetItem().

Member Data Documentation

◆ items

◆ selected

int Hotbar.Page.selected = -1

Definition at line 19 of file Hotbar.cs.

Property Documentation

◆ SelectedItem

HotItem Hotbar.Page.SelectedItem
get

Definition at line 21 of file Hotbar.cs.

22 {
23 get
24 {
25 if (selected != -1)
26 {
27 return items[selected];
28 }
29 return null;
30 }
31 }
int selected
Definition: Hotbar.cs:19

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