Elin Decompiled Documentation EA 23.102 Nightly
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Pages
UICharaMaker Class Reference
Inheritance diagram for UICharaMaker:
EMono

Public Member Functions

void SetChara (Chara c)
 
void BuildRaces ()
 
void RefreshPortraitZoom (bool force=false)
 
void Refresh ()
 
void ListModes ()
 
void RerollAlias ()
 
void ListAlias ()
 
void RerollName ()
 
void EditName ()
 
void OnEndEditName ()
 
void RerollRace ()
 
void ListRace ()
 
void RerollJob ()
 
void ListJob ()
 
void AddDomain (UINote n, ElementContainer domains, bool button)
 
void ListGender ()
 
void ListAge ()
 
void SetPortraitSlider ()
 
void RerollPCC ()
 
void RerollHair ()
 
void RerollBio ()
 
void RerollBio (bool keepParent)
 
void EditPCC ()
 
void OnClickChangePortrait ()
 

Public Attributes

Chara chara
 
Portrait portrait
 
Portrait portraitZoom
 
InputField inputName
 
InputField inputAlias
 
InputField inputJob
 
InputField inputRace
 
InputField inputGender
 
InputField inputAge
 
UISlider sliderPortrait
 
List< SourceRace.Rowraces = new List<SourceRace.Row>()
 
List< SourceJob.Rowjobs = new List<SourceJob.Row>()
 
UIButton toggleExtra
 
UIButton toggleParentLock
 
UINote note
 
UINote note2
 
UINote noteJob
 
UINote noteRace
 
bool addShadow
 
bool extraRace
 
UIText textSign
 
UIText textMode
 
int ageIndex
 
Vector2 posList
 
Vector2 posList2
 
string[] listMode
 
string[] listDifficulties
 

Properties

Biography bio [get]
 
string TextUnknown [get]
 
- 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]
 

Private Member Functions

void Update ()
 

Additional Inherited Members

- Static Public Member Functions inherited from EMono
static int rnd (int a)
 
- Static Public Attributes inherited from EMono
static Core core
 

Detailed Description

Definition at line 8 of file UICharaMaker.cs.

Member Function Documentation

◆ AddDomain()

void UICharaMaker.AddDomain ( UINote  n,
ElementContainer  domains,
bool  button 
)
inline

Definition at line 368 of file UICharaMaker.cs.

369 {
370 n.Space(8);
371 string text = "";
372 foreach (Element value in domains.dict.Values)
373 {
374 text = text + ((value == domains.dict.Values.First()) ? "" : ", ") + value.Name;
375 }
376 UIItem uIItem = n.AddTopic("TopicDomain", "domain".lang(), text);
377 uIItem.button1.SetActive(button && EMono.pc.HasElement(1402));
378 uIItem.button1.SetOnClick(delegate
379 {
381 });
382 }
bool HasElement(int ele, int req=1)
Definition: Card.cs:5214
Definition: EMono.cs:4
static Chara pc
Definition: EMono.cs:13
static Player player
Definition: EMono.cs:11
Dictionary< int, Element > dict
Layer SelectDomain(Action onKill=null)
Definition: Player.cs:1342
void Refresh()
Definition: UIItem.cs:5
UIButton button1
Definition: UIItem.cs:18
UIItem AddTopic(string id, string text, string value=null)
Definition: UINote.cs:144
void Space(int sizeY=0, int sizeX=1)
Definition: UINote.cs:62

References UIItem.button1, Card.HasElement(), EMono.pc, EMono.player, Refresh(), Player.SelectDomain(), and UINote.Space().

Referenced by ListJob(), and Refresh().

◆ BuildRaces()

void UICharaMaker.BuildRaces ( )
inline

Definition at line 89 of file UICharaMaker.cs.

90 {
91 races.Clear();
92 jobs.Clear();
93 bool flag = EMono.core.config.test.extraRace;
94 foreach (SourceRace.Row row in EMono.sources.races.rows)
95 {
96 if (row.playable == 1 || (row.playable <= 6 && extraRace) || (flag && row.playable != 9))
97 {
98 races.Add(row);
99 }
100 }
101 foreach (SourceJob.Row row2 in EMono.sources.jobs.rows)
102 {
103 if (row2.playable == 1 || (row2.playable <= 6 && extraRace) || (flag && row2.playable != 9))
104 {
105 jobs.Add(row2);
106 }
107 }
108 races.Sort((SourceRace.Row a, SourceRace.Row b) => (a.playable - b.playable) * 10000 + a._index - b._index);
109 jobs.Sort((SourceJob.Row a, SourceJob.Row b) => (a.playable - b.playable) * 10000 + a._index - b._index);
110 }
CoreConfig config
Definition: Core.cs:70
static Core core
Definition: EMono.cs:5
static SourceManager sources
Definition: EMono.cs:41
SourceRace races
SourceJob jobs
List< SourceRace.Row > races
Definition: UICharaMaker.cs:30
List< SourceJob.Row > jobs
Definition: UICharaMaker.cs:32

References Core.config, EMono.core, CoreConfig.Test.extraRace, extraRace, SourceManager.jobs, jobs, SourceManager.races, races, EMono.sources, and CoreConfig.test.

Referenced by SetChara().

◆ EditName()

void UICharaMaker.EditName ( )
inline

Definition at line 240 of file UICharaMaker.cs.

241 {
242 Dialog.InputName("dialogChangeName", chara.c_altName.IsEmpty(chara.NameSimple), delegate(bool cancel, string text)
243 {
244 if (!cancel)
245 {
246 chara.c_altName = text;
247 Refresh();
248 }
249 }).SetOnKill(delegate
250 {
251 EMono.ui.hud.hint.Show("hintEmbarkTop".lang(), icon: false);
252 });
253 }
string c_altName
Definition: Card.cs:1493
string NameSimple
Definition: Card.cs:2015
Definition: Dialog.cs:7
static Dialog InputName(string langDetail, string text, Action< bool, string > onClose, InputType inputType=InputType.Default)
Definition: Dialog.cs:528
static UI ui
Definition: EMono.cs:15

References Card.c_altName, chara, Dialog.InputName(), Card.NameSimple, Refresh(), and EMono.ui.

◆ EditPCC()

void UICharaMaker.EditPCC ( )
inline

Definition at line 442 of file UICharaMaker.cs.

443 {
444 EMono.ui.AddLayer<LayerEditPCC>().Activate(chara, UIPCC.Mode.Body, null, delegate
445 {
448 });
449 }
void SetChara(Chara c, PCCData pccData=null)
Definition: Portrait.cs:138
void SetPortraitSlider()
Portrait portrait
Definition: UICharaMaker.cs:12

References chara, portrait, Portrait.SetChara(), SetPortraitSlider(), and EMono.ui.

◆ ListAge()

void UICharaMaker.ListAge ( )
inline

Definition at line 400 of file UICharaMaker.cs.

401 {
402 EMono.ui.AddLayer<LayerList>().SetStringList(() => Lang.GetList("ages"), delegate(int a, string b)
403 {
404 if (ageIndex != a)
405 {
406 ageIndex = a;
407 RerollBio(keepParent: true);
408 }
409 Refresh();
410 }).SetTitles("wAge");
411 }
Definition: Lang.cs:6
static string[] GetList(string id)
Definition: Lang.cs:114
void RerollBio()

References ageIndex, Lang.GetList(), Refresh(), RerollBio(), and EMono.ui.

◆ ListAlias()

void UICharaMaker.ListAlias ( )
inline

Definition at line 215 of file UICharaMaker.cs.

216 {
217 EMono.ui.AddLayer<LayerList>().SetStringList(delegate
218 {
219 List<string> list = new List<string>();
220 for (int i = 0; i < 10; i++)
221 {
222 list.Add(AliasGen.GetRandomAlias());
223 }
224 return list;
225 }, delegate(int a, string b)
226 {
227 chara._alias = b;
228 Refresh();
229 }).SetSize()
230 .EnableReroll()
231 .SetTitles("wAlias");
232 }
LayerList EnableReroll()
Definition: LayerList.cs:259
Layer SetTitles(string langList, string idHeaderRow=null)
Definition: Layer.cs:688

References LayerList.EnableReroll(), Refresh(), Layer.SetTitles(), and EMono.ui.

◆ ListGender()

void UICharaMaker.ListGender ( )
inline

Definition at line 384 of file UICharaMaker.cs.

385 {
386 EMono.ui.AddLayer<LayerList>().SetStringList(() => Lang.GetList("genders"), delegate(int a, string b)
387 {
388 if (chara.bio.gender != a)
389 {
394 }
396 Refresh();
397 }).SetTitles("wGender");
398 }
void SetGender(int g)
Definition: Biography.cs:450
int gender
Definition: Biography.cs:29
Biography bio
Definition: Card.cs:40
string GetIdPortraitCat()
Definition: Chara.cs:7320
static string GetRandomPortrait(string idDict)
Definition: Portrait.cs:105
Portrait portraitZoom
Definition: UICharaMaker.cs:14

References Card.bio, chara, Biography.gender, Chara.GetIdPortraitCat(), Lang.GetList(), Portrait.GetRandomPortrait(), portrait, portraitZoom, Refresh(), Portrait.SetChara(), Biography.SetGender(), SetPortraitSlider(), and EMono.ui.

◆ ListJob()

void UICharaMaker.ListJob ( )
inline

Definition at line 320 of file UICharaMaker.cs.

321 {
322 TooltipManager.Instance.HideTooltips(immediate: true);
323 TooltipManager.Instance.disableHide = "note";
324 bool first = true;
325 EMono.ui.AddLayer<LayerList>().SetPivot(0.5f, 0.1f).SetSize(260f)
326 .SetList2(jobs, (SourceJob.Row a) => a.GetText().ToTitleCase(wholeText: true), delegate(SourceJob.Row a, ItemGeneral b)
327 {
328 chara.ChangeJob(a.id);
330 RerollBio(keepParent: true);
331 }, delegate(SourceJob.Row a, ItemGeneral item)
332 {
333 UIButton b2 = item.button1;
334 b2.SetTooltip(delegate(UITooltip t)
335 {
336 ElementContainer elementContainer = new ElementContainer();
337 elementContainer.ApplyElementMap(EMono.pc.uid, SourceValueType.Chara, a.elementMap, 1);
338 elementContainer.ApplyPotential(2);
339 t.note.Clear();
340 t.note.AddHeader(a.GetText().ToTitleCase(wholeText: true));
341 elementContainer.AddNoteAll(t.note);
342 t.note.AddHeader("lore");
343 t.note.AddText("NoteText_long", a.GetDetail().IsEmpty(TextUnknown)).Hyphenate();
344 AddDomain(t.note, new ElementContainer().ImportElementMap(a.domain), button: false);
345 t.note.Build();
346 });
347 if (first)
348 {
349 TooltipManager.Instance.GetComponent<CanvasGroup>().alpha = 0f;
350 TooltipManager.Instance.GetComponent<CanvasGroup>().DOFade(1f, 0.3f);
351 EMono.core.actionsNextFrame.Add(delegate
352 {
354 });
355 }
356 first = false;
357 })
358 .SetTitles("wClass");
359 RectTransform rectTransform = EMono.ui.GetLayer<LayerList>().windows[0].Rect();
360 rectTransform.pivot = new Vector2(0.5f, 0.5f);
361 rectTransform.anchoredPosition = posList;
362 TweenUtil.Tween(0.3f, null, delegate
363 {
365 });
366 }
SourceValueType
List< Action > actionsNextFrame
Definition: BaseCore.cs:31
int uid
Definition: Card.cs:118
void ChangeJob(string idNew)
Definition: Chara.cs:1891
void ApplyPotential(int mode=0)
void AddNoteAll(UINote n)
void ApplyElementMap(int uid, SourceValueType type, Dictionary< int, int > map, int lv, bool invert=false, bool applyFeat=false)
LayerList SetSize(float w=450f, float h=-1f)
Definition: LayerList.cs:96
void RefreshDomain()
Definition: Player.cs:1323
static TooltipManager Instance
void HideTooltips(bool immediate=false)
void SetTooltip(Action< UITooltip > onShowTooltip=null, bool enable=true)
Definition: UIButton.cs:361
void ShowTooltipForced(bool ignoreWhenRightClick=true)
Definition: UIButton.cs:387
static void TryShowTip(Transform root=null, bool highlight=true, bool ignoreWhenRightClick=true)
Definition: UIButton.cs:778
void AddDomain(UINote n, ElementContainer domains, bool button)
string TextUnknown
Definition: UICharaMaker.cs:68
Vector2 posList
Definition: UICharaMaker.cs:56
void Hyphenate()
Definition: UIItem.cs:45
void Clear()
Definition: UINote.cs:35
UIItem AddHeader(string text, Sprite sprite=null)
Definition: UINote.cs:79
UIItem AddText(string text, FontColor color=FontColor.DontChange)
Definition: UINote.cs:113
void Build()
Definition: UINote.cs:49
UINote note
Definition: UITooltip.cs:21

References BaseCore.actionsNextFrame, AddDomain(), UINote.AddHeader(), ElementContainer.AddNoteAll(), UINote.AddText(), ElementContainer.ApplyElementMap(), ElementContainer.ApplyPotential(), UINote.Build(), Chara.ChangeJob(), chara, UINote.Clear(), EMono.core, TooltipManager.HideTooltips(), UIItem.Hyphenate(), TooltipManager.Instance, item, jobs, UITooltip.note, EMono.pc, EMono.player, posList, Player.RefreshDomain(), RerollBio(), LayerList.SetSize(), UIButton.SetTooltip(), UIButton.ShowTooltipForced(), TextUnknown, UIButton.TryShowTip(), EMono.ui, and Card.uid.

◆ ListModes()

void UICharaMaker.ListModes ( )
inline

Definition at line 193 of file UICharaMaker.cs.

194 {
195 EMono.ui.AddLayer<LayerList>().SetStringList(() => listMode, delegate(int a, string b)
196 {
197 EMono.game.idPrologue = a;
198 Prologue prologue = EMono.game.Prologue;
199 EMono.world.date.year = prologue.year;
200 EMono.world.date.month = prologue.month;
201 EMono.world.date.day = prologue.day;
202 EMono.world.weather._currentCondition = prologue.weather;
204 Refresh();
205 }).SetSize()
206 .SetTitles("wStartMode");
207 }
static Game game
Definition: EMono.cs:7
Prologue Prologue
Definition: Game.cs:257
int idPrologue
Definition: Game.cs:200
Weather.Condition weather
Definition: Prologue.cs:27
int month
Definition: Prologue.cs:15
int day
Definition: Prologue.cs:17
int year
Definition: Prologue.cs:13
UIText textMode
Definition: UICharaMaker.cs:52
string[] listMode
Definition: UICharaMaker.cs:61
void SetText(string s)
Definition: UIText.cs:159

References Prologue.day, EMono.game, Game.idPrologue, listMode, Prologue.month, Game.Prologue, Refresh(), UIText.SetText(), Layer.SetTitles(), textMode, EMono.ui, Prologue.weather, and Prologue.year.

◆ ListRace()

void UICharaMaker.ListRace ( )
inline

Definition at line 266 of file UICharaMaker.cs.

267 {
268 TooltipManager.Instance.HideTooltips(immediate: true);
269 TooltipManager.Instance.disableHide = "note";
270 bool first = true;
271 EMono.ui.AddLayer<LayerList>().SetPivot(0.5f, 0.2f).SetSize(260f)
272 .SetList2(races, (SourceRace.Row a) => a.GetText().ToTitleCase(wholeText: true), delegate(SourceRace.Row a, ItemGeneral b)
273 {
274 chara.ChangeRace(a.id);
275 RerollBio(keepParent: true);
276 }, delegate(SourceRace.Row a, ItemGeneral item)
277 {
278 UIButton b2 = item.button1;
279 b2.SetTooltip(delegate(UITooltip t)
280 {
281 ElementContainer elementContainer = new ElementContainer();
282 elementContainer.ApplyElementMap(EMono.pc.uid, SourceValueType.Chara, a.elementMap, 1);
283 elementContainer.ApplyPotential(1);
284 t.note.Clear();
285 t.note.AddHeader(a.GetText().ToTitleCase(wholeText: true));
286 elementContainer.AddNoteAll(t.note);
287 t.note.AddHeader("lore");
288 t.note.AddText("NoteText_long", a.GetDetail().IsEmpty(TextUnknown)).Hyphenate();
289 t.note.Space(8);
290 t.note.Build();
291 });
292 if (first)
293 {
294 TooltipManager.Instance.GetComponent<CanvasGroup>().alpha = 0f;
295 TooltipManager.Instance.GetComponent<CanvasGroup>().DOFade(1f, 0.3f);
296 EMono.core.actionsNextFrame.Add(delegate
297 {
299 });
300 }
301 first = false;
302 })
303 .SetTitles("wRace");
304 RectTransform rectTransform = EMono.ui.GetLayer<LayerList>().windows[0].Rect();
305 rectTransform.pivot = new Vector2(0.5f, 0.5f);
306 rectTransform.anchoredPosition = posList;
307 TweenUtil.Tween(0.3f, null, delegate
308 {
310 });
311 }
void ChangeRace(string idNew)
Definition: Chara.cs:1989

References BaseCore.actionsNextFrame, UINote.AddHeader(), ElementContainer.AddNoteAll(), UINote.AddText(), ElementContainer.ApplyElementMap(), ElementContainer.ApplyPotential(), UINote.Build(), Chara.ChangeRace(), chara, UINote.Clear(), EMono.core, TooltipManager.HideTooltips(), UIItem.Hyphenate(), TooltipManager.Instance, item, UITooltip.note, EMono.pc, posList, races, RerollBio(), LayerList.SetSize(), UIButton.SetTooltip(), UIButton.ShowTooltipForced(), UINote.Space(), TextUnknown, UIButton.TryShowTip(), EMono.ui, and Card.uid.

◆ OnClickChangePortrait()

void UICharaMaker.OnClickChangePortrait ( )
inline

Definition at line 451 of file UICharaMaker.cs.

452 {
453 EMono.ui.AddLayer<LayerEditPortrait>().Activate(chara, chara.pccData, delegate
454 {
456 });
457 }
PCCData pccData
Definition: Chara.cs:64

References Chara.pccData, Portrait.SetChara(), and EMono.ui.

◆ OnEndEditName()

void UICharaMaker.OnEndEditName ( )
inline

Definition at line 255 of file UICharaMaker.cs.

256 {
257 chara.c_altName = inputName.text;
258 }
InputField inputName
Definition: UICharaMaker.cs:16

References inputName.

◆ Refresh()

void UICharaMaker.Refresh ( )
inline

Definition at line 136 of file UICharaMaker.cs.

137 {
139 Prologue prologue = EMono.game.Prologue;
140 textSign.SetText("signDisembark".lang(prologue.month.ToString() ?? "", prologue.day.ToString() ?? "", prologue.year.ToString() ?? ""));
142 inputAlias.text = chara.Aka;
143 inputName.text = chara.c_altName;
144 inputRace.text = chara.race.GetText().ToTitleCase(wholeText: true);
145 inputJob.text = chara.job.GetText().ToTitleCase(wholeText: true);
146 inputGender.text = Lang._gender(chara.bio.gender);
147 inputAge.text = Lang.GetList("ages")[ageIndex];
148 note.Clear();
149 note.AddTopic("name".lang(), "nameBio".lang(chara.NameSimple, chara.Aka));
150 note.AddTopic("birthday".lang(), bio.TextBirthDate(chara, _age: true) + ((ageIndex == 0) ? "" : (" (" + Lang.GetList("ages")[ageIndex] + ")")));
151 note.AddTopic("appearance".lang(), bio.TextAppearance());
152 note.AddTopic("dad".lang(), bio.nameDad.ToTitleCase());
153 note.AddTopic("mom".lang(), bio.nameMom.ToTitleCase());
154 note.AddTopic("birthLoc".lang(), bio.nameBirthplace.ToTitleCase());
155 note.Build();
156 noteRace.Clear();
157 noteRace.AddHeaderTopic("race".lang() + ": " + chara.race.GetText().ToTitleCase(wholeText: true));
158 noteRace.Space(8);
159 noteRace.AddText("NoteText_long", chara.race.GetDetail().IsEmpty(TextUnknown)).Hyphenate();
160 noteRace.Build();
161 noteJob.Clear();
162 noteJob.AddHeaderTopic("job".lang() + ": " + chara.job.GetText().ToTitleCase(wholeText: true));
163 noteJob.Space(8);
164 noteJob.AddText("NoteText_long", chara.job.GetDetail().IsEmpty(TextUnknown)).Hyphenate();
165 AddDomain(noteJob, EMono.player.GetDomains(), button: true);
166 noteJob.Build();
167 note2.Clear();
168 note2.AddHeaderTopic("attributes".lang());
169 chara.elements.AddNote(note2, (Element e) => e.HasTag("primary"), null, ElementContainer.NoteMode.CharaMake);
170 note2.Space();
171 note2.AddHeaderTopic("skills".lang());
172 chara.elements.AddNote(note2, (Element e) => e.source.category == "skill" && e.ValueWithoutLink > 1 && e.source.categorySub != "weapon", null, ElementContainer.NoteMode.CharaMake);
173 note2.Space();
174 note2.AddHeaderTopic("feats".lang());
175 chara.elements.AddNote(note2, (Element e) => e is Feat && e.id != 1220, null, ElementContainer.NoteMode.CharaMake, addRaceFeat: true);
176 note2.Build();
177 if (!addShadow)
178 {
179 return;
180 }
181 Text[] componentsInChildren = note2.gameObject.GetComponentsInChildren<Text>();
182 foreach (Text text in componentsInChildren)
183 {
184 Shadow shadow = text.GetComponent<Shadow>();
185 if (!shadow)
186 {
187 shadow = text.gameObject.AddComponent<Shadow>();
188 }
189 shadow.effectColor = Color.black;
190 }
191 }
string nameBirthplace
Definition: Biography.cs:264
string nameDad
Definition: Biography.cs:260
string TextBirthDate(Chara c, bool _age=false)
Definition: Biography.cs:489
string nameMom
Definition: Biography.cs:262
string TextAppearance()
Definition: Biography.cs:494
ElementContainerCard elements
Definition: Card.cs:37
SourceJob.Row job
Definition: Chara.cs:451
string Aka
Definition: Chara.cs:201
SourceRace.Row race
Definition: Chara.cs:449
void AddNote(UINote n, Func< Element, bool > isValid=null, Action onAdd=null, NoteMode mode=NoteMode.Default, bool addRaceFeat=false, Func< Element, string, string > funcText=null, Action< UINote, Element > onAddNote=null)
int ValueWithoutLink
Definition: ELEMENT.cs:284
int id
Definition: ELEMENT.cs:240
SourceElement.Row source
Definition: ELEMENT.cs:263
bool HasTag(string tag)
Definition: ELEMENT.cs:463
Definition: FEAT.cs:249
static string _gender(int id)
Definition: Lang.cs:177
ElementContainer GetDomains()
Definition: Player.cs:1332
void RefreshPortraitZoom(bool force=false)
UINote note2
Definition: UICharaMaker.cs:40
UINote noteJob
Definition: UICharaMaker.cs:42
Biography bio
Definition: UICharaMaker.cs:66
UIText textSign
Definition: UICharaMaker.cs:50
UINote noteRace
Definition: UICharaMaker.cs:44
UIItem AddHeaderTopic(string text, Sprite sprite=null)
Definition: UINote.cs:89

References Lang._gender(), AddDomain(), UINote.AddHeaderTopic(), ElementContainer.AddNote(), addShadow, UINote.AddText(), UINote.AddTopic(), ageIndex, Chara.Aka, ElementContainer.ApplyPotential(), Card.bio, bio, UINote.Build(), Card.c_altName, chara, UINote.Clear(), Color, Prologue.day, Card.elements, EMono.game, Biography.gender, Player.GetDomains(), Lang.GetList(), Element.HasTag(), UIItem.Hyphenate(), Element.id, Chara.job, Prologue.month, Biography.nameBirthplace, Biography.nameDad, Biography.nameMom, Card.NameSimple, note, note2, noteJob, noteRace, EMono.player, Game.Prologue, Chara.race, RefreshPortraitZoom(), UIText.SetText(), Element.source, UINote.Space(), Biography.TextAppearance(), Biography.TextBirthDate(), textSign, TextUnknown, Element.ValueWithoutLink, and Prologue.year.

Referenced by AddDomain(), EditName(), ListAge(), ListAlias(), ListGender(), ListModes(), RerollAlias(), RerollBio(), RerollJob(), RerollName(), and SetChara().

◆ RefreshPortraitZoom()

void UICharaMaker.RefreshPortraitZoom ( bool  force = false)
inline

Definition at line 117 of file UICharaMaker.cs.

118 {
119 if (!portraitZoom)
120 {
121 return;
122 }
123 List<GameObject> hovered = InputModuleEX.GetPointerEventData().hovered;
124 bool enable = false;
125 foreach (GameObject item in hovered)
126 {
127 if (item.transform.IsChildOf(portrait.transform))
128 {
129 enable = true;
130 break;
131 }
132 }
133 portraitZoom.SetActive(enable);
134 }
static PointerEventData GetPointerEventData(int pointerId=-1)

References InputModuleEX.GetPointerEventData(), item, portrait, and portraitZoom.

Referenced by Refresh(), and Update().

◆ RerollAlias()

void UICharaMaker.RerollAlias ( )
inline

Definition at line 209 of file UICharaMaker.cs.

210 {
211 chara._alias = AliasGen.GetRandomAlias();
212 Refresh();
213 }

References Refresh().

◆ RerollBio() [1/2]

void UICharaMaker.RerollBio ( )
inline

Definition at line 431 of file UICharaMaker.cs.

432 {
433 RerollBio(keepParent: false);
434 }

References RerollBio().

Referenced by ListAge(), ListJob(), ListRace(), RerollBio(), and RerollRace().

◆ RerollBio() [2/2]

void UICharaMaker.RerollBio ( bool  keepParent)
inline

Definition at line 436 of file UICharaMaker.cs.

437 {
438 bio.RerollBio(chara, ageIndex, keepParent);
439 Refresh();
440 }
void RerollBio(Chara c, int ageIndex=0, bool keepParent=false)
Definition: Biography.cs:377

References ageIndex, bio, chara, Refresh(), and Biography.RerollBio().

◆ RerollHair()

void UICharaMaker.RerollHair ( )
inline

Definition at line 424 of file UICharaMaker.cs.

425 {
426 chara.pccData.SetRandomColor("hair");
429 }

References chara, Chara.pccData, portrait, portraitZoom, and Portrait.SetChara().

◆ RerollJob()

void UICharaMaker.RerollJob ( )
inline

Definition at line 313 of file UICharaMaker.cs.

314 {
315 chara.ChangeJob(jobs.RandomItem(chara.job).id);
317 Refresh();
318 }

References Chara.ChangeJob(), chara, Chara.job, jobs, EMono.player, Refresh(), and Player.RefreshDomain().

◆ RerollName()

void UICharaMaker.RerollName ( )
inline

Definition at line 234 of file UICharaMaker.cs.

235 {
236 chara.c_altName = NameGen.getRandomName();
237 Refresh();
238 }

References Refresh().

◆ RerollPCC()

void UICharaMaker.RerollPCC ( )
inline

Definition at line 417 of file UICharaMaker.cs.

418 {
419 chara.pccData.Randomize(null, null, randomizeHairColor: false);
422 }

References chara, Chara.pccData, portrait, portraitZoom, and Portrait.SetChara().

◆ RerollRace()

void UICharaMaker.RerollRace ( )
inline

Definition at line 260 of file UICharaMaker.cs.

261 {
262 chara.ChangeRace(races.RandomItem(chara.race).id);
263 RerollBio(keepParent: true);
264 }

References Chara.ChangeRace(), chara, Chara.race, races, and RerollBio().

◆ SetChara()

void UICharaMaker.SetChara ( Chara  c)
inline

Definition at line 70 of file UICharaMaker.cs.

71 {
72 listMode = Lang.GetList("startMode");
73 listDifficulties = Lang.GetList("difficulties");
75 chara = c;
76 BuildRaces();
80 Refresh();
81 toggleExtra.SetToggle(extraRace, delegate(bool a)
82 {
83 extraRace = a;
84 BuildRaces();
85 SE.Tab();
86 });
87 }
void SetToggle(bool isOn, Action< bool > onToggle=null)
Definition: UIButton.cs:341
void BuildRaces()
Definition: UICharaMaker.cs:89
string[] listDifficulties
Definition: UICharaMaker.cs:64
UIButton toggleExtra
Definition: UICharaMaker.cs:34

References BuildRaces(), chara, extraRace, EMono.game, Lang.GetList(), Game.idPrologue, listDifficulties, listMode, Chara.pccData, portrait, portraitZoom, Refresh(), Portrait.SetChara(), SetPortraitSlider(), UIText.SetText(), UIButton.SetToggle(), textMode, and toggleExtra.

Referenced by LayerEditBio.SetChara().

◆ SetPortraitSlider()

void UICharaMaker.SetPortraitSlider ( )
inline

Definition at line 413 of file UICharaMaker.cs.

414 {
415 }

Referenced by EditPCC(), ListGender(), and SetChara().

◆ Update()

void UICharaMaker.Update ( )
inlineprivate

Definition at line 112 of file UICharaMaker.cs.

113 {
115 }

References RefreshPortraitZoom().

Member Data Documentation

◆ addShadow

bool UICharaMaker.addShadow

Definition at line 46 of file UICharaMaker.cs.

Referenced by Refresh().

◆ ageIndex

int UICharaMaker.ageIndex

Definition at line 54 of file UICharaMaker.cs.

Referenced by ListAge(), Refresh(), and RerollBio().

◆ chara

◆ extraRace

bool UICharaMaker.extraRace

Definition at line 48 of file UICharaMaker.cs.

Referenced by BuildRaces(), and SetChara().

◆ inputAge

InputField UICharaMaker.inputAge

Definition at line 26 of file UICharaMaker.cs.

◆ inputAlias

InputField UICharaMaker.inputAlias

Definition at line 18 of file UICharaMaker.cs.

◆ inputGender

InputField UICharaMaker.inputGender

Definition at line 24 of file UICharaMaker.cs.

◆ inputJob

InputField UICharaMaker.inputJob

Definition at line 20 of file UICharaMaker.cs.

◆ inputName

InputField UICharaMaker.inputName

Definition at line 16 of file UICharaMaker.cs.

Referenced by OnEndEditName().

◆ inputRace

InputField UICharaMaker.inputRace

Definition at line 22 of file UICharaMaker.cs.

◆ jobs

List<SourceJob.Row> UICharaMaker.jobs = new List<SourceJob.Row>()

Definition at line 32 of file UICharaMaker.cs.

Referenced by BuildRaces(), ListJob(), and RerollJob().

◆ listDifficulties

string [] UICharaMaker.listDifficulties

Definition at line 64 of file UICharaMaker.cs.

Referenced by SetChara().

◆ listMode

string [] UICharaMaker.listMode

Definition at line 61 of file UICharaMaker.cs.

Referenced by ListModes(), and SetChara().

◆ note

UINote UICharaMaker.note

Definition at line 38 of file UICharaMaker.cs.

Referenced by Refresh().

◆ note2

UINote UICharaMaker.note2

Definition at line 40 of file UICharaMaker.cs.

Referenced by Refresh().

◆ noteJob

UINote UICharaMaker.noteJob

Definition at line 42 of file UICharaMaker.cs.

Referenced by Refresh().

◆ noteRace

UINote UICharaMaker.noteRace

Definition at line 44 of file UICharaMaker.cs.

Referenced by Refresh().

◆ portrait

Portrait UICharaMaker.portrait

◆ portraitZoom

Portrait UICharaMaker.portraitZoom

Definition at line 14 of file UICharaMaker.cs.

Referenced by ListGender(), RefreshPortraitZoom(), RerollHair(), RerollPCC(), and SetChara().

◆ posList

Vector2 UICharaMaker.posList

Definition at line 56 of file UICharaMaker.cs.

Referenced by ListJob(), and ListRace().

◆ posList2

Vector2 UICharaMaker.posList2

Definition at line 58 of file UICharaMaker.cs.

◆ races

List<SourceRace.Row> UICharaMaker.races = new List<SourceRace.Row>()

Definition at line 30 of file UICharaMaker.cs.

Referenced by BuildRaces(), ListRace(), and RerollRace().

◆ sliderPortrait

UISlider UICharaMaker.sliderPortrait

Definition at line 28 of file UICharaMaker.cs.

◆ textMode

UIText UICharaMaker.textMode

Definition at line 52 of file UICharaMaker.cs.

Referenced by ListModes(), and SetChara().

◆ textSign

UIText UICharaMaker.textSign

Definition at line 50 of file UICharaMaker.cs.

Referenced by Refresh().

◆ toggleExtra

UIButton UICharaMaker.toggleExtra

Definition at line 34 of file UICharaMaker.cs.

Referenced by SetChara().

◆ toggleParentLock

UIButton UICharaMaker.toggleParentLock

Definition at line 36 of file UICharaMaker.cs.

Property Documentation

◆ bio

Biography UICharaMaker.bio
get

Definition at line 66 of file UICharaMaker.cs.

Referenced by Refresh(), and RerollBio().

◆ TextUnknown

string UICharaMaker.TextUnknown
get

Definition at line 68 of file UICharaMaker.cs.

Referenced by ListJob(), ListRace(), and Refresh().


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