Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
LayerTitle Class Reference
Inheritance diagram for LayerTitle:
ELayer IChangeLanguage IChangeResolution Layer IUISkin

Classes

class  TitleType
 

Public Member Functions

override void OnInit ()
 
void Refresh ()
 
void OnClickStart ()
 
void OnChangeResolution ()
 
void OnClickContinue ()
 
void OnClickConfig ()
 
void OnClickMod ()
 
void OnClickCredit ()
 
void OnClickAnnounce ()
 
void OnClickAbout ()
 
void OnClickFeedback ()
 
void OnClickExit ()
 
override void OnKill ()
 
void OnChangeLanguage ()
 
- 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 ()
 
void OnChangeLanguage ()
 
void OnChangeResolution ()
 

Static Public Member Functions

static void KillActor ()
 
- 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)
 

Public Attributes

TitleType[] types
 
LayerEditBio embark
 
UIText textVersion
 
UIText textIntro
 
Transform transBook
 
CanvasGroup cgBook
 
CanvasGroup cgBG
 
float speed
 
GraphicRaycaster ray
 
Transform titleActor
 
Image uiLight
 
RawImage imageFog
 
RawImage imageBG
 
bool toggle
 
bool altTitle
 
- 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
 

Static Public Attributes

static LayerTitle Instance
 
static EmbarkActor actor
 
- 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" }
 

Properties

TitleType CurrentTitle [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 Member Functions

void Update ()
 

Additional Inherited Members

- 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 5 of file LayerTitle.cs.

Member Function Documentation

◆ KillActor()

static void LayerTitle.KillActor ( )
inlinestatic

Definition at line 191 of file LayerTitle.cs.

192 {
193 if ((bool)actor)
194 {
195 UnityEngine.Object.DestroyImmediate(actor.gameObject);
196 }
197 }
static EmbarkActor actor
Definition: LayerTitle.cs:25

References actor.

Referenced by Game.StartNewGame(), and DramaOutcome.StartNewGame2().

◆ OnChangeLanguage()

void LayerTitle.OnChangeLanguage ( )
inline

Implements IChangeLanguage.

Definition at line 186 of file LayerTitle.cs.

187 {
188 textIntro.text = IO.LoadText(CorePath.CorePackage.TextData + "intro.txt");
189 }
static string TextData
Definition: CorePath.cs:49
Definition: IO.cs:11
static string LoadText(string _path)
Definition: IO.cs:484

References CorePath.CorePackage.TextData.

◆ OnChangeResolution()

void LayerTitle.OnChangeResolution ( )
inline

Implements IChangeResolution.

Definition at line 88 of file LayerTitle.cs.

89 {
90 imageBG.transform.localScale = new Vector3(Mathf.Max(1f, 1.7777778f / ((float)Screen.width / (float)Screen.height)), 1f, 1f);
91 }

Referenced by Refresh().

◆ OnClickAbout()

void LayerTitle.OnClickAbout ( )
inline

Definition at line 124 of file LayerTitle.cs.

125 {
126 ELayer.ui.AddLayer("LayerAbout");
127 }
Definition: ELayer.cs:4
static UI ui
Definition: ELayer.cs:21

References ELayer.ui.

◆ OnClickAnnounce()

void LayerTitle.OnClickAnnounce ( )
inline

Definition at line 119 of file LayerTitle.cs.

120 {
121 ELayer.ui.AddLayer("LayerAnnounce");
122 }

References ELayer.ui.

◆ OnClickConfig()

void LayerTitle.OnClickConfig ( )
inline

Definition at line 104 of file LayerTitle.cs.

105 {
106 ELayer.ui.AddLayer<LayerConfig>();
107 }

References ELayer.ui.

◆ OnClickContinue()

void LayerTitle.OnClickContinue ( )
inline

Definition at line 93 of file LayerTitle.cs.

94 {
95 if (ELayer.ui.GetTopLayer() is LayerTitle)
96 {
97 Core.TryWarnMod(delegate
98 {
99 ELayer.ui.AddLayer<LayerLoadGame>().Init(_backup: false);
100 }, ELayer.core.mods.CountUserMod() > 0);
101 }
102 }
Definition: Core.cs:14
ModManager mods
Definition: Core.cs:39
static void TryWarnMod(Action action, bool warn=true)
Definition: Core.cs:798
sealed override void Init()
Definition: ELayer.cs:67
static Core core
Definition: ELayer.cs:7
int CountUserMod()
Definition: ModManager.cs:297

References ELayer.core, ModManager.CountUserMod(), ELayer.Init(), Core.mods, Core.TryWarnMod(), and ELayer.ui.

◆ OnClickCredit()

void LayerTitle.OnClickCredit ( )
inline

Definition at line 114 of file LayerTitle.cs.

115 {
116 ELayer.ui.AddLayer<LayerCredit>();
117 }

References ELayer.ui.

◆ OnClickExit()

void LayerTitle.OnClickExit ( )
inline

Definition at line 134 of file LayerTitle.cs.

135 {
136 if (Application.isEditor)
137 {
138 ELayer.ui.RemoveLayer(this);
139 if ((bool)actor)
140 {
141 UnityEngine.Object.DestroyImmediate(actor.gameObject);
142 }
143 ELayer.ui.AddLayer<LayerTitle>();
144 }
145 else
146 {
147 ELayer.core.Quit();
148 }
149 }
void Quit()
Definition: Core.cs:568

References actor, ELayer.core, Core.Quit(), and ELayer.ui.

◆ OnClickFeedback()

void LayerTitle.OnClickFeedback ( )
inline

Definition at line 129 of file LayerTitle.cs.

130 {
131 ELayer.ui.ToggleFeedback();
132 }

References ELayer.ui.

◆ OnClickMod()

void LayerTitle.OnClickMod ( )
inline

Definition at line 109 of file LayerTitle.cs.

110 {
111 ELayer.ui.AddLayer<LayerMod>();
112 }

References ELayer.ui.

◆ OnClickStart()

void LayerTitle.OnClickStart ( )
inline

Definition at line 76 of file LayerTitle.cs.

77 {
78 if (ELayer.ui.GetTopLayer() is LayerTitle)
79 {
80 Core.TryWarnMod(delegate
81 {
82 embark = ELayer.ui.AddLayer<LayerEditBio>();
83 SoundManager.current.PlayBGM(CurrentTitle.bgm);
84 }, ELayer.core.mods.CountUserMod() > 0);
85 }
86 }
LayerEditBio embark
Definition: LayerTitle.cs:27
TitleType CurrentTitle
Definition: LayerTitle.cs:55

References LayerTitle.TitleType.bgm, ELayer.core, ModManager.CountUserMod(), CurrentTitle, embark, Core.mods, Core.TryWarnMod(), and ELayer.ui.

◆ OnInit()

override void LayerTitle.OnInit ( )
inlinevirtual

Reimplemented from Layer.

Definition at line 57 of file LayerTitle.cs.

58 {
59 Instance = this;
60 textVersion.text = ELayer.core.version.GetText() ?? "";
61 textIntro.text = IO.LoadText(CorePath.CorePackage.TextData + "intro.txt");
62 ELayer.ui.SetLight(enable: true);
64 Refresh();
65 SoundManager.current.PlayBGM(CurrentTitle.bgmTitle);
66 }
Version version
Definition: BaseCore.cs:17
static LayerTitle Instance
Definition: LayerTitle.cs:23
void Refresh()
Definition: LayerTitle.cs:68
Transform titleActor
Definition: LayerTitle.cs:43
Definition: Util.cs:10
static Transform Instantiate(string path, Component parent=null)
Definition: Util.cs:67
string GetText()
Definition: Version.cs:16

References LayerTitle.TitleType.bgmTitle, ELayer.core, CurrentTitle, Version.GetText(), Instance, Refresh(), CorePath.CorePackage.TextData, titleActor, ELayer.ui, Util, and BaseCore.version.

◆ OnKill()

override void LayerTitle.OnKill ( )
inlinevirtual

Reimplemented from Layer.

Definition at line 151 of file LayerTitle.cs.

152 {
153 UnityEngine.Object.DestroyImmediate(titleActor.gameObject);
154 if ((bool)embark)
155 {
156 ELayer.ui.RemoveLayer(embark);
157 UnityEngine.Object.DestroyImmediate(embark);
158 }
159 ELayer.ui.SetLight(enable: false);
160 }

References embark, titleActor, and ELayer.ui.

◆ Refresh()

void LayerTitle.Refresh ( )
inline

Definition at line 68 of file LayerTitle.cs.

69 {
70 titleActor.GetComponentInChildren<SpriteRenderer>().sprite = CurrentTitle.bg;
74 }
Image uiLight
Definition: LayerTitle.cs:45
void OnChangeResolution()
Definition: LayerTitle.cs:88
RawImage imageFog
Definition: LayerTitle.cs:47

References LayerTitle.TitleType.bg, CurrentTitle, LayerTitle.TitleType.fog, imageFog, LayerTitle.TitleType.light, OnChangeResolution(), titleActor, and uiLight.

Referenced by OnInit(), and Update().

◆ Update()

void LayerTitle.Update ( )
inlineprivate

Definition at line 162 of file LayerTitle.cs.

163 {
164 LayerEditBio layer = ELayer.ui.GetLayer<LayerEditBio>();
165 if (!layer && SoundManager.current.currentBGM.id != CurrentTitle.bgmTitle.name)
166 {
167 if (toggle)
168 {
170 }
171 SoundManager.current.PlayBGM(CurrentTitle.bgmTitle);
172 Refresh();
173 }
174 float num = Mathf.Clamp(cgBook.alpha + Time.smoothDeltaTime * speed * (float)((!layer) ? 1 : (-1)), 0f, 1f);
175 if (cgBook.alpha != num)
176 {
177 cgBook.alpha = num;
178 }
179 if (cgBG.alpha != num)
180 {
181 cgBG.alpha = num;
182 }
183 ray.enabled = num == 1f;
184 }
CanvasGroup cgBook
Definition: LayerTitle.cs:35
CanvasGroup cgBG
Definition: LayerTitle.cs:37
bool altTitle
Definition: LayerTitle.cs:53
bool toggle
Definition: LayerTitle.cs:51
float speed
Definition: LayerTitle.cs:39

References altTitle, LayerTitle.TitleType.bgmTitle, cgBG, cgBook, CurrentTitle, Refresh(), speed, toggle, and ELayer.ui.

Member Data Documentation

◆ actor

◆ altTitle

bool LayerTitle.altTitle

Definition at line 53 of file LayerTitle.cs.

Referenced by Update().

◆ cgBG

CanvasGroup LayerTitle.cgBG

Definition at line 37 of file LayerTitle.cs.

Referenced by Update().

◆ cgBook

CanvasGroup LayerTitle.cgBook

Definition at line 35 of file LayerTitle.cs.

Referenced by Update().

◆ embark

LayerEditBio LayerTitle.embark

Definition at line 27 of file LayerTitle.cs.

Referenced by OnClickStart(), and OnKill().

◆ imageBG

RawImage LayerTitle.imageBG

Definition at line 49 of file LayerTitle.cs.

◆ imageFog

RawImage LayerTitle.imageFog

Definition at line 47 of file LayerTitle.cs.

Referenced by Refresh().

◆ Instance

LayerTitle LayerTitle.Instance
static

Definition at line 23 of file LayerTitle.cs.

Referenced by OnInit().

◆ ray

GraphicRaycaster LayerTitle.ray

Definition at line 41 of file LayerTitle.cs.

◆ speed

float LayerTitle.speed

Definition at line 39 of file LayerTitle.cs.

Referenced by Update().

◆ textIntro

UIText LayerTitle.textIntro

Definition at line 31 of file LayerTitle.cs.

◆ textVersion

UIText LayerTitle.textVersion

Definition at line 29 of file LayerTitle.cs.

◆ titleActor

Transform LayerTitle.titleActor

Definition at line 43 of file LayerTitle.cs.

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

◆ toggle

bool LayerTitle.toggle

Definition at line 51 of file LayerTitle.cs.

Referenced by Update().

◆ transBook

Transform LayerTitle.transBook

Definition at line 33 of file LayerTitle.cs.

◆ types

TitleType [] LayerTitle.types

Definition at line 21 of file LayerTitle.cs.

◆ uiLight

Image LayerTitle.uiLight

Definition at line 45 of file LayerTitle.cs.

Referenced by Refresh().

Property Documentation

◆ CurrentTitle

TitleType LayerTitle.CurrentTitle
get

Definition at line 55 of file LayerTitle.cs.

Referenced by OnClickStart(), OnInit(), Refresh(), and Update().


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