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

Public Member Functions

void SetRenderer (IRenderer _renderer, RenderParam p)
 
void UpdateImage ()
 
void Build ()
 
void SetElement (Element e)
 
void SetThing (Thing t)
 
void UpdateRecipe (Recipe r)
 
void SetRecipe (Recipe r)
 
void SetBlock (Cell cell)
 
void SetFloor (Cell cell)
 
void SetLiquid (Cell cell)
 
void SetObj (Cell cell)
 

Public Attributes

UINote note
 
IRenderer renderer
 
RenderParam param
 

Private Member Functions

void Update ()
 

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 1 of file UICardInfo.cs.

Member Function Documentation

◆ Build()

void UICardInfo.Build ( )
inline

Definition at line 23 of file UICardInfo.cs.

24 {
25 note.Build();
27 }
void UpdateImage()
Definition: UICardInfo.cs:15
UINote note
Definition: UICardInfo.cs:3
void Build()
Definition: UINote.cs:49

References UINote.Build(), note, and UpdateImage().

Referenced by SetBlock(), SetFloor(), SetLiquid(), SetObj(), SetRecipe(), and SetThing().

◆ SetBlock()

void UICardInfo.SetBlock ( Cell  cell)
inline

Definition at line 64 of file UICardInfo.cs.

65 {
66 string blockName = cell.GetBlockName();
67 RenderParam renderParam = cell.sourceBlock.GetRenderParam(cell.matBlock, 0);
68 SetRenderer(cell.sourceBlock.renderData, renderParam);
69 note.AddHeaderCard(blockName).image2.SetActive(enable: false);
70 note.AddText("isMadeOf".lang(cell.matBlock.GetText()));
71 Build();
72 }
SourceBlock.Row sourceBlock
Definition: Cell.cs:1052
SourceMaterial.Row matBlock
Definition: Cell.cs:1030
string GetBlockName()
Definition: Cell.cs:1585
void SetRenderer(IRenderer _renderer, RenderParam p)
Definition: UICardInfo.cs:9
void Build()
Definition: UICardInfo.cs:23
Image image2
Definition: UIItem.cs:16
UIItem AddHeaderCard(string text, Sprite sprite=null)
Definition: UINote.cs:84
UIItem AddText(string text, FontColor color=FontColor.DontChange)
Definition: UINote.cs:113

References UINote.AddHeaderCard(), UINote.AddText(), Build(), Cell.GetBlockName(), UIItem.image2, Cell.matBlock, note, SetRenderer(), and Cell.sourceBlock.

Referenced by LayerInfo.SetBlock().

◆ SetElement()

void UICardInfo.SetElement ( Element  e)
inline

Definition at line 34 of file UICardInfo.cs.

35 {
36 e.WriteNote(note);
37 }
void WriteNote(UINote n, ElementContainer owner=null, Action< UINote > onWriteNote=null)
Definition: ELEMENT.cs:574

References note, and Element.WriteNote().

Referenced by LayerInfo.SetElement().

◆ SetFloor()

void UICardInfo.SetFloor ( Cell  cell)
inline

Definition at line 74 of file UICardInfo.cs.

75 {
76 string floorName = cell.GetFloorName();
77 RenderParam renderParam = cell.sourceFloor.GetRenderParam(cell.matFloor, 0);
78 SetRenderer(cell.sourceFloor.renderData, renderParam);
79 note.AddHeaderCard(floorName).image2.SetActive(enable: false);
80 note.AddText("isMadeOf".lang(cell.matFloor.GetText()));
81 Build();
82 }
SourceFloor.Row sourceFloor
Definition: Cell.cs:1054
string GetFloorName()
Definition: Cell.cs:1590
SourceMaterial.Row matFloor
Definition: Cell.cs:1032

References UINote.AddHeaderCard(), UINote.AddText(), Build(), Cell.GetFloorName(), UIItem.image2, Cell.matFloor, note, SetRenderer(), and Cell.sourceFloor.

Referenced by LayerInfo.SetFloor().

◆ SetLiquid()

void UICardInfo.SetLiquid ( Cell  cell)
inline

Definition at line 84 of file UICardInfo.cs.

85 {
86 string liquidName = cell.GetLiquidName();
87 RenderParam renderParam = cell.sourceEffect.GetRenderParam(cell.matFloor, 0);
88 SetRenderer(cell.sourceEffect.renderData, renderParam);
89 note.AddHeaderCard(liquidName).image2.SetActive(enable: false);
90 note.AddText("isMadeOf".lang(cell.sourceEffect.GetText()));
91 Build();
92 }
SourceCellEffect.Row sourceEffect
Definition: Cell.cs:1070
string GetLiquidName()
Definition: Cell.cs:1644

References UINote.AddHeaderCard(), UINote.AddText(), Build(), Cell.GetLiquidName(), UIItem.image2, Cell.matFloor, note, SetRenderer(), and Cell.sourceEffect.

Referenced by LayerInfo.SetLiquid().

◆ SetObj()

void UICardInfo.SetObj ( Cell  cell)
inline

Definition at line 94 of file UICardInfo.cs.

95 {
96 SourceObj.Row sourceObj = cell.sourceObj;
97 RenderParam renderParam = cell.sourceObj.GetRenderParam(cell.matBlock, 0);
98 SetRenderer(sourceObj.renderData, renderParam);
99 note.AddHeaderCard(base.name).image2.SetActive(enable: false);
100 note.AddText("isMadeOf".lang(sourceObj.DefaultMaterial.GetText()));
101 Build();
102 }
SourceObj.Row sourceObj
Definition: Cell.cs:1072
RenderData renderData
Definition: RenderRow.cs:71
SourceMaterial.Row DefaultMaterial
Definition: RenderRow.cs:86

References UINote.AddHeaderCard(), UINote.AddText(), Build(), RenderRow.DefaultMaterial, UIItem.image2, Cell.matBlock, note, RenderRow.renderData, SetRenderer(), and Cell.sourceObj.

Referenced by LayerInfo.SetObj().

◆ SetRecipe()

void UICardInfo.SetRecipe ( Recipe  r)
inline

Definition at line 50 of file UICardInfo.cs.

51 {
52 UpdateRecipe(r);
53 note.Clear();
56 note.Space();
57 note.AddHeaderTopic("buildType".lang() + ": " + r.tileType.LangPlaceType.lang());
58 note.AddText((r.tileType.LangPlaceType + "_hint").lang());
59 note.Space();
60 note.AddHeaderTopic("reqMat".lang());
61 Build();
62 }
string GetDetail()
virtual TileType tileType
Definition: Recipe.cs:198
RecipeSource source
Definition: Recipe.cs:187
string Name
Definition: Recipe.cs:195
virtual string LangPlaceType
Definition: TileType.cs:119
void UpdateRecipe(Recipe r)
Definition: UICardInfo.cs:45
UIItem AddHeaderTopic(string text, Sprite sprite=null)
Definition: UINote.cs:89
void Clear()
Definition: UINote.cs:35
void Space(int sizeY=0, int sizeX=1)
Definition: UINote.cs:62

References UINote.AddHeaderCard(), UINote.AddHeaderTopic(), UINote.AddText(), Build(), UINote.Clear(), RecipeSource.GetDetail(), TileType.LangPlaceType, Recipe.Name, note, Recipe.source, UINote.Space(), Recipe.tileType, and UpdateRecipe().

◆ SetRenderer()

void UICardInfo.SetRenderer ( IRenderer  _renderer,
RenderParam  p 
)
inline

Definition at line 9 of file UICardInfo.cs.

10 {
11 renderer = _renderer;
12 param = p;
13 }
IRenderer renderer
Definition: UICardInfo.cs:5
RenderParam param
Definition: UICardInfo.cs:7

References param, and renderer.

Referenced by SetBlock(), SetFloor(), SetLiquid(), SetObj(), and UpdateRecipe().

◆ SetThing()

void UICardInfo.SetThing ( Thing  t)
inline

Definition at line 39 of file UICardInfo.cs.

40 {
41 t.WriteNote(note, null, IInspect.NoteMode.Info);
42 Build();
43 }
override void WriteNote(UINote n, Action< UINote > onWriteNote=null, IInspect.NoteMode mode=IInspect.NoteMode.Default, Recipe recipe=null)
Definition: Thing.cs:837
NoteMode
Definition: IInspect.cs:7

References Build(), note, and Thing.WriteNote().

Referenced by LayerInfo.SetThing().

◆ Update()

void UICardInfo.Update ( )
inlineprivate

Definition at line 29 of file UICardInfo.cs.

30 {
32 }

References UpdateImage().

◆ UpdateImage()

void UICardInfo.UpdateImage ( )
inline

Definition at line 15 of file UICardInfo.cs.

16 {
17 if (EMono.core.IsGameStarted && renderer != null)
18 {
20 }
21 }
bool IsGameStarted
Definition: Core.cs:84
Definition: EMono.cs:4
static Core core
Definition: EMono.cs:5
void RenderToRenderCam(RenderParam p)

References EMono.core, Core.IsGameStarted, param, renderer, and IRenderer.RenderToRenderCam().

Referenced by Build(), and Update().

◆ UpdateRecipe()

void UICardInfo.UpdateRecipe ( Recipe  r)
inline

Definition at line 45 of file UICardInfo.cs.

46 {
48 }
virtual IRenderer GetRenderer()
Definition: Recipe.cs:812
virtual RenderRow renderRow
Definition: Recipe.cs:193
virtual SourceMaterial.Row GetColorMaterial()
Definition: Recipe.cs:481
virtual RenderParam GetRenderParam(SourceMaterial.Row mat, int dir, Point point=null, int bridgeHeight=-1)
Definition: RenderRow.cs:381

References Recipe.GetColorMaterial(), Recipe.GetRenderer(), RenderRow.GetRenderParam(), Recipe.renderRow, and SetRenderer().

Referenced by SetRecipe().

Member Data Documentation

◆ note

UINote UICardInfo.note

Definition at line 3 of file UICardInfo.cs.

Referenced by Build(), SetBlock(), SetElement(), SetFloor(), SetLiquid(), SetObj(), SetRecipe(), and SetThing().

◆ param

RenderParam UICardInfo.param

Definition at line 7 of file UICardInfo.cs.

Referenced by SetRenderer(), and UpdateImage().

◆ renderer

IRenderer UICardInfo.renderer

Definition at line 5 of file UICardInfo.cs.

Referenced by SetRenderer(), and UpdateImage().


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