Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
Widget.Config Class Reference

Public Member Functions

bool IsInRightMode ()
 

Public Attributes

State state
 
RectPosition anchor
 
RectPosition userAnchor
 
RectPosition pivot = RectPosition.Center
 
string id
 
string titleLang
 
float x
 
float y
 
bool locked
 
bool RC
 
object extra
 
SkinConfig skin = new SkinConfig()
 
bool valid
 
bool annoyPlayer
 
Meta meta
 

Properties

GameMode mode [get]
 
bool IsSealed [get]
 
bool IsSystem [get]
 

Detailed Description

Definition at line 37 of file Widget.cs.

Member Function Documentation

◆ IsInRightMode()

bool Widget.Config.IsInRightMode ( )
inline

Definition at line 101 of file Widget.cs.

102 {
103 ActionMode actionMode = EMono.scene.actionMode;
104 if (actionMode.ShowBuildWidgets)
105 {
106 return mode.HasFlag(GameMode.Build);
107 }
108 if (actionMode == ActionMode.NoMap || actionMode == ActionMode.NewZone || actionMode == ActionMode.ViewMap)
109 {
110 return mode.HasFlag(GameMode.NoMap);
111 }
112 if (actionMode == ActionMode.Bird)
113 {
114 return mode.HasFlag(GameMode.Bird);
115 }
117 {
118 return mode.HasFlag(GameMode.Sim);
119 }
121 {
122 return mode.HasFlag(GameMode.EloMap);
123 }
125 {
126 if (actionMode == ActionMode.Region && !mode.HasFlag(GameMode.EloMap))
127 {
128 return false;
129 }
130 if (!ActionMode.Adv.zoomOut && meta.type == WidgetType.ZoomMenu)
131 {
132 return false;
133 }
134 return mode.HasFlag(GameMode.Adv);
135 }
136 return false;
137 }
GameMode
Definition: GameMode.cs:5
bool zoomOut
Definition: AM_Adv.cs:103
static AM_Sim Sim
Definition: ActionMode.cs:11
static AM_Region Region
Definition: ActionMode.cs:17
static bool IsAdv
Definition: ActionMode.cs:117
static AM_ViewMap ViewMap
Definition: ActionMode.cs:63
static ActionMode DefaultMode
Definition: ActionMode.cs:7
static AM_NewZone NewZone
Definition: ActionMode.cs:29
virtual bool ShowBuildWidgets
Definition: ActionMode.cs:183
static AM_ViewZone View
Definition: ActionMode.cs:13
static AM_EloMap EloMap
Definition: ActionMode.cs:21
static AM_NoMap NoMap
Definition: ActionMode.cs:25
static AM_Bird Bird
Definition: ActionMode.cs:31
static AM_Adv Adv
Definition: ActionMode.cs:15
Definition: EMono.cs:4
static Scene scene
Definition: EMono.cs:27
ActionMode actionMode
Definition: Scene.cs:77
Meta meta
Definition: Widget.cs:70
GameMode mode
Definition: Widget.cs:73
WidgetType type
Definition: Widget.cs:21
WidgetType
Definition: Widget.cs:32

References Scene.actionMode, ActionMode.Adv, ActionMode.Bird, ActionMode.DefaultMode, ActionMode.EloMap, ActionMode.IsAdv, Widget.Config.meta, Widget.Config.mode, ActionMode.NewZone, ActionMode.NoMap, ActionMode.Region, EMono.scene, ActionMode.ShowBuildWidgets, ActionMode.Sim, Widget.Meta.type, ActionMode.View, ActionMode.ViewMap, and AM_Adv.zoomOut.

Referenced by Widget.IsInRightMode().

Member Data Documentation

◆ anchor

RectPosition Widget.Config.anchor

Definition at line 41 of file Widget.cs.

Referenced by Widget.Activate().

◆ annoyPlayer

bool Widget.Config.annoyPlayer

Definition at line 67 of file Widget.cs.

◆ extra

object Widget.Config.extra

Definition at line 59 of file Widget.cs.

Referenced by Widget.Activate().

◆ id

string Widget.Config.id

Definition at line 47 of file Widget.cs.

Referenced by WidgetManager.OnGameInstantiated().

◆ locked

bool Widget.Config.locked

Definition at line 55 of file Widget.cs.

Referenced by WidgetManager.RefreshWidget().

◆ meta

Meta Widget.Config.meta

Definition at line 70 of file Widget.cs.

Referenced by Widget.Config.IsInRightMode().

◆ pivot

RectPosition Widget.Config.pivot = RectPosition.Center

Definition at line 45 of file Widget.cs.

Referenced by Widget.Activate(), and Widget.SetBaseContextMenu().

◆ RC

bool Widget.Config.RC

Definition at line 57 of file Widget.cs.

Referenced by Widget.SetBaseContextMenu().

◆ skin

◆ state

State Widget.Config.state

Definition at line 39 of file Widget.cs.

◆ titleLang

string Widget.Config.titleLang

Definition at line 49 of file Widget.cs.

◆ userAnchor

RectPosition Widget.Config.userAnchor

Definition at line 43 of file Widget.cs.

Referenced by Widget.Activate(), Widget.ClampToScreen(), and Widget.SetBaseContextMenu().

◆ valid

bool Widget.Config.valid

Definition at line 64 of file Widget.cs.

◆ x

float Widget.Config.x

Definition at line 51 of file Widget.cs.

Referenced by Widget.Activate().

◆ y

float Widget.Config.y

Definition at line 53 of file Widget.cs.

Referenced by Widget.Activate().

Property Documentation

◆ IsSealed

bool Widget.Config.IsSealed
get

Definition at line 76 of file Widget.cs.

77 {
78 get
79 {
80 if (IsSystem)
81 {
83 }
84 return false;
85 }
86 }
CoreConfig config
Definition: Core.cs:70
static Core core
Definition: EMono.cs:5
bool IsSystem
Definition: Widget.cs:90

◆ IsSystem

bool Widget.Config.IsSystem
get

Definition at line 89 of file Widget.cs.

90 {
91 get
92 {
93 if (!meta.system)
94 {
95 return annoyPlayer;
96 }
97 return true;
98 }
99 }
bool annoyPlayer
Definition: Widget.cs:67
bool system
Definition: Widget.cs:19

◆ mode

GameMode Widget.Config.mode
get

Definition at line 73 of file Widget.cs.

Referenced by Widget.Config.IsInRightMode().


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