Elin Decompiled Documentation EA 23.316 Nightly
Loading...
Searching...
No Matches
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 AddWeaponSkill (UINote n, ElementContainer eles)
 
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 371 of file UICharaMaker.cs.

372 {
373 n.Space(8);
374 string text = "";
375 foreach (Element value in domains.dict.Values)
376 {
377 text = text + ((value == domains.dict.Values.First()) ? "" : ", ") + value.Name;
378 }
379 UIItem uIItem = n.AddTopic("TopicDomain", "domain".lang(), text);
380 uIItem.button1.SetActive(button && EMono.pc.HasElement(1402));
381 uIItem.button1.SetOnClick(delegate
382 {
384 });
385 }
bool HasElement(int ele, bool includeNagative=false)
Definition: Card.cs:6285
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:1613
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().

◆ AddWeaponSkill()

void UICharaMaker.AddWeaponSkill ( UINote  n,
ElementContainer  eles 
)
inline

Definition at line 387 of file UICharaMaker.cs.

388 {
389 List<Element> list = eles.dict.Values.Where((Element e) => e.ValueWithoutLink > 1 && e.source.categorySub == "weapon").ToList();
390 string text = "";
391 foreach (Element item in list)
392 {
393 text = text + ((item == list.First()) ? "" : ", ") + item.Name;
394 }
395 if (!text.IsEmpty())
396 {
397 n.AddTopic("TopicDomain", "skillsWeapon".lang(), text).button1.SetActive(enable: false);
398 }
399 }
int ValueWithoutLink
Definition: ELEMENT.cs:301
SourceElement.Row source
Definition: ELEMENT.cs:280

References ElementContainer.dict, item, Element.source, and Element.ValueWithoutLink.

Referenced by ListJob(), and ListRace().

◆ 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:1633
string NameSimple
Definition: Card.cs:2193
Definition: Dialog.cs:7
static Dialog InputName(string langDetail, string text, Action< bool, string > onClose, InputType inputType=InputType.Default)
Definition: Dialog.cs:536
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 459 of file UICharaMaker.cs.

460 {
461 EMono.ui.AddLayer<LayerEditPCC>("LayerPCC/LayerEditPCC").Activate(chara, UIPCC.Mode.Body, null, delegate
462 {
465 });
466 }
void SetChara(Chara c, PCCData pccData=null)
Definition: Portrait.cs:143
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 417 of file UICharaMaker.cs.

418 {
419 EMono.ui.AddLayer<LayerList>().SetStringList(() => Lang.GetList("ages"), delegate(int a, string b)
420 {
421 if (ageIndex != a)
422 {
423 ageIndex = a;
424 RerollBio(keepParent: true);
425 }
426 Refresh();
427 }).SetTitles("wAge");
428 }
Definition: Lang.cs:7
static string[] GetList(string id)
Definition: Lang.cs:117
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 401 of file UICharaMaker.cs.

402 {
403 EMono.ui.AddLayer<LayerList>().SetStringList(() => Lang.GetList("genders"), delegate(int a, string b)
404 {
405 if (chara.bio.gender != a)
406 {
411 }
413 Refresh();
414 }).SetTitles("wGender");
415 }
void SetGender(int g)
Definition: Biography.cs:469
int gender
Definition: Biography.cs:29
Biography bio
Definition: Card.cs:45
string GetIdPortraitCat()
Definition: Chara.cs:8463
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 322 of file UICharaMaker.cs.

323 {
324 TooltipManager.Instance.HideTooltips(immediate: true);
325 TooltipManager.Instance.disableHide = "note";
326 bool first = true;
327 EMono.ui.AddLayer<LayerList>().SetPivot(0.5f, 0.1f).SetSize(260f)
328 .SetList2(jobs, (SourceJob.Row a) => a.GetText().ToTitleCase(wholeText: true), delegate(SourceJob.Row a, ItemGeneral b)
329 {
330 chara.ChangeJob(a.id);
332 RerollBio(keepParent: true);
333 }, delegate(SourceJob.Row a, ItemGeneral item)
334 {
335 UIButton b2 = item.button1;
336 b2.SetTooltip(delegate(UITooltip t)
337 {
338 ElementContainer elementContainer = new ElementContainer();
339 elementContainer.ApplyElementMap(EMono.pc.uid, SourceValueType.Chara, a.elementMap, 1);
340 elementContainer.ApplyPotential(2);
341 t.note.Clear();
342 t.note.AddHeader(a.GetText().ToTitleCase(wholeText: true));
343 elementContainer.AddNoteAll(t.note);
344 t.note.AddHeader("lore");
345 t.note.AddText("NoteText_long", a.GetDetail().IsEmpty(TextUnknown)).Hyphenate();
346 AddDomain(t.note, new ElementContainer().ImportElementMap(a.domain), button: false);
347 AddWeaponSkill(t.note, elementContainer);
348 t.note.Build();
349 });
350 if (first)
351 {
352 TooltipManager.Instance.GetComponent<CanvasGroup>().alpha = 0f;
353 TooltipManager.Instance.GetComponent<CanvasGroup>().DOFade(1f, 0.3f);
354 EMono.core.actionsNextFrame.Add(delegate
355 {
357 });
358 }
359 first = false;
360 })
361 .SetTitles("wClass");
362 RectTransform rectTransform = EMono.ui.GetLayer<LayerList>().windows[0].Rect();
363 rectTransform.pivot = new Vector2(0.5f, 0.5f);
364 rectTransform.anchoredPosition = posList;
365 TweenUtil.Tween(0.3f, null, delegate
366 {
368 });
369 }
SourceValueType
List< Action > actionsNextFrame
Definition: BaseCore.cs:31
int uid
Definition: Card.cs:125
void ChangeJob(string idNew)
Definition: Chara.cs:2261
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:1594
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)
void AddWeaponSkill(UINote n, ElementContainer eles)
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(), AddWeaponSkill(), 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:264
int idPrologue
Definition: Game.cs:204
Weather.Condition weather
Definition: Prologue.cs:29
int month
Definition: Prologue.cs:17
int day
Definition: Prologue.cs:19
int year
Definition: Prologue.cs:15
UIText textMode
Definition: UICharaMaker.cs:52
string[] listMode
Definition: UICharaMaker.cs:61
void SetText(string s)
Definition: UIText.cs:163

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 AddWeaponSkill(t.note, elementContainer);
291 t.note.Space(8);
292 t.note.Build();
293 });
294 if (first)
295 {
296 TooltipManager.Instance.GetComponent<CanvasGroup>().alpha = 0f;
297 TooltipManager.Instance.GetComponent<CanvasGroup>().DOFade(1f, 0.3f);
298 EMono.core.actionsNextFrame.Add(delegate
299 {
301 });
302 }
303 first = false;
304 })
305 .SetTitles("wRace");
306 RectTransform rectTransform = EMono.ui.GetLayer<LayerList>().windows[0].Rect();
307 rectTransform.pivot = new Vector2(0.5f, 0.5f);
308 rectTransform.anchoredPosition = posList;
309 TweenUtil.Tween(0.3f, null, delegate
310 {
312 });
313 }
void ChangeRace(string idNew)
Definition: Chara.cs:2381

References BaseCore.actionsNextFrame, UINote.AddHeader(), ElementContainer.AddNoteAll(), UINote.AddText(), AddWeaponSkill(), 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 468 of file UICharaMaker.cs.

469 {
470 EMono.ui.AddLayer<LayerEditPortrait>().Activate(chara, chara.pccData, delegate
471 {
473 });
474 }
PCCData pccData
Definition: Chara.cs:67

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:516
string nameMom
Definition: Biography.cs:262
string TextAppearance()
Definition: Biography.cs:521
ElementContainerCard elements
Definition: Card.cs:42
SourceJob.Row job
Definition: Chara.cs:470
string Aka
Definition: Chara.cs:220
SourceRace.Row race
Definition: Chara.cs:468
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 id
Definition: ELEMENT.cs:257
bool HasTag(string tag)
Definition: ELEMENT.cs:480
Definition: FEAT.cs:333
static string _gender(int id)
Definition: Lang.cs:180
ElementContainer GetDomains()
Definition: Player.cs:1603
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 448 of file UICharaMaker.cs.

449 {
450 RerollBio(keepParent: false);
451 }

References RerollBio().

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

◆ RerollBio() [2/2]

void UICharaMaker.RerollBio ( bool  keepParent)
inline

Definition at line 453 of file UICharaMaker.cs.

454 {
455 bio.RerollBio(chara, ageIndex, keepParent);
456 Refresh();
457 }
void RerollBio(Chara c, int ageIndex=0, bool keepParent=false)
Definition: Biography.cs:392

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

◆ RerollHair()

void UICharaMaker.RerollHair ( )
inline

Definition at line 441 of file UICharaMaker.cs.

442 {
443 chara.pccData.SetRandomColor("hair");
446 }

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

◆ RerollJob()

void UICharaMaker.RerollJob ( )
inline

Definition at line 315 of file UICharaMaker.cs.

316 {
317 chara.ChangeJob(jobs.RandomItem(chara.job).id);
319 Refresh();
320 }

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 434 of file UICharaMaker.cs.

435 {
436 chara.pccData.Randomize(null, null, randomizeHairColor: false);
439 }

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 430 of file UICharaMaker.cs.

431 {
432 }

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: