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

Public Member Functions

void Refresh ()
 

Public Attributes

UIRawImage bgGrid
 
ButtonGrid buttonHeight
 
ButtonGrid buttonFreePlace
 
ButtonGrid buttonAutoWall
 

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 3 of file UIPlaceHelper.cs.

Member Function Documentation

◆ Refresh()

void UIPlaceHelper.Refresh ( )
inline

Definition at line 13 of file UIPlaceHelper.cs.

14 {
15 Recipe recipe = HotItemHeld.recipe;
16 bool flag = recipe != null;
18 {
19 flag = false;
20 }
21 base.gameObject.SetActive(flag);
22 if (flag)
23 {
24 ActionMode.Build.recipe = recipe;
25 buttonAutoWall.SetActive(enable: false);
26 buttonAutoWall.mainText.text = (EMono.game.config.autoWall ? "On" : "Off");
27 buttonAutoWall.icon.SetAlpha(EMono.game.config.autoWall ? 1f : 0.4f);
28 buttonAutoWall.SetOnClick(delegate
29 {
30 SE.Tab();
31 EMono.game.config.autoWall = !EMono.game.config.autoWall;
32 Refresh();
33 });
34 buttonFreePlace.SetActive(enable: false);
35 buttonFreePlace.mainText.text = (EMono.game.config.freePos ? "On" : "Off");
36 buttonFreePlace.icon.SetAlpha(EMono.game.config.freePos ? 1f : 0.4f);
37 buttonFreePlace.SetOnClick(delegate
38 {
39 SE.Tab();
40 EMono.game.config.freePos = !EMono.game.config.freePos;
41 Refresh();
42 });
43 buttonHeight.SetActive(recipe.MaxAltitude != 0);
44 buttonHeight.mainText.text = ((ActionMode.Build.altitude >= 0) ? "+" : "") + ActionMode.Build.altitude;
45 buttonHeight.SetOnClick(delegate
46 {
47 SE.Tab();
49 Refresh();
50 });
51 buttonHeight.onRightClick = delegate
52 {
53 SE.Tab();
55 Refresh();
56 };
57 buttonHeight.onInputWheel = delegate(int a)
58 {
59 SE.Tab();
61 Refresh();
62 };
63 bgGrid.uvRect = new Rect(1f, 1f, this.GetComponentsInDirectChildren<ButtonGrid>(includeInactive: false).Count, 1f);
64 this.RebuildLayout();
65 }
66 }
int altitude
Definition: AM_Build.cs:8
void ModAltitude(int a)
Definition: AM_Build.cs:366
static AM_Build Build
Definition: ActionMode.cs:49
Trait trait
Definition: Card.cs:49
Definition: EMono.cs:4
static Player player
Definition: EMono.cs:11
static Game game
Definition: EMono.cs:7
bool autoWall
Definition: Game.cs:42
bool freePos
Definition: Game.cs:30
Config config
Definition: Game.cs:215
static Recipe recipe
Definition: HotItemHeld.cs:9
static bool disableTool
Definition: HotItemHeld.cs:11
virtual Thing Thing
Definition: HotItem.cs:38
HotItem currentHotItem
Definition: Player.cs:901
Definition: Recipe.cs:7
int MaxAltitude
Definition: Recipe.cs:212
virtual bool IsTool
Definition: Trait.cs:355
Image icon
Definition: UIButton.cs:110
ButtonGrid buttonHeight
Definition: UIPlaceHelper.cs:7
ButtonGrid buttonAutoWall
ButtonGrid buttonFreePlace
Definition: UIPlaceHelper.cs:9

References AM_Build.altitude, Game.Config.autoWall, ActionMode.Build, buttonAutoWall, buttonFreePlace, buttonHeight, Game.config, Player.currentHotItem, HotItemHeld.disableTool, Game.Config.freePos, EMono.game, UIButton.icon, Trait.IsTool, Recipe.MaxAltitude, AM_Build.ModAltitude(), EMono.player, HotItemHeld.recipe, Refresh(), HotItem.Thing, and Card.trait.

Referenced by AM_Adv._OnUpdateInput(), ActPlan._Update(), WidgetCurrentTool.OnActivate(), Refresh(), and WidgetCurrentTool.SwitchPage().

Member Data Documentation

◆ bgGrid

UIRawImage UIPlaceHelper.bgGrid

Definition at line 5 of file UIPlaceHelper.cs.

◆ buttonAutoWall

ButtonGrid UIPlaceHelper.buttonAutoWall

Definition at line 11 of file UIPlaceHelper.cs.

Referenced by Refresh().

◆ buttonFreePlace

ButtonGrid UIPlaceHelper.buttonFreePlace

Definition at line 9 of file UIPlaceHelper.cs.

Referenced by Refresh().

◆ buttonHeight

ButtonGrid UIPlaceHelper.buttonHeight

Definition at line 7 of file UIPlaceHelper.cs.

Referenced by Refresh().


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