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

Public Member Functions

void RefreshLabel ()
 
string GetLabel (Thing t, bool showColor)
 
- Public Member Functions inherited from UIDropdown
override void OnCancel (BaseEventData eventData)
 
void SetList< TValue > (string name, IList< TValue > list, Func< TValue, int, string > getName, Action< int, TValue > onChange, bool notify=true)
 
void SetList< TValue > (int _index, IList< TValue > list, Func< TValue, int, string > getName, Action< int, TValue > onChange, bool notify=true)
 
void Next ()
 
void Prev ()
 

Public Attributes

Recipe recipe
 
UIText textLabel
 
UIText orgLabel
 
Recipe.Ingredient ingredient
 
- Public Attributes inherited from UIDropdown
UIButton bl
 

Static Public Attributes

static Color colorCost
 
static Color colorPredict
 
- Static Public Attributes inherited from UIDropdown
static UIDropdown activeInstance
 

Additional Inherited Members

- Protected Member Functions inherited from UIDropdown
override void OnEnable ()
 
override GameObject CreateBlocker (Canvas rootCanvas)
 
override void DestroyBlocker (GameObject blocker)
 

Detailed Description

Definition at line 3 of file DropdownRecipe.cs.

Member Function Documentation

◆ GetLabel()

string DropdownRecipe.GetLabel ( Thing  t,
bool  showColor 
)
inline

Definition at line 22 of file DropdownRecipe.cs.

23 {
24 if (t == null)
25 {
26 return " <color=" + colorCost.ToHex() + ">" + "noMaterial".lang() + "</color>";
27 }
29 int num = t.Num;
30 return string.Concat((showColor ? ("<color=" + t.material.matColor.ToHex() + ">■</color> ") : "") + t.NameSimple + " (" + num + ")", (summary.countValid == 0) ? "" : (" <color=" + colorCost.ToHex() + "> -" + ingredient.req * summary.countValid + "</color>"));
31 }
BaseTileSelector tileSelector
SourceMaterial.Row material
Definition: Card.cs:1927
string NameSimple
Definition: Card.cs:2015
int Num
Definition: Card.cs:154
Definition: Core.cs:14
static new Core Instance
Definition: Core.cs:15
BaseGameScreen screen
Definition: Core.cs:67
Recipe.Ingredient ingredient
static Color colorCost
int countValid
Definition: HitSummary.cs:10

References colorCost, HitSummary.countValid, ingredient, Core.Instance, Card.material, Card.NameSimple, Card.Num, Core.screen, BaseTileSelector.summary, and BaseGameScreen.tileSelector.

Referenced by RefreshLabel().

◆ RefreshLabel()

void DropdownRecipe.RefreshLabel ( )
inline

Definition at line 17 of file DropdownRecipe.cs.

18 {
20 }
string GetLabel(Thing t, bool showColor)
RecipeSource source
Definition: Recipe.cs:187
List< Ingredient > ingredients
Definition: Recipe.cs:164
void SetText(string s)
Definition: UIText.cs:159

References RecipeSource.colorIng, GetLabel(), ingredient, Recipe.ingredients, recipe, UIText.SetText(), Recipe.source, and textLabel.

Referenced by UIRecipeInfo.RefreshBalance().

Member Data Documentation

◆ colorCost

Color DropdownRecipe.colorCost
static

Definition at line 5 of file DropdownRecipe.cs.

Referenced by GetLabel().

◆ colorPredict

Color DropdownRecipe.colorPredict
static

Definition at line 7 of file DropdownRecipe.cs.

◆ ingredient

Recipe.Ingredient DropdownRecipe.ingredient

Definition at line 15 of file DropdownRecipe.cs.

Referenced by GetLabel(), and RefreshLabel().

◆ orgLabel

UIText DropdownRecipe.orgLabel

Definition at line 13 of file DropdownRecipe.cs.

Referenced by UIRecipeInfo.RefreshList().

◆ recipe

Recipe DropdownRecipe.recipe

Definition at line 9 of file DropdownRecipe.cs.

Referenced by RefreshLabel().

◆ textLabel

UIText DropdownRecipe.textLabel

Definition at line 11 of file DropdownRecipe.cs.

Referenced by RefreshLabel().


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