Elin Decompiled Documentation EA 23.300 Nightly
Loading...
Searching...
No Matches
UIItemPCCPart Class Reference
Inheritance diagram for UIItemPCCPart:
EMono

Public Member Functions

void SetSpriteIndex (int dir, int frame)
 
void SetSprites (Texture2D texture)
 

Public Attributes

ButtonGeneral button
 
Outline outline
 
Sprite[] sprites = new Sprite[16]
 

Private Attributes

bool _init
 

Additional Inherited Members

- Static Public Member Functions inherited from EMono
static int rnd (int a)
 
- Static Public Attributes inherited from EMono
static Core core
 
- Properties inherited from EMono
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 Scene scene [get]
 
static BaseGameScreen screen [get]
 
static GameSetting setting [get]
 
static GameData gamedata [get]
 
static ColorProfile Colors [get]
 
static World world [get]
 
static SoundManager Sound [get]
 
static SourceManager sources [get]
 
static SourceManager editorSources [get]
 
static CoreDebug debug [get]
 

Detailed Description

Definition at line 5 of file UIItemPCCPart.cs.

Member Function Documentation

◆ SetSpriteIndex()

void UIItemPCCPart.SetSpriteIndex ( int  dir,
int  frame 
)
inline

Definition at line 16 of file UIItemPCCPart.cs.

17 {
18 if (_init)
19 {
20 button.icon.sprite = sprites[dir * 4 + frame];
21 }
22 }
Sprite[] sprites

References _init, and sprites.

◆ SetSprites()

void UIItemPCCPart.SetSprites ( Texture2D  texture)
inline

Definition at line 24 of file UIItemPCCPart.cs.

25 {
26 int num = texture.width / 4;
27 int num2 = texture.height / 4;
28 for (int i = 0; i < 4; i++)
29 {
30 for (int j = 0; j < 4; j++)
31 {
32 int num3 = j * num;
33 int num4 = (3 - i) * num2;
34 Rect rect = new Rect(num3, num4, num, num2);
35 sprites[i * 4 + j] = Sprite.Create(texture, rect, new Vector2(0.5f, 0.5f), 100f, 0u, SpriteMeshType.FullRect);
36 }
37 }
38 _init = true;
39 }

References _init, and sprites.

Member Data Documentation

◆ _init

bool UIItemPCCPart._init
private

Definition at line 14 of file UIItemPCCPart.cs.

Referenced by SetSpriteIndex(), and SetSprites().

◆ button

ButtonGeneral UIItemPCCPart.button

Definition at line 7 of file UIItemPCCPart.cs.

◆ outline

Outline UIItemPCCPart.outline

Definition at line 9 of file UIItemPCCPart.cs.

◆ sprites

Sprite [] UIItemPCCPart.sprites = new Sprite[16]

Definition at line 12 of file UIItemPCCPart.cs.

Referenced by SetSpriteIndex(), and SetSprites().


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