Elin Decompiled Documentation EA 23.209 Stable Patch 2
Loading...
Searching...
No Matches
LayerWorldSetting Class Reference
Inheritance diagram for LayerWorldSetting:
ELayer Layer IUISkin

Public Member Functions

override void OnInit ()
 
void SetTemplate (int idx)
 
void RefreshTemplate ()
 
void Refresh ()
 
void StartGame ()
 
override void OnKill ()
 
void Apply ()
 
- Public Member Functions inherited from ELayer
override void OnBeforeAddLayer ()
 
void InitInspector ()
 
sealed override void Init ()
 
override void OnAfterAddLayer ()
 
void TryShowHelp ()
 
void AddLayerToUI (string id)
 
void TryShowHint (string _langHint=null)
 
void TalkHomeMemeber (string id)
 
void TalkMaid (string id)
 
override void OnRightClick ()
 
- Public Member Functions inherited from Layer
virtual string GetTextHeader (Window window)
 
virtual bool HeaderIsListOf (int id)
 
virtual void Init ()
 
virtual void OnInit ()
 
virtual void OnAfterInit ()
 
virtual void ApplySkin ()
 
void ShowScreenLock (string id)
 
void UpdateInput ()
 
virtual void OnUpdateInput ()
 
virtual void OnRightClick ()
 
virtual bool OnBack ()
 
virtual void OnChangeLayer ()
 
virtual void OnCreate ()
 
void _AddLayer (string id)
 
Layer AddLayer (string id)
 
AddLayer< T > ()
 
AddLayer< T > (string id)
 
AddLayerDontCloseOthers< T > ()
 
Layer AddLayerDontCloseOthers (Layer l)
 
GetOrAddLayer< T > ()
 
virtual void OnBeforeAddLayer ()
 
virtual void OnAfterAddLayer ()
 
Layer AddLayer (Layer l)
 
void ToggleLayer (string id)
 
ToggleLayer< T > (string id=null)
 
void WaitAndClose ()
 
void OnClickClose ()
 
virtual void Close ()
 
void CloseLayers ()
 
void RemoveLayers (bool removeImportant=false)
 
bool RemoveLayer< T > ()
 
void RemoveLayer (Layer l)
 
virtual void OnKill ()
 
Layer SetOnKill (Action action)
 
void DisableClose ()
 
void Delay (float duration=0.05f)
 
Layer SetDelay (float d)
 
Layer GetLayer (string id)
 
GetLayer< T > (bool fromTop=false)
 
Layer GetTopLayer ()
 
void SwitchContent (int idWindow, int i)
 
virtual void OnSwitchContent (Window window)
 
Layer SetTitles (string langList, string idHeaderRow=null)
 
bool IsBlockWidgetClick ()
 
bool IsHideHud ()
 
bool IsAllowGeneralInput ()
 
bool IsUseBlur ()
 
bool IsPointerOnLayer ()
 
void ApplySkin ()
 

Public Attributes

UISelectableGroup groupTemplate
 
List< UIButtonbuttonTemplates
 
GamePrincipal pp
 
UIButton toggleEvaluate
 
UIButton toggleDeathPenaltyProtection
 
UIButton toggleManualSave
 
UIButton togglePermadeath
 
UIButton toggleInfiniteMarketFund
 
UIButton toggleOPMilk
 
UIButton toggleUsermapBenefit
 
UIButton toggleDropRate
 
UIButton toggleTax
 
UIText textScore
 
UIText textTitle
 
UIText textValidScore
 
UIText textDetail
 
UISlider sliderDropRate
 
Image imageScoreBar
 
UIButton moldToggle
 
UIButton moldSlider
 
UIButton buttonEmbark
 
UIButton buttonWorkaround
 
UIItem moldHeader
 
Transform transCustom
 
Transform transMold
 
Transform transHint
 
List< Sprite > sprites
 
Sprite spriteNoToken
 
- Public Attributes inherited from Layer
Option option
 
UnityEvent onKill
 
Anime animeIn
 
Anime animeOut
 
bool closeOthers
 
bool defaultActionMode = true
 
Button screenLock
 
Layer parent
 
string idLayer
 
List< Layerlayers = new List<Layer>()
 
Vector2 lastParentPos
 
List< Windowwindows = new List<Window>()
 
string langHint
 

Properties

int IdxCustom [get]
 
bool IsEmbark [get]
 
- Properties inherited from ELayer
static Core core [get]
 
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static FactionBranch Branch [get]
 
static Faction Home [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static CoreConfig config [get]
 
static GameSetting setting [get]
 
static ColorProfile Colors [get]
 
static SourceManager sources [get]
 
static World world [get]
 
static SoundManager Sound [get]
 
static CoreDebug debug [get]
 
bool IsFloat [get]
 
virtual string IdHelp [get]
 
- Properties inherited from Layer
Layer TopLayer [get]
 
string uid [get]
 
virtual RectTransform rectLayers [get]
 
virtual bool blockWidgetClick [get]
 

Private Attributes

bool started
 

Additional Inherited Members

- Static Public Member Functions inherited from ELayer
static int rnd (int a)
 
- Static Public Member Functions inherited from Layer
static T Create< T > ()
 
static T Create< T > (string path)
 
static Layer Create (string path)
 
- Static Public Attributes inherited from Layer
static int skipInput
 
static bool closeOnRightClick
 
static bool rightClicked
 
static bool cancelKeyDown
 
static bool ignoreSounds
 
static Transform blurStopInstance
 
static string[] searchPath = new string[3] { "Layer", "Layer/Dialog", "Layer/LayerHome" }
 
- Protected Member Functions inherited from ELayer
sealed override void _Close ()
 
sealed override void Kill ()
 
- Protected Member Functions inherited from Layer
virtual void Awake ()
 
virtual void _Close ()
 
virtual void Kill ()
 
- Protected Attributes inherited from Layer
RectTransform _rect
 
bool isDestroyed
 

Detailed Description

Definition at line 6 of file LayerWorldSetting.cs.

Member Function Documentation

◆ Apply()

void LayerWorldSetting.Apply ( )
inline

Definition at line 223 of file LayerWorldSetting.cs.

224 {
225 if (!IsEmbark)
226 {
227 pp.modified = ELayer.game.principal.modified;
228 foreach (GamePrincipal.Item item in pp.ListItems())
229 {
230 if (item.IsModified())
231 {
232 pp.modified.Add(item.id);
233 }
234 }
235 }
236 ELayer.game.principal = pp;
238 {
239 ELayer.player.resetPrincipal = false;
240 }
241 ELayer.pc.SetFeat(1220, pp.permadeath ? 1 : 0);
242 }
void SetFeat(int id, int value=1, bool msg=false)
Definition: Chara.cs:9520
Definition: ELayer.cs:4
static Chara pc
Definition: ELayer.cs:15
static Player player
Definition: ELayer.cs:13
static Game game
Definition: ELayer.cs:9
HashSet< string > modified
List< Item > ListItems()
GamePrincipal principal
Definition: Game.cs:221
bool resetPrincipal
Definition: Player.cs:1174

References ELayer.game, IsEmbark, item, GamePrincipal.ListItems(), GamePrincipal.modified, ELayer.pc, GamePrincipal.permadeath, ELayer.player, pp, Game.principal, Player.resetPrincipal, and Chara.SetFeat().

Referenced by OnKill().

◆ OnInit()

override void LayerWorldSetting.OnInit ( )
inlinevirtual

Reimplemented from Layer.

Definition at line 80 of file LayerWorldSetting.cs.

81 {
82 buttonEmbark.SetActive(IsEmbark);
83 buttonWorkaround.SetActive(enable: true);
84 transHint.SetActive(IsEmbark);
85 if (IsEmbark)
86 {
88 }
89 pp = IO.DeepCopy(ELayer.game.principal);
90 transMold.SetActive(enable: false);
91 for (int j = 0; j < buttonTemplates.Count; j++)
92 {
93 int i = j;
94 UIButton uIButton = buttonTemplates[i];
95 uIButton.mainText.SetText(Lang.GetList("pp_templates")[i]);
96 if (i != IdxCustom)
97 {
98 uIButton.refObj = ELayer.setting.start.principals[i];
99 }
100 uIButton.SetOnClick(delegate
101 {
102 SetTemplate(i);
103 });
104 }
106 {
107 ELayer.player.showWorkaround = a;
108 Refresh();
109 });
110 Refresh();
111 }
static GameSetting setting
Definition: ELayer.cs:33
List< GamePrincipal > principals
Definition: GameSetting.cs:244
StartSetting start
Definition: GameSetting.cs:305
Definition: IO.cs:11
Definition: Lang.cs:6
static string[] GetList(string id)
Definition: Lang.cs:114
void SetTemplate(int idx)
List< UIButton > buttonTemplates
bool showWorkaround
Definition: Player.cs:998
UIText mainText
Definition: UIButton.cs:102
void SetToggle(bool isOn, Action< bool > onToggle=null)
Definition: UIButton.cs:341
void SetText(string s)
Definition: UIText.cs:159

References buttonEmbark, buttonTemplates, buttonWorkaround, ELayer.game, Lang.GetList(), IdxCustom, IsEmbark, UIButton.mainText, GamePrincipal.modified, ELayer.player, pp, Game.principal, GameSetting.StartSetting.principals, Refresh(), SetTemplate(), UIText.SetText(), ELayer.setting, UIButton.SetToggle(), Player.showWorkaround, GameSetting.start, transHint, and transMold.

◆ OnKill()

override void LayerWorldSetting.OnKill ( )
inlinevirtual

Reimplemented from Layer.

Definition at line 218 of file LayerWorldSetting.cs.

219 {
220 Apply();
221 }

References Apply().

◆ Refresh()

void LayerWorldSetting.Refresh ( )
inline

Definition at line 140 of file LayerWorldSetting.cs.

141 {
143 transCustom.DestroyChildren();
144 List<GamePrincipal.Item> items = pp.ListItems();
145 AddCategory(GamePrincipal.Type.Oath);
147 {
148 AddCategory(GamePrincipal.Type.Workaround);
149 AddCategory(GamePrincipal.Type.Legacy);
150 AddCategory(GamePrincipal.Type.Flavor);
151 }
152 transCustom.RebuildLayout();
153 void AddCategory(GamePrincipal.Type type)
154 {
155 Util.Instantiate(moldHeader, transCustom).text1.SetText(("pp_" + type).lang());
156 foreach (GamePrincipal.Item item in items.Where((GamePrincipal.Item a) => a.type == type))
157 {
158 UIButton b = null;
160 if (itemSlider == null)
161 {
162 if (item != null)
163 {
164 _ = item;
166 }
167 }
168 else
169 {
171 b.GetComponentInChildren<UISlider>().SetSlider(itemSlider.GetInt(), delegate(float a)
172 {
173 itemSlider.SetInt((int)a);
174 return itemSlider.funcText((int)a);
175 }, 0, itemSlider.max, notify: false);
176 }
177 bool flag = item.id == "permadeath" && !IsEmbark && !item.WasSealed();
178 b.mainText.SetText(("pp_" + item.id).lang());
179 b.icon.SetActive(item.grade < 0 || item.IsSealed() || item.WasSealed());
180 b.icon.SetAlpha((item.grade < 0 || item.IsSealed()) ? 1f : 0.3f);
181 b.icon.sprite = ((item.grade < 0) ? spriteNoToken : sprites[item.grade]);
182 b.icon.SetNativeSize();
183 b.GetOrCreate<CanvasGroup>().alpha = (flag ? 0.5f : 1f);
184 string text = "pp_" + item.id + "_hint";
185 b.SetTooltipLang(text);
186 b.tooltip.enable = Lang.Has(text);
187 b.interactable = !flag;
188 b.SetToggle(item.Get(), delegate(bool a)
189 {
190 item.Set(a);
191 if (!pp.IsCustom)
192 {
193 pp.id = -1;
194 RefreshTemplate();
195 }
196 b.icon.SetActive(item.grade < 0 || item.IsSealed() || item.WasSealed());
197 b.icon.SetAlpha((item.grade < 0 || item.IsSealed()) ? 1f : 0.3f);
198 });
199 }
200 }
201 }
Func< int, string > funcText
void SetInt(int value)
static bool Has(string id)
Definition: Lang.cs:100
List< Sprite > sprites
Image icon
Definition: UIButton.cs:110
void SetTooltipLang(string lang=null)
Definition: UIButton.cs:373
Definition: Util.cs:10
static Transform Instantiate(string path, Component parent=null)
Definition: Util.cs:67

References GamePrincipal.ItemSlider.funcText, GamePrincipal.ItemSlider.GetInt(), Lang.Has(), UIButton.icon, GamePrincipal.IsCustom, IsEmbark, item, GamePrincipal.ListItems(), UIButton.mainText, GamePrincipal.ItemSlider.max, moldHeader, moldSlider, moldToggle, ELayer.player, pp, RefreshTemplate(), GamePrincipal.ItemSlider.SetInt(), UIText.SetText(), UIButton.SetToggle(), UIButton.SetTooltipLang(), Player.showWorkaround, spriteNoToken, sprites, transCustom, and Util.

Referenced by OnInit(), and SetTemplate().

◆ RefreshTemplate()

void LayerWorldSetting.RefreshTemplate ( )
inline

Definition at line 127 of file LayerWorldSetting.cs.

128 {
129 if (pp.IsCustom)
130 {
132 }
133 else
134 {
136 }
137 textDetail.SetText(("vow_" + pp.id).lang());
138 }
UISelectableGroup groupTemplate
void Select(UIButton button, bool check=true)

References buttonTemplates, groupTemplate, GamePrincipal.id, GamePrincipal.IsCustom, pp, UISelectableGroup.Select(), UIText.SetText(), and textDetail.

Referenced by Refresh().

◆ SetTemplate()

void LayerWorldSetting.SetTemplate ( int  idx)
inline

Definition at line 113 of file LayerWorldSetting.cs.

114 {
115 pp.id = idx;
116 if (idx == IdxCustom)
117 {
118 pp.id = -1;
119 }
120 else
121 {
122 pp = IO.DeepCopy(ELayer.setting.start.principals[idx]);
123 }
124 Refresh();
125 }

References IdxCustom, pp, GameSetting.StartSetting.principals, Refresh(), ELayer.setting, and GameSetting.start.

Referenced by OnInit().

◆ StartGame()

void LayerWorldSetting.StartGame ( )
inline

Definition at line 203 of file LayerWorldSetting.cs.

204 {
206 {
207 Close();
208 return;
209 }
210 started = true;
211 Close();
212 if (!LayerDrama.Instance)
213 {
214 LayerDrama.ActivateMain("mono", "1-1");
215 }
216 }
static LayerDrama Instance
Definition: LayerDrama.cs:20
static LayerDrama ActivateMain(string idSheet, string idStep=null, Chara target=null, Card ref1=null, string tag="")
Definition: LayerDrama.cs:61
virtual void Close()
Definition: Layer.cs:463

References LayerDrama.ActivateMain(), Layer.Close(), LayerDrama.Instance, ELayer.player, Player.resetPrincipal, and started.

Member Data Documentation

◆ buttonEmbark

UIButton LayerWorldSetting.buttonEmbark

Definition at line 48 of file LayerWorldSetting.cs.

Referenced by OnInit().

◆ buttonTemplates

List<UIButton> LayerWorldSetting.buttonTemplates

Definition at line 10 of file LayerWorldSetting.cs.

Referenced by OnInit(), and RefreshTemplate().

◆ buttonWorkaround

UIButton LayerWorldSetting.buttonWorkaround

Definition at line 50 of file LayerWorldSetting.cs.

Referenced by OnInit().

◆ groupTemplate

UISelectableGroup LayerWorldSetting.groupTemplate

Definition at line 8 of file LayerWorldSetting.cs.

Referenced by RefreshTemplate().

◆ imageScoreBar

Image LayerWorldSetting.imageScoreBar

Definition at line 42 of file LayerWorldSetting.cs.

◆ moldHeader

UIItem LayerWorldSetting.moldHeader

Definition at line 52 of file LayerWorldSetting.cs.

Referenced by Refresh().

◆ moldSlider

UIButton LayerWorldSetting.moldSlider

Definition at line 46 of file LayerWorldSetting.cs.

Referenced by Refresh().

◆ moldToggle

UIButton LayerWorldSetting.moldToggle

Definition at line 44 of file LayerWorldSetting.cs.

Referenced by Refresh().

◆ pp

GamePrincipal LayerWorldSetting.pp

Definition at line 12 of file LayerWorldSetting.cs.

Referenced by Apply(), OnInit(), Refresh(), RefreshTemplate(), and SetTemplate().

◆ sliderDropRate

UISlider LayerWorldSetting.sliderDropRate

Definition at line 40 of file LayerWorldSetting.cs.

◆ spriteNoToken

Sprite LayerWorldSetting.spriteNoToken

Definition at line 62 of file LayerWorldSetting.cs.

Referenced by Refresh().

◆ sprites

List<Sprite> LayerWorldSetting.sprites

Definition at line 60 of file LayerWorldSetting.cs.

Referenced by Refresh().

◆ started

bool LayerWorldSetting.started
private

Definition at line 64 of file LayerWorldSetting.cs.

Referenced by StartGame().

◆ textDetail

UIText LayerWorldSetting.textDetail

Definition at line 38 of file LayerWorldSetting.cs.

Referenced by RefreshTemplate().

◆ textScore

UIText LayerWorldSetting.textScore

Definition at line 32 of file LayerWorldSetting.cs.

◆ textTitle

UIText LayerWorldSetting.textTitle

Definition at line 34 of file LayerWorldSetting.cs.

◆ textValidScore

UIText LayerWorldSetting.textValidScore

Definition at line 36 of file LayerWorldSetting.cs.

◆ toggleDeathPenaltyProtection

UIButton LayerWorldSetting.toggleDeathPenaltyProtection

Definition at line 16 of file LayerWorldSetting.cs.

◆ toggleDropRate

UIButton LayerWorldSetting.toggleDropRate

Definition at line 28 of file LayerWorldSetting.cs.

◆ toggleEvaluate

UIButton LayerWorldSetting.toggleEvaluate

Definition at line 14 of file LayerWorldSetting.cs.

◆ toggleInfiniteMarketFund

UIButton LayerWorldSetting.toggleInfiniteMarketFund

Definition at line 22 of file LayerWorldSetting.cs.

◆ toggleManualSave

UIButton LayerWorldSetting.toggleManualSave

Definition at line 18 of file LayerWorldSetting.cs.

◆ toggleOPMilk

UIButton LayerWorldSetting.toggleOPMilk

Definition at line 24 of file LayerWorldSetting.cs.

◆ togglePermadeath

UIButton LayerWorldSetting.togglePermadeath

Definition at line 20 of file LayerWorldSetting.cs.

◆ toggleTax

UIButton LayerWorldSetting.toggleTax

Definition at line 30 of file LayerWorldSetting.cs.

◆ toggleUsermapBenefit

UIButton LayerWorldSetting.toggleUsermapBenefit

Definition at line 26 of file LayerWorldSetting.cs.

◆ transCustom

Transform LayerWorldSetting.transCustom

Definition at line 54 of file LayerWorldSetting.cs.

Referenced by Refresh().

◆ transHint

Transform LayerWorldSetting.transHint

Definition at line 58 of file LayerWorldSetting.cs.

Referenced by OnInit().

◆ transMold

Transform LayerWorldSetting.transMold

Definition at line 56 of file LayerWorldSetting.cs.

Referenced by OnInit().

Property Documentation

◆ IdxCustom

int LayerWorldSetting.IdxCustom
get

Definition at line 66 of file LayerWorldSetting.cs.

Referenced by OnInit(), and SetTemplate().

◆ IsEmbark

bool LayerWorldSetting.IsEmbark
get

Definition at line 68 of file LayerWorldSetting.cs.

69 {
70 get
71 {
73 {
75 }
76 return true;
77 }
78 }
bool IsGameStarted
Definition: Core.cs:84
static Core core
Definition: ELayer.cs:7

Referenced by Apply(), OnInit(), and Refresh().


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