Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
HotItemToggle Class Reference
Inheritance diagram for HotItemToggle:
HotItem UIButton.Item

Public Types

enum  Type {
  ToggleRoof , showBalloon , muteBGM , instaComplete ,
  ToggleSlope , ToggleWall , ToggleFreepos , SnapFreepos ,
  ToggleBuildLight , ToggleRoofEdit , ToggleNoRoof
}
 

Public Member Functions

override bool ShouldHighlight ()
 
override void OnClick (ButtonHotItem b, Hotbar h)
 
- Public Member Functions inherited from HotItem
string TextHotkey ()
 
virtual void OnClick (ButtonHotItem b, Hotbar h)
 
virtual void OnRightClick (ButtonHotItem b)
 
virtual bool CanAutoFire (Chara tg)
 
virtual void OnSetCurrentItem ()
 
virtual void OnUnsetCurrentItem ()
 
virtual void OnUnselect ()
 
virtual void SetImage (Image icon)
 
virtual bool TrySetAct (ActPlan p)
 
virtual void OnMarkMapHighlights ()
 
virtual void OnRenderTile (Point point, HitResult result, int dir)
 
- Public Member Functions inherited from UIButton.Item
virtual Sprite GetSprite ()
 
virtual Sprite GetSprite (bool highlight)
 
virtual bool ShouldHighlight ()
 
virtual void OnAddedToBar ()
 
virtual void OnShowContextMenu (UIContextMenu m)
 
virtual void OnHover (UIButton b)
 
virtual void OnClick (UIButton b)
 
virtual void OnSetItem (UIButton b)
 
virtual void SetSubText (UIText t)
 

Public Attributes

Type type
 
- Public Attributes inherited from HotItem
ButtonHotItem button
 
Hotbar hotbar
 
bool disabled
 
- Public Attributes inherited from UIButton.Item
bool always
 

Properties

override string Name [get]
 
override Sprite SpriteHighlight [get]
 
override string pathSprite [get]
 
override bool Hidden [get]
 
- Properties inherited from HotItem
override Sprite SpriteHighlight [get]
 
override bool IsSelectable [get]
 
override string TextTip [get]
 
virtual Thing RenderThing [get]
 
virtual Thing Thing [get]
 
virtual Thing Tool [get]
 
virtual bool IsTool [get]
 
virtual bool LookAtMouse [get]
 
virtual bool IsGameAction [get]
 
virtual bool UseUIObjMaterial [get]
 
- Properties inherited from UIButton.Item
virtual string TextTip [get]
 
virtual string Name [get]
 
virtual Sprite SpriteHighlight [get]
 
virtual string pathSprite [get]
 
virtual bool IsSelectable [get]
 
virtual bool AdjustImageSize [get]
 
virtual bool UseIconForHighlight [get]
 
virtual bool KeepVisibleWhenHighlighted [get]
 
virtual Color SpriteColor [get]
 
virtual Vector3 SpriteScale [get]
 
virtual bool Hidden [get]
 
virtual Transition Transition [get]
 

Detailed Description

Definition at line 4 of file HotItemToggle.cs.

Member Enumeration Documentation

◆ Type

Enumerator
ToggleRoof 
showBalloon 
muteBGM 
instaComplete 
ToggleSlope 
ToggleWall 
ToggleFreepos 
SnapFreepos 
ToggleBuildLight 
ToggleRoofEdit 
ToggleNoRoof 

Definition at line 6 of file HotItemToggle.cs.

Member Function Documentation

◆ OnClick()

override void HotItemToggle.OnClick ( ButtonHotItem  b,
Hotbar  h 
)
inlinevirtual

Reimplemented from HotItem.

Definition at line 60 of file HotItemToggle.cs.

61 {
62 switch (type)
63 {
64 case Type.ToggleBuildLight:
66 break;
67 case Type.SnapFreepos:
69 break;
70 case Type.ToggleFreepos:
72 break;
73 case Type.ToggleWall:
75 break;
76 case Type.ToggleRoof:
78 break;
79 case Type.ToggleNoRoof:
81 break;
82 case Type.showBalloon:
84 break;
85 case Type.muteBGM:
87 break;
88 case Type.instaComplete:
89 EClass.player.instaComplete = !EClass.player.instaComplete;
90 SE.ClickGeneral();
91 if ((bool)b)
92 {
93 b.widget.RefreshHighlight();
94 }
95 break;
96 case Type.ToggleSlope:
98 break;
99 }
100 if ((bool)b)
101 {
102 b.widget.RefreshHighlight();
103 }
104 }
Definition: EClass.cs:5
static Scene scene
Definition: EClass.cs:30
static Player player
Definition: EClass.cs:12
bool instaComplete
Definition: Player.cs:956
void ToggleBalloon()
Definition: Scene.cs:955
void ToggleShowRoof()
Definition: Scene.cs:869
void ToggleShowWall()
Definition: Scene.cs:903
void ToggleMuteBGM()
Definition: Scene.cs:963
void ToggleLight()
Definition: Scene.cs:875
void ToggleSlope()
Definition: Scene.cs:915
void ToggleRoof()
Definition: Scene.cs:909
void ToggleFreePos()
Definition: Scene.cs:892
void ToggleSnapFreePos()
Definition: Scene.cs:881

References Player.instaComplete, EClass.player, WidgetHotbar.RefreshHighlight(), EClass.scene, Scene.ToggleBalloon(), Scene.ToggleFreePos(), Scene.ToggleLight(), Scene.ToggleMuteBGM(), Scene.ToggleRoof(), Scene.ToggleShowRoof(), Scene.ToggleShowWall(), Scene.ToggleSlope(), Scene.ToggleSnapFreePos(), type, and ButtonHotItem.widget.

◆ ShouldHighlight()

override bool HotItemToggle.ShouldHighlight ( )
inlinevirtual

Reimplemented from UIButton.Item.

Definition at line 42 of file HotItemToggle.cs.

43 {
44 return type switch
45 {
46 Type.ToggleBuildLight => EClass.game.config.buildLight,
47 Type.SnapFreepos => EClass.game.config.snapFreePos,
48 Type.ToggleFreepos => EClass.game.config.freePos,
49 Type.ToggleWall => EClass.game.config.showWall,
50 Type.ToggleRoof => EClass.game.config.showRoof,
51 Type.ToggleNoRoof => EClass.game.config.noRoof,
52 Type.showBalloon => !EClass.scene.hideBalloon,
53 Type.muteBGM => EClass.Sound.muteBGM,
54 Type.instaComplete => EClass.player.instaComplete,
55 Type.ToggleSlope => EClass.game.config.slope,
56 _ => false,
57 };
58 }
static Game game
Definition: EClass.cs:8
static SoundManager Sound
Definition: EClass.cs:46
bool buildLight
Definition: Game.cs:36
bool showRoof
Definition: Game.cs:12
bool showWall
Definition: Game.cs:15
bool noRoof
Definition: Game.cs:27
bool snapFreePos
Definition: Game.cs:33
bool slope
Definition: Game.cs:24
bool freePos
Definition: Game.cs:30
Config config
Definition: Game.cs:215
bool hideBalloon
Definition: Scene.cs:141

References Game.Config.buildLight, Game.config, Game.Config.freePos, EClass.game, Scene.hideBalloon, Player.instaComplete, Game.Config.noRoof, EClass.player, EClass.scene, Game.Config.showRoof, Game.Config.showWall, Game.Config.slope, Game.Config.snapFreePos, EClass.Sound, and type.

Member Data Documentation

◆ type

Type HotItemToggle.type

Definition at line 22 of file HotItemToggle.cs.

Referenced by OnClick(), and ShouldHighlight().

Property Documentation

◆ Hidden

override bool HotItemToggle.Hidden
get

Definition at line 30 of file HotItemToggle.cs.

31 {
32 get
33 {
34 if (type == Type.instaComplete)
35 {
36 return !EClass.debug.enable;
37 }
38 return false;
39 }
40 }
bool enable
Definition: CoreDebug.cs:285
static CoreDebug debug
Definition: EClass.cs:48

◆ Name

override string HotItemToggle.Name
get

Definition at line 24 of file HotItemToggle.cs.

◆ pathSprite

override string HotItemToggle.pathSprite
get

Definition at line 28 of file HotItemToggle.cs.

◆ SpriteHighlight

override Sprite HotItemToggle.SpriteHighlight
get

Definition at line 26 of file HotItemToggle.cs.


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