Elin Decompiled Documentation EA 23.319 Nightly Patch 1
Loading...
Searching...
No Matches
WindowChara Class Reference
Inheritance diagram for WindowChara:
WindowController

Public Member Functions

void SetChara (Chara c)
 
override void OnSwitchContent (Window window)
 
void SetPortraitBG (int a)
 
void SetPortraitFrame (int a)
 
void ToggleFeatMode ()
 
void RefreshFeatMode ()
 
void Refresh ()
 
void RefreshStatic ()
 
void RefreshStatus ()
 
void AddNeeds (Stats st)
 
void AddStatus (BaseStats st)
 
void RefreshProfile ()
 
void RefreshEquipment (UIList list, bool sort=true)
 
void RefreshInfo ()
 
void OnClickPortrait ()
 
void RefreshSkill (int idTab)
 
virtual void OnSwitchContent (Window window)
 

Static Public Member Functions

static void RefreshNote (Chara chara, UINote n, bool shortMode=false)
 

Public Attributes

Chara chara
 
Portrait portrait
 
UIText textMood
 
UIText textHealth
 
UIText textName
 
UIText textAlias
 
UIText textTitle
 
UIText textBio
 
UIText textBio2
 
UIText textBio3
 
UIText textBirthday
 
UIText textFaction
 
UIText textFaith
 
UIText textHome
 
UIText textMom
 
UIText textDad
 
UIText textBirthplace
 
UIText textLike
 
UIText textHobby
 
UIText textKarma
 
UIText textSAN
 
UIText textFame
 
UIText textMoney
 
UIText textTax
 
UIText textTerritory
 
UIText textIncome
 
UIText textAssets
 
UIText textDeposit
 
UIText textDeepest
 
UIText textCurrentZone
 
UIText textHomeZone
 
UIList listAttaribute
 
UIList listEquipment
 
UIList listEquipment2
 
UINote note
 
PUIExampleRPGStats graph
 
UIText textStability
 
UIText textLaw
 
UIText textAffection
 
UIText textDominance
 
UIText textExtroversion
 
UIText textFavArmor
 
UIText textDV
 
UIText textStyle
 
LayoutGroup layoutNeeds
 
LayoutGroup layoutStatus
 
GridLayoutGroup gridEquip
 
UIScrollView scrollSkill
 
ButtonElement buttonMana
 
ButtonElement buttonLife
 
ButtonElement buttonVigor
 
ButtonElement buttonSpeed
 
UIItem moldStats
 
UIItem moldNeeds
 
UIHeader moldHeader
 
UIHeader moldHeader2
 
UIHeader headerEquip
 
UIList moldListSkill
 
UIList moldListResist
 
UIList moldListFeat
 
UIList moldListFeatPurchase
 
Transform contentList
 
RectTransform rectEquip
 
UIButton buttonFeatMode
 
UIButton buttonFeatOption
 
Image imageView
 
Sprite mask
 
Sprite maskResist
 
Material matItem
 
Color colorUnequipped
 
Vector2 equipPos
 
bool featMode
 
float barColor1
 
float barColor2
 
- Public Attributes inherited from WindowController
Window window
 

Static Public Attributes

static WindowChara Instance
 

Properties

Biography bio [get]
 

Private Member Functions

void Update ()
 
void OnApplicationFocus (bool focus)
 

Private Attributes

UIHeader _header
 

Detailed Description

Definition at line 8 of file WindowChara.cs.

Member Function Documentation

◆ AddNeeds()

void WindowChara.AddNeeds ( Stats  st)
inline

Definition at line 315 of file WindowChara.cs.

316 {
318 uIItem.text1.SetText(st.source.GetName());
319 if (st.GetText().IsEmpty())
320 {
321 uIItem.text2.SetActive(enable: false);
322 }
323 else
324 {
325 st.SetText(uIItem.text2);
326 }
327 UIBar componentInChildren = uIItem.GetComponentInChildren<UIBar>();
328 componentInChildren.Refresh(st.value, st.max);
329 componentInChildren.image.color = st.GetColor().Multiply(barColor1, barColor2);
330 }
virtual void SetText(UIText t, SkinColorProfile cols=null)
Definition: BaseStats.cs:81
SourceStat.Row source
Definition: BaseStats.cs:16
override string GetText()
Definition: Stats.cs:94
override Color GetColor(Gradient g)
Definition: Stats.cs:104
virtual int value
Definition: Stats.cs:56
virtual int max
Definition: Stats.cs:68
Definition: UIBar.cs:5
void Refresh(float current, float max)
Definition: UIBar.cs:12
Definition: UIItem.cs:5
UIText text2
Definition: UIItem.cs:8
UIText text1
Definition: UIItem.cs:6
void SetText(string s)
Definition: UIText.cs:163
Definition: Util.cs:10
static Transform Instantiate(string path, Component parent=null)
Definition: Util.cs:67
UIItem moldNeeds
Definition: WindowChara.cs:118
float barColor1
Definition: WindowChara.cs:156
LayoutGroup layoutNeeds
Definition: WindowChara.cs:100
float barColor2
Definition: WindowChara.cs:158

References barColor1, barColor2, Stats.GetColor(), Stats.GetText(), layoutNeeds, Stats.max, moldNeeds, UIBar.Refresh(), UIText.SetText(), BaseStats.SetText(), BaseStats.source, UIItem.text1, UIItem.text2, Util, and Stats.value.

◆ AddStatus()

void WindowChara.AddStatus ( BaseStats  st)
inline

Definition at line 332 of file WindowChara.cs.

333 {
334 string text = st?.GetText() ?? "noItem".lang();
335 if (text.IsEmpty())
336 {
337 return;
338 }
340 if (st == null)
341 {
342 uIItem.text1.SetText(text, FontColor.Passive);
343 uIItem.button1.interactable = false;
344 }
345 else if (text.IsEmpty())
346 {
347 uIItem.text1.SetText(st.source.GetName());
348 }
349 else
350 {
351 st.SetText(uIItem.text1);
352 uIItem.image1.sprite = st.GetSprite();
353 uIItem.image1.SetNativeSize();
354 }
355 if (st != null)
356 {
357 uIItem.button1.SetTooltip(delegate(UITooltip t)
358 {
359 st.WriteNote(t.note);
360 });
361 }
362 }
FontColor
Definition: FontColor.cs:2
virtual Sprite GetSprite()
Definition: BaseStats.cs:76
virtual void WriteNote(UINote n, Action< UINote > onWriteNote=null)
Definition: BaseStats.cs:112
virtual string GetText()
Definition: BaseStats.cs:56
void SetTooltip(Action< UITooltip > onShowTooltip=null, bool enable=true)
Definition: UIButton.cs:361
UIButton button1
Definition: UIItem.cs:18
Image image1
Definition: UIItem.cs:14
UINote note
Definition: UITooltip.cs:21
LayoutGroup layoutStatus
Definition: WindowChara.cs:102
UIItem moldStats
Definition: WindowChara.cs:116

References UIItem.button1, BaseStats.GetSprite(), BaseStats.GetText(), UIItem.image1, layoutStatus, moldStats, UITooltip.note, UIText.SetText(), BaseStats.SetText(), UIButton.SetTooltip(), BaseStats.source, UIItem.text1, Util, and BaseStats.WriteNote().

Referenced by RefreshStatus().

◆ OnApplicationFocus()

void WindowChara.OnApplicationFocus ( bool  focus)
inlineprivate

Definition at line 890 of file WindowChara.cs.

891 {
892 if (focus && window.idTab == 5)
893 {
895 }
896 }
Chara chara
Definition: WindowChara.cs:12
static void RefreshNote(Chara chara, UINote n, bool shortMode=false)
Definition: WindowChara.cs:898
UINote note
Definition: WindowChara.cs:80
int idTab
Definition: Window.cs:694

◆ OnClickPortrait()

void WindowChara.OnClickPortrait ( )
inline

Definition at line 494 of file WindowChara.cs.

495 {
496 if (chara.IsPC)
497 {
498 EClass.ui.AddLayer<LayerEditPCC>("LayerPCC/LayerEditPCC").Activate(chara, UIPCC.Mode.Body, null, delegate
499 {
501 });
502 }
503 else
504 {
505 SE.Beep();
506 }
507 }
override bool IsPC
Definition: Chara.cs:630
Definition: EClass.cs:6
static UI ui
Definition: EClass.cs:17
void SetChara(Chara c, PCCData pccData=null)
Definition: Portrait.cs:143
Portrait portrait
Definition: WindowChara.cs:14

References chara, Chara.IsPC, portrait, Portrait.SetChara(), and EClass.ui.

◆ OnSwitchContent()

override void WindowChara.OnSwitchContent ( Window  window)
inlinevirtual

Reimplemented from WindowController.

Definition at line 185 of file WindowChara.cs.

186 {
187 if (chara != null)
188 {
190 int idTab = window.idTab;
191 if (idTab == 0)
192 {
193 RefreshInfo();
195 }
196 else
197 {
198 RefreshSkill(idTab);
199 }
200 bool flag = idTab == 3 || idTab == 4;
201 scrollSkill.horizontal = flag;
202 scrollSkill.content.anchoredPosition = new Vector2(0f, 0f);
203 imageView.sprite = (flag ? maskResist : mask);
204 if (flag)
205 {
207 }
208 listEquipment2.transform.parent.SetActive(flag);
209 buttonFeatMode.SetActive(idTab == 2 && chara.IsPC);
210 buttonFeatOption.SetActive(idTab == 2 && chara.IsPC && featMode);
211 }
212 }
UIList parent
Definition: UIList.cs:293
Sprite maskResist
Definition: WindowChara.cs:146
void RefreshProfile()
Definition: WindowChara.cs:364
Sprite mask
Definition: WindowChara.cs:144
UIButton buttonFeatOption
Definition: WindowChara.cs:140
UIList listEquipment2
Definition: WindowChara.cs:78
void RefreshStatic()
Definition: WindowChara.cs:263
void RefreshEquipment(UIList list, bool sort=true)
Definition: WindowChara.cs:397
void RefreshSkill(int idTab)
Definition: WindowChara.cs:509
void RefreshInfo()
Definition: WindowChara.cs:478
UIButton buttonFeatMode
Definition: WindowChara.cs:138

References buttonFeatMode, buttonFeatOption, chara, featMode, Window.idTab, Chara.IsPC, listEquipment2, mask, maskResist, UIList.parent, RefreshEquipment(), RefreshInfo(), RefreshProfile(), RefreshSkill(), RefreshStatic(), and WindowController.window.

Referenced by Refresh(), and SetChara().

◆ Refresh()

void WindowChara.Refresh ( )
inline

Definition at line 258 of file WindowChara.cs.

259 {
261 }
override void OnSwitchContent(Window window)
Definition: WindowChara.cs:185

References OnSwitchContent(), and WindowController.window.

Referenced by LayerChara.Refresh().

◆ RefreshEquipment()

void WindowChara.RefreshEquipment ( UIList  list,
bool  sort = true 
)
inline

Definition at line 397 of file WindowChara.cs.

398 {
399 string text = chara.GetFavWeaponSkill()?.Name ?? Element.Get(100).GetText();
400 text = text + "/" + (chara.GetFavArmorSkill()?.Name ?? Element.Get(120).GetText());
401 textFavArmor.SetText(text);
402 list.Clear();
403 list.callbacks = new UIList.Callback<BodySlot, UIItem>
404 {
405 onClick = delegate
406 {
407 },
408 onInstantiate = delegate(BodySlot a, UIItem b)
409 {
410 if (a.elementId == 0)
411 {
412 b.button1.interactable = false;
413 }
414 else
415 {
416 Thing thing = (Thing)(b.refObj = a.thing);
417 if (thing != null)
418 {
419 b.button1.icon.material = matItem;
420 thing.SetImage(b.button1.icon);
421 }
422 else
423 {
424 b.button1.icon.material = null;
425 b.button1.icon.sprite = SpriteSheet.Get("Media/Graphics/Icon/Element/", "eq_" + a.element.alias);
426 b.button1.icon.color = colorUnequipped;
427 b.button1.icon.SetNativeSize();
428 }
429 b.button1.SetTooltip(delegate(UITooltip tt)
430 {
431 if (a.thing != null)
432 {
433 a.thing.WriteNote(tt.note);
434 }
435 else
436 {
437 tt.note.Clear();
438 tt.note.AddHeader(a.name);
439 tt.note.AddText("noEQ".lang());
440 if (a.elementId == 35)
441 {
443 }
444 }
445 tt.note.Build();
446 });
447 }
448 },
449 onSort = (BodySlot a, UIList.SortMode m) => (a.element.id != 0) ? chara.body.GetSortVal(a) : (-99999)
450 };
451 foreach (BodySlot slot in chara.body.slots)
452 {
453 if (slot.elementId != 44)
454 {
455 list.Add(slot);
456 }
457 }
458 if (list.items.Count < 12)
459 {
460 int num = 12 - list.items.Count;
461 for (int i = 0; i < num; i++)
462 {
463 list.Add(new BodySlot());
464 }
465 }
466 if (list.items.Count > 18)
467 {
468 gridEquip.cellSize = new Vector2(52f, 44f);
469 gridEquip.spacing = new Vector2(-6f, -12f);
470 }
471 if (sort)
472 {
473 list.Sort();
474 }
475 list.Refresh();
476 }
string name
Definition: BodySlot.cs:14
int elementId
Definition: BodySlot.cs:6
Thing thing
Definition: BodySlot.cs:8
SourceElement.Row element
Definition: BodySlot.cs:16
void SetImage(Image image, int dir, int idSkin=0)
Definition: Card.cs:6503
List< BodySlot > slots
Definition: CharaBody.cs:8
int GetSortVal(BodySlot slot)
Definition: CharaBody.cs:522
CharaBody body
Definition: Chara.cs:94
Element GetFavWeaponSkill()
Definition: Chara.cs:4825
Element GetFavArmorSkill()
Definition: Chara.cs:4830
static SourceElement.Row Get(int id)
Definition: ELEMENT.cs:408
virtual string Name
Definition: ELEMENT.cs:311
static Sprite Get(string id)
Definition: SpriteSheet.cs:28
Definition: Thing.cs:8
override void WriteNote(UINote n, Action< UINote > onWriteNote=null, IInspect.NoteMode mode=IInspect.NoteMode.Default, Recipe recipe=null)
Definition: Thing.cs:899
static void AddAttackEvaluation(UINote n, Chara chara, Thing current=null)
Definition: Thing.cs:1508
Image icon
Definition: UIButton.cs:110
object refObj
Definition: UIItem.cs:30
Definition: UIList.cs:9
List< object > items
Definition: UIList.cs:273
override void Clear()
Definition: UIList.cs:401
SortMode
Definition: UIList.cs:27
override void Add(object item)
Definition: UIList.cs:354
virtual void Refresh(bool highlightLast=false)
Definition: UIList.cs:476
void Sort()
Definition: UIList.cs:749
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
UIText textFavArmor
Definition: WindowChara.cs:94
Color colorUnequipped
Definition: WindowChara.cs:150
Material matItem
Definition: WindowChara.cs:148

References Thing.AddAttackEvaluation(), UINote.AddHeader(), UINote.AddText(), Chara.body, UINote.Build(), UIItem.button1, chara, UIList.Clear(), UINote.Clear(), colorUnequipped, BodySlot.element, BodySlot.elementId, Element.Get(), SpriteSheet.Get(), Chara.GetFavArmorSkill(), Chara.GetFavWeaponSkill(), CharaBody.GetSortVal(), UIButton.icon, matItem, BodySlot.name, Element.Name, UITooltip.note, UIItem.refObj, Card.SetImage(), UIText.SetText(), UIButton.SetTooltip(), CharaBody.slots, textFavArmor, BodySlot.thing, and Thing.WriteNote().

Referenced by OnSwitchContent(), and RefreshProfile().

◆ RefreshFeatMode()

void WindowChara.RefreshFeatMode ( )
inline

Definition at line 250 of file WindowChara.cs.

251 {
252 buttonFeatMode.mainText.text = "featMode".lang(EClass.pc.feat.ToString() ?? "");
253 ColorBlock colors = buttonFeatMode.colors;
254 colors.normalColor = colors.normalColor.SetAlpha(featMode ? 1 : 0);
255 buttonFeatMode.colors = colors;
256 }
int feat
Definition: Card.cs:377
static Chara pc
Definition: EClass.cs:15

References buttonFeatMode, Card.feat, featMode, and EClass.pc.

◆ RefreshInfo()

void WindowChara.RefreshInfo ( )
inline

Definition at line 478 of file WindowChara.cs.

479 {
480 if (ModUtil.TryGetContent<CustomBiographyContent>("Biography/" + chara.id, out var content))
481 {
482 content.RefreshCharaBio(chara);
483 }
484 textBirthday.text = bio.TextBirthDate(chara);
485 textMom.text = bio.nameMom.ToTitleCase().Trim();
486 textDad.text = bio.nameDad.ToTitleCase().Trim();
487 textBirthplace.text = bio.nameBirthplace.ToTitleCase();
488 textLike.text = EClass.sources.cards.map.TryGetValue(bio.idLike, "ash").GetName();
489 textHobby.text = EClass.sources.elements.map.TryGetValue(bio.idHobby, 100).GetText();
490 textFaction.text = ((chara.faction == null) ? "???" : chara.faction.name.ToTitleCase());
491 textFaith.text = chara.faith.Name.ToTitleCase();
492 }
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 idLike
Definition: Biography.cs:17
int idHobby
Definition: Biography.cs:173
string id
Definition: Card.cs:36
Faction faction
Definition: Chara.cs:431
Religion faith
Definition: Chara.cs:443
static SourceManager sources
Definition: EClass.cs:43
string name
Definition: FACTION.cs:135
virtual string Name
Definition: Religion.cs:30
Dictionary< string, CardRow > map
Definition: SourceCard.cs:9
SourceCard cards
SourceElement elements
Biography bio
Definition: WindowChara.cs:162

References bio, SourceManager.cards, chara, SourceManager.elements, Chara.faction, Chara.faith, Card.id, Biography.idHobby, Biography.idLike, SourceCard.map, Faction.name, Religion.Name, Biography.nameBirthplace, Biography.nameDad, Biography.nameMom, EClass.sources, and Biography.TextBirthDate().

Referenced by OnSwitchContent().

◆ RefreshNote()

static void WindowChara.RefreshNote ( Chara  chara,
UINote  n,
bool  shortMode = false 
)
inlinestatic

Definition at line 898 of file WindowChara.cs.

899 {
900 n.Clear();
901 Biography biography = chara.bio;
902 if (shortMode)
903 {
904 n.AddText(biography.TextBio(chara) + " " + biography.TextBio2(chara));
905 n.Space();
906 }
907 else
908 {
909 UIItem uIItem = n.AddItem("ItemBackground");
910 if (chara.IsPC)
911 {
913 uIItem.button1.SetOnClick(delegate
914 {
916 });
917 }
918 else
919 {
920 string text = "???";
921 if (ModUtil.TryGetContent<CustomBiographyContent>("Biography/" + chara.id, out var content))
922 {
923 content.RefreshCharaBio(chara);
924 text = content.background;
925 }
926 uIItem.text1.SetText(text);
927 uIItem.button1.SetActive(enable: false);
928 }
929 n.Space(16);
930 n.AddTopic("TopicDomain", "profile".lang(), biography.TextBio(chara) + " " + biography.TextBio2(chara));
931 }
932 string text2 = "";
933 ElementContainer elementContainer = (chara.IsPC ? EClass.player.GetDomains() : new ElementContainer().ImportElementMap(chara.job.domain));
934 foreach (Element value in elementContainer.dict.Values)
935 {
936 text2 = text2 + ((value == elementContainer.dict.Values.First()) ? "" : ", ") + value.Name;
937 }
938 n.AddTopic("TopicDomain", "domain".lang(), text2).button1.SetActive(enable: false);
939 string text3 = chara.GetFavCat().GetName();
940 string @ref = chara.GetFavFood().GetName();
941 Add("favgift".lang(text3.ToLower().ToTitleCase(), @ref));
942 Add(chara.GetTextHobby());
943 Add(chara.GetTextWork());
944 if (chara.IsPC)
945 {
946 n.AddTopic("TopicDomain", "totalFeat".lang(), EClass.player.totalFeat.ToString() ?? "");
947 }
948 text2 = chara.GetFavWeaponSkill()?.Name ?? Element.Get(100).GetText();
949 text2 = text2 + " / " + ("style" + chara.GetFavAttackStyle()).lang();
950 n.AddTopic("TopicDomain", "attackStyle".lang(), text2);
951 n.AddTopic("TopicDomain", "armorStyle".lang(), chara.GetFavArmorSkill()?.Name ?? Element.Get(120).GetText());
952 bool textAdded = false;
953 if (chara.IsPC && EClass.pc.c_daysWithGod > 0)
954 {
955 AddText("info_daysWithGod".lang(EClass.pc.c_daysWithGod.ToString() ?? "", EClass.pc.faith.Name));
956 }
957 if (chara.ride != null)
958 {
959 AddText("info_ride".lang(chara.ride.NameBraced));
960 }
961 if (chara.parasite != null)
962 {
963 AddText("info_parasite".lang(chara.parasite.NameBraced));
964 }
966 {
967 AddText("info_criminal".lang());
968 }
969 if (!chara.IsPC)
970 {
971 int num = chara.GetAffinityExpBonus() - 100;
972 if (num != 0)
973 {
974 AddText("affinity_exp_bonus".lang(chara.affinity.Name, ((num > 0) ? "+" : "") + num));
975 }
976 if (chara.c_daysWithPC > 0)
977 {
978 num = chara.GetDaysTogetherBonus() - 100;
979 AddText("info_daysWithPC".lang(chara.c_daysWithPC.ToString() ?? "") + Environment.NewLine + "daystogether_bonus".lang(((num > 0) ? "+" : "") + num));
980 }
981 }
982 if (chara.IsPC)
983 {
984 List<Chara> list = new List<Chara>();
985 foreach (Chara value2 in EClass.game.cards.globalCharas.Values)
986 {
987 if (value2.IsMarried)
988 {
989 list.Add(value2);
990 }
991 }
992 if (list.Count > 0)
993 {
994 if (textAdded)
995 {
996 n.Space(12);
997 }
998 n.AddTopic("TopicDomain", "history_marriage".lang(), "");
999 foreach (Chara item in list)
1000 {
1001 Date date = Date.ToDate(item.c_love.dateMarriage);
1002 AddText("item_marriage".lang(item.NameBraced, date.year.ToString() ?? "", date.month.ToString() ?? "", item.c_love.nameZoneMarriage, date.day.ToString() ?? "") + (item.c_love.IsWed ? "already_wed".lang() : ""));
1003 }
1004 }
1005 }
1007 {
1008 n.AddText("LV:" + chara.LV + " exp:" + chara.exp + " next:" + chara.ExpToNext);
1009 n.AddText("Luck:" + chara.Evalue(78));
1010 }
1011 n.Build();
1012 void Add(string s)
1013 {
1014 string[] array = s.Split(':');
1015 n.AddTopic("TopicDomain", array[0], (array.Length >= 2) ? array[1].TrimStart(' ') : "").button1.SetActive(enable: false);
1016 }
1017 void AddText(string s)
1018 {
1019 n.AddText(" ・ " + s);
1020 textAdded = true;
1021 }
1022 }
string Name
Definition: Affinity.cs:34
string TextBio(Chara c)
Definition: Biography.cs:501
string TextBio2(Chara c)
Definition: Biography.cs:506
GlobalCharaList globalCharas
Definition: CardManager.cs:46
int ExpToNext
Definition: Card.cs:2060
int GetAffinityExpBonus()
Definition: Card.cs:3132
Biography bio
Definition: Card.cs:45
int c_daysWithGod
Definition: Card.cs:1513
int exp
Definition: Card.cs:401
int c_daysWithPC
Definition: Card.cs:1525
int GetDaysTogetherBonus()
Definition: Card.cs:3137
int Evalue(int ele)
Definition: Card.cs:2688
int LV
Definition: Card.cs:389
Definition: Chara.cs:10
SourceCategory.Row GetFavCat()
Definition: Chara.cs:8362
SourceJob.Row job
Definition: Chara.cs:470
string NameBraced
Definition: Chara.cs:520
SourceThing.Row GetFavFood()
Definition: Chara.cs:8334
Chara parasite
Definition: Chara.cs:30
Chara ride
Definition: Chara.cs:27
Affinity affinity
Definition: Chara.cs:318
bool IsMarried
Definition: Chara.cs:615
string GetTextWork(bool simple=false)
Definition: Chara.cs:9456
string GetTextHobby(bool simple=false)
Definition: Chara.cs:9446
AttackStyle GetFavAttackStyle()
Definition: Chara.cs:4805
bool showExtra
Definition: CoreDebug.cs:183
Definition: Date.cs:4
int month
Definition: Date.cs:50
static Date ToDate(int raw)
Definition: Date.cs:399
int day
Definition: Date.cs:62
int year
Definition: Date.cs:38
static Game game
Definition: EClass.cs:9
static Player player
Definition: EClass.cs:13
static CoreDebug debug
Definition: EClass.cs:49
Dictionary< int, Element > dict
void ImportElementMap(Dictionary< int, int > map)
CardManager cards
Definition: Game.cs:156
bool IsCriminal
Definition: Player.cs:1409
ElementContainer GetDomains()
Definition: Player.cs:1603
int totalFeat
Definition: Player.cs:972
string GetBackgroundText()
Definition: Player.cs:1694
void EditBackgroundText()
Definition: Player.cs:1715
UIItem AddItem(string id)
Definition: UINote.cs:139
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 UINote.AddItem(), UINote.AddText(), UINote.AddTopic(), Chara.affinity, Card.bio, UIItem.button1, Card.c_daysWithGod, Card.c_daysWithPC, Game.cards, UINote.Clear(), Date.day, EClass.debug, Player.EditBackgroundText(), Card.Evalue(), Card.exp, Card.ExpToNext, Chara.faith, EClass.game, Element.Get(), Card.GetAffinityExpBonus(), Player.GetBackgroundText(), Card.GetDaysTogetherBonus(), Player.GetDomains(), Chara.GetFavArmorSkill(), Chara.GetFavAttackStyle(), Chara.GetFavCat(), Chara.GetFavFood(), Chara.GetFavWeaponSkill(), Chara.GetTextHobby(), Chara.GetTextWork(), CardManager.globalCharas, Card.id, ElementContainer.ImportElementMap(), Player.IsCriminal, Chara.IsMarried, Chara.IsPC, item, Chara.job, Card.LV, Date.month, Affinity.Name, Element.Name, Religion.Name, Chara.NameBraced, Chara.parasite, EClass.pc, EClass.player, Chara.ride, UIText.SetText(), CoreDebug.showExtra, UINote.Space(), UIItem.text1, Biography.TextBio(), Biography.TextBio2(), Date.ToDate(), Player.totalFeat, and Date.year.

◆ RefreshProfile()

void WindowChara.RefreshProfile ( )
inline

Definition at line 364 of file WindowChara.cs.

365 {
367 textName.text = chara.NameSimple;
368 textAlias.text = chara.Aka;
369 textTitle.text = (chara.IsPC ? EClass.player.title : "-");
370 textCurrentZone.text = ((chara.currentZone == null) ? "???" : chara.currentZone.Name);
371 textHomeZone.text = ((chara.homeZone == null) ? "???" : chara.homeZone.Name);
372 textBio.text = chara.job.GetText().ToTitleCase();
373 textBio2.text = bio.TextBio(chara);
374 textBio3.text = bio.TextBio2(chara);
375 textDV.text = "_DV".lang(chara.DV.ToString() ?? "", chara.PV.ToString() ?? "");
376 textStyle.text = "_style".lang(Lang._weight(chara.body.GetWeight(armorOnly: true)) ?? "", chara.elements.GetOrCreateElement(chara.GetArmorSkill()).Name, ("style" + chara.body.GetAttackStyle()).lang());
377 textKarma.text = (chara.IsPC ? (EClass.player.karma.ToString() ?? "") : "???");
378 textSAN.text = chara.SAN.value.ToString() ?? "";
379 textFame.text = (chara.IsPC ? (EClass.player.fame.ToFormat() ?? "") : "???");
380 textMoney.text = Lang._currency(chara.GetCurrency(), showUnit: true);
381 textDeposit.text = Lang._currency(chara.IsPC ? EClass.game.cards.container_deposit.GetCurrency() : chara.c_allowance, showUnit: true);
382 string text = "deepestLv2".lang((chara.IsPCFaction ? EClass.player.stats.deepest : chara.LV).ToString() ?? "");
383 if (chara.IsPCFaction && EClass.player.CountKeyItem("license_void") > 0)
384 {
385 text = text + " " + "deepestLv3".lang(EClass.player.stats.deepestVoid.ToString() ?? "");
386 }
387 textDeepest.text = text;
388 textAssets.text = (chara.IsPC ? "tGameTime".lang(EClass.player.stats.days.ToFormat(), EClass.player.stats.turns.ToFormat()) : "???");
389 textTerritory.text = (chara.IsPC ? (EClass.pc.faction.CountTerritories().ToString() ?? "") : "???");
395 }
void SetElement(Element _e, ElementContainer _owner, Mode _mode=Mode.Skill)
Thing container_deposit
Definition: CardManager.cs:58
ElementContainerCard elements
Definition: Card.cs:42
int GetCurrency(string id="money")
Definition: Card.cs:4133
int c_allowance
Definition: Card.cs:1357
string NameSimple
Definition: Card.cs:2193
AttackStyle GetAttackStyle()
Definition: CharaBody.cs:479
int GetWeight(bool armorOnly=false)
Definition: CharaBody.cs:436
override int GetArmorSkill()
Definition: Chara.cs:8165
override bool IsPCFaction
Definition: Chara.cs:689
override int DV
Definition: Chara.cs:747
Zone currentZone
Definition: Chara.cs:259
string Aka
Definition: Chara.cs:220
Stats SAN
Definition: Chara.cs:1193
override int PV
Definition: Chara.cs:776
Zone homeZone
Definition: Chara.cs:271
Element GetOrCreateElement(Element ele)
int CountTerritories()
Definition: FACTION.cs:229
Definition: Lang.cs:7
static string _weight(int a, int b, bool showUnit=true, int unitSize=0)
Definition: Lang.cs:171
static string _currency(object a, string IDCurrency)
Definition: Lang.cs:161
int deepest
Definition: Player.cs:114
int turns
Definition: Player.cs:84
int deepestVoid
Definition: Player.cs:117
int days
Definition: Player.cs:75
int karma
Definition: Player.cs:945
Stats stats
Definition: Player.cs:1083
int CountKeyItem(string alias)
Definition: Player.cs:2240
int fame
Definition: Player.cs:948
virtual string Name
Definition: Spatial.cs:509
ButtonElement buttonVigor
Definition: WindowChara.cs:112
ButtonElement buttonMana
Definition: WindowChara.cs:108
ButtonElement buttonLife
Definition: WindowChara.cs:110
void RefreshStatus()
Definition: WindowChara.cs:297
UIList listEquipment
Definition: WindowChara.cs:76
ButtonElement buttonSpeed
Definition: WindowChara.cs:114

References Lang._currency(), Lang._weight(), Chara.Aka, bio, Chara.body, buttonLife, buttonMana, buttonSpeed, buttonVigor, Card.c_allowance, Game.cards, chara, CardManager.container_deposit, Player.CountKeyItem(), Faction.CountTerritories(), Chara.currentZone, Player.Stats.days, Player.Stats.deepest, Player.Stats.deepestVoid, Chara.DV, Card.elements, Chara.faction, Player.fame, EClass.game, Chara.GetArmorSkill(), CharaBody.GetAttackStyle(), Card.GetCurrency(), ElementContainer.GetOrCreateElement(), CharaBody.GetWeight(), Chara.homeZone, Chara.IsPC, Chara.IsPCFaction, Chara.job, Player.karma, listEquipment, Card.LV, Spatial.Name, Card.NameSimple, EClass.pc, EClass.player, Chara.PV, RefreshEquipment(), RefreshStatus(), Chara.SAN, ButtonElement.SetElement(), Player.stats, Biography.TextBio(), Biography.TextBio2(), Player.Stats.turns, and Stats.value.

Referenced by OnSwitchContent().

◆ RefreshSkill()

void WindowChara.RefreshSkill ( int  idTab)
inline

Definition at line 509 of file WindowChara.cs.

510 {
511 contentList.DestroyChildren();
512 note.Clear();
513 note.RebuildLayout();
514 UIList list = default(UIList);
515 if (idTab == 1)
516 {
517 List("skillsGeneral", "general");
518 List("skillsCraft", "craft");
519 List("skillsCombat", "combat");
520 List("skillsWeapon", "weapon");
521 }
522 else if (idTab == 2)
523 {
525 if (featMode)
526 {
527 List("availableFeats", "general");
528 List("availableFeats_special", "special");
529 List("availableFeats_skill", "skill");
530 List("availableFeats_attribute", "attribute");
531 return;
532 }
533 if (chara.IsPC && chara.HasElement(1274) && chara.c_genes != null && chara.c_genes.items.Count > 0)
534 {
535 Header("genes".lang() + " " + EClass.pc.CurrentGeneSlot + "/" + EClass.pc.MaxGeneSlot, null);
536 ListFeat();
537 list.callbacks = new UIList.Callback<DNA, ButtonElement>
538 {
539 onClick = delegate
540 {
541 SE.Beep();
542 },
543 onInstantiate = delegate(DNA a, ButtonElement b)
544 {
545 b.mainText.SetText(a.GetText());
546 b.SetTooltip(delegate(UITooltip t)
547 {
548 UINote uINote = t.note;
549 uINote.Clear();
550 uINote.AddHeader(a.GetText());
551 a.WriteNote(uINote);
552 t.note.Build();
553 });
554 b.subText.text = "(" + a.slot + ")";
555 b.subText.SetActive(enable: true);
556 b.imagePotential.SetActive(enable: false);
557 },
558 onList = delegate
559 {
560 foreach (DNA item in chara.c_genes.items)
561 {
562 list.Add(item);
563 }
564 }
565 };
566 list.List();
567 }
568 Header("mutation", null);
569 ListFeat();
570 list.callbacks = new UIList.Callback<Feat, ButtonElement>
571 {
572 onClick = delegate(Feat a, ButtonElement b)
573 {
576 },
577 onInstantiate = delegate(Feat a, ButtonElement b)
578 {
580 },
581 onList = delegate
582 {
583 foreach (Element item2 in chara.elements.ListElements((Element a) => a.source.category == "mutation" && a.Value != 0))
584 {
585 list.Add(item2);
586 }
587 }
588 };
589 list.List();
590 if (list.items.Count == 0)
591 {
592 _header.SetActive(enable: false);
593 list.SetActive(enable: false);
594 }
595 Header("etherDisease", null);
596 ListFeat();
597 list.callbacks = new UIList.Callback<Feat, ButtonElement>
598 {
599 onClick = delegate(Feat a, ButtonElement b)
600 {
603 },
604 onInstantiate = delegate(Feat a, ButtonElement b)
605 {
607 },
608 onList = delegate
609 {
610 foreach (Element item3 in chara.elements.ListElements((Element a) => a.source.category == "ether" && a.Value != 0))
611 {
612 list.Add(item3);
613 }
614 }
615 };
616 list.List();
617 if (list.items.Count == 0)
618 {
619 _header.SetActive(enable: false);
620 list.SetActive(enable: false);
621 }
622 Header("innateFeats", null);
623 ListFeat();
624 list.callbacks = new UIList.Callback<Feat, ButtonElement>
625 {
626 onClick = delegate(Feat a, ButtonElement b)
627 {
630 },
631 onInstantiate = delegate(Feat a, ButtonElement b)
632 {
634 },
635 onList = delegate
636 {
637 foreach (Element item4 in chara.elements.ListElements((Element a) => a.source.category == "feat" && a.HasTag("innate") && a.Value != 0))
638 {
639 list.Add(item4);
640 }
641 }
642 };
643 list.List();
644 Header("feats", null);
645 ListFeat();
646 list.callbacks = new UIList.Callback<Feat, ButtonElement>
647 {
648 onClick = delegate(Feat a, ButtonElement b)
649 {
652 },
653 onInstantiate = delegate(Feat a, ButtonElement b)
654 {
656 },
657 onList = delegate
658 {
659 foreach (Element item5 in chara.elements.ListElements((Element a) => a.source.category == "feat" && !a.HasTag("innate") && a.Value != 0))
660 {
661 list.Add(item5);
662 }
663 },
664 onSort = (Feat a, UIList.SortMode m) => a.GetSortVal(m)
665 };
666 list.ChangeSort(UIList.SortMode.ByID);
667 list.List();
668 }
669 else if (idTab == 3)
670 {
671 Header("resistance", null);
672 headerEquip.SetText("resistance".lang());
673 ListResist();
674 list.callbacks = new UIList.Callback<Element, ButtonElement>
675 {
676 onInstantiate = delegate(Element a, ButtonElement b)
677 {
678 b.SetGrid(a, chara);
679 },
680 onList = delegate
681 {
682 foreach (SourceElement.Row item6 in EClass.sources.elements.rows.Where((SourceElement.Row a) => a.category == "resist" && ((!a.tag.Contains("hidden") && !a.tag.Contains("high")) || chara.Evalue(a.id) != 0)))
683 {
684 list.Add(chara.elements.GetOrCreateElement(item6.id));
685 }
686 }
687 };
688 list.List();
689 }
690 else if (idTab == 4)
691 {
693 List<Element> eles = chara.elements.ListElements(delegate(Element a)
694 {
695 if (a.source.tag.Contains("godAbility") || a.source.categorySub == "god")
696 {
697 return false;
698 }
699 if (a.IsFlag)
700 {
701 if (a.Value == 0)
702 {
703 return false;
704 }
705 }
706 else
707 {
708 if (a.vSource != 0)
709 {
710 if (a.source.IsWeaponEnc)
711 {
712 return true;
713 }
714 int id = a.id;
715 if ((uint)(id - 55) <= 2u || id == 68 || id == 93)
716 {
717 return true;
718 }
719 if (a.source.category == "enchant")
720 {
721 return true;
722 }
723 }
724 if ((a.owner == chara.elements && a.vLink == 0 && !a.IsFactionElement(chara)) || a.source.category == "resist")
725 {
726 return false;
727 }
728 }
729 return true;
730 });
731 eles.Sort((Element a, Element b) => a.SortVal(charaSheet: true) - b.SortVal(charaSheet: true));
732 string[] skillCats = new string[7] { "general", "labor", "mind", "stealth", "combat", "craft", "weapon" };
733 Header("enchant", null);
734 headerEquip.SetText("enchant".lang());
735 ListResist();
736 list.callbacks = new UIList.Callback<Element, ButtonElement>
737 {
738 onInstantiate = delegate(Element a, ButtonElement b)
739 {
740 b.SetGrid(a, chara);
741 },
742 onList = delegate
743 {
744 foreach (Element item7 in eles)
745 {
746 if (!skillCats.Contains(item7.source.categorySub))
747 {
748 list.Add(item7);
749 }
750 }
751 }
752 };
753 list.List();
754 Header("skill", null);
755 ListResist();
756 list.callbacks = new UIList.Callback<Element, ButtonElement>
757 {
758 onInstantiate = delegate(Element a, ButtonElement b)
759 {
760 b.SetGrid(a, chara);
761 },
762 onList = delegate
763 {
764 foreach (Element item8 in eles)
765 {
766 if (skillCats.Contains(item8.source.categorySub))
767 {
768 list.Add(item8);
769 }
770 }
771 }
772 };
773 list.List();
774 }
775 else if (idTab == 5)
776 {
777 Header("note", null);
778 note.transform.SetAsLastSibling();
780 }
781 void Header(string lang, string lang2)
782 {
784 _header.SetText(lang);
785 if (lang2 != null)
786 {
787 Util.Instantiate(moldHeader2, contentList).SetText(lang2);
788 }
789 }
790 void List(string lang, string idSubCat)
791 {
792 List<string> cats = new List<string>();
793 cats.Add(idSubCat);
794 if (idSubCat == "general")
795 {
796 cats.Add("labor");
797 cats.Add("mind");
798 cats.Add("stealth");
799 }
800 Header(lang, null);
801 ListSkill();
802 list.callbacks = new UIList.Callback<Element, ButtonElement>
803 {
804 onClick = delegate(Element a, ButtonElement b)
805 {
808 },
809 onInstantiate = delegate(Element a, ButtonElement b)
810 {
812 },
813 onList = delegate
814 {
815 foreach (Element item9 in chara.elements.ListElements((Element a) => (a.Value != 0 || a.ValueWithoutLink != 0 || a.vSource > 0) && a.source.category == "skill" && cats.Contains(a.source.categorySub)))
816 {
817 list.Add(item9);
818 }
819 },
820 onSort = (Element c, UIList.SortMode m) => EClass.sources.elements.alias[c.source.aliasParent].id * -10000 - c.id
821 };
822 list.List(UIList.SortMode.ByElementParent);
823 }
824 void List(string lang, string idSubCat)
825 {
826 Header(lang, "cost");
827 ListFeatPurchase();
828 UIList _list = list;
829 _list.callbacks = new UIList.Callback<Element, ButtonElement>
830 {
831 onClick = delegate(Element a, ButtonElement b)
832 {
834 {
835 SE.BeepSmall();
836 }
837 else if (EClass.pc.feat < a.CostLearn)
838 {
839 SE.BeepSmall();
840 Msg.Say("notEnoughFeatPoint");
841 }
842 else
843 {
844 Dialog.YesNo("dialogBuyFeat".lang(a.CostLearn.ToString() ?? "", a.FullName), delegate
845 {
846 EClass.pc.feat -= a.CostLearn;
847 EClass.pc.SetFeat(a.id, a.Value, msg: true);
848 RefreshSkill(idTab);
849 RefreshFeatMode();
850 RefreshStatic();
851 this.RebuildLayout(recursive: true);
852 });
853 }
854 },
855 onInstantiate = delegate(Element a, ButtonElement b)
856 {
857 b.SetElement(a, chara.elements, ButtonElement.Mode.FeatPurchase);
858 },
859 onList = delegate
860 {
861 foreach (Element item10 in chara.ListAvailabeFeats(pet: false, EClass.game.config.showAllFeat))
862 {
863 if (item10.source.categorySub == idSubCat)
864 {
865 _list.Add(item10);
866 }
867 }
868 }
869 };
870 _list.List();
871 }
872 void ListFeat()
873 {
875 }
876 void ListFeatPurchase()
877 {
879 }
880 void ListResist()
881 {
883 }
884 void ListSkill()
885 {
887 }
888 }
if(!match.Success)
Image imagePotential
void SetGrid(Element e, Chara c)
CharaGenes c_genes
Definition: Card.cs:1897
bool HasElement(int ele, bool includeNagative=false)
Definition: Card.cs:6304
List< DNA > items
Definition: CharaGenes.cs:7
int MaxGeneSlot
Definition: Chara.cs:1091
int CurrentGeneSlot
Definition: Chara.cs:1106
List< Element > ListAvailabeFeats(bool pet=false, bool showAll=false)
Definition: Chara.cs:10274
bool enable
Definition: CoreDebug.cs:301
Definition: DNA.cs:8
void WriteNote(UINote n, Chara tg=null)
Definition: DNA.cs:581
string GetText()
Definition: DNA.cs:571
Definition: Dialog.cs:7
static Dialog YesNo(string langDetail, Action actionYes, Action actionNo=null, string langYes="yes", string langNo="no")
Definition: Dialog.cs:252
List< Element > ListElements(Func< Element, bool > shoudList=null, Comparison< Element > comparison=null)
bool IsFactionElement(Chara c)
Definition: ELEMENT.cs:500
int ValueWithoutLink
Definition: ELEMENT.cs:301
int id
Definition: ELEMENT.cs:257
SourceElement.Row source
Definition: ELEMENT.cs:280
virtual bool IsPurchaseFeatReqMet(ElementContainer owner, int lv=-1)
Definition: ELEMENT.cs:1112
ElementContainer owner
Definition: ELEMENT.cs:273
bool HasTag(string tag)
Definition: ELEMENT.cs:480
virtual string FullName
Definition: ELEMENT.cs:313
int GetSortVal(UIList.SortMode m)
Definition: ELEMENT.cs:1028
int Value
Definition: ELEMENT.cs:299
int vLink
Definition: ELEMENT.cs:267
int vSource
Definition: ELEMENT.cs:269
virtual int CostLearn
Definition: ELEMENT.cs:321
bool IsFlag
Definition: ELEMENT.cs:309
int SortVal(bool charaSheet=false)
Definition: ELEMENT.cs:469
Definition: FEAT.cs:333
bool showAllFeat
Definition: Game.cs:58
Config config
Definition: Game.cs:219
Definition: Msg.cs:5
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58
UIText subText
Definition: UIButton.cs:104
UIText mainText
Definition: UIButton.cs:102
void SetText(string s)
Definition: UIHeader.cs:24
void ChangeSort(SortMode m)
Definition: UIList.cs:757
override void List()
Definition: UIList.cs:769
Definition: UINote.cs:6
static void Toggle(Element e)
UIList moldListFeatPurchase
Definition: WindowChara.cs:132
UIHeader moldHeader
Definition: WindowChara.cs:120
UIList moldListResist
Definition: WindowChara.cs:128
Transform contentList
Definition: WindowChara.cs:134
UIHeader _header
Definition: WindowChara.cs:160
UIHeader moldHeader2
Definition: WindowChara.cs:122
UIList moldListFeat
Definition: WindowChara.cs:130
UIHeader headerEquip
Definition: WindowChara.cs:124
void RefreshFeatMode()
Definition: WindowChara.cs:250
UIList moldListSkill
Definition: WindowChara.cs:126

References UIList.Add(), UINote.AddHeader(), UINote.Build(), Card.c_genes, UIList.ChangeSort(), UINote.Clear(), Chara.CurrentGeneSlot, Card.elements, SourceManager.elements, Card.Evalue(), ElementContainer.GetOrCreateElement(), Element.GetSortVal(), DNA.GetText(), Card.HasElement(), Element.HasTag(), Header, Element.id, if(), ButtonElement.imagePotential, Element.IsFactionElement(), Element.IsFlag, Chara.IsPC, item, CharaGenes.items, UIList.items, UIList.List(), ElementContainer.ListElements(), UIButton.mainText, Chara.MaxGeneSlot, UITooltip.note, Element.owner, EClass.pc, ButtonElement.SetElement(), ButtonElement.SetGrid(), UIHeader.SetText(), UIText.SetText(), UIButton.SetTooltip(), Element.source, EClass.sources, UIButton.subText, WidgetTracker.Toggle(), Element.Value, Element.vLink, Element.vSource, and DNA.WriteNote().

Referenced by OnSwitchContent(), and ToggleFeatMode().

◆ RefreshStatic()

void WindowChara.RefreshStatic ( )
inline

Definition at line 263 of file WindowChara.cs.

264 {
265 textHealth.text = chara.hp + "/" + chara.MaxHP;
266 textMood.text = chara.mana.value + "/" + chara.mana.max;
268 Sprite @object = Portrait.modPortraitBGs.GetItem(chara.GetStr(23) ?? "BG_1").GetObject();
269 @object.texture.filterMode = FilterMode.Bilinear;
270 portrait.image.sprite = @object;
271 @object = Portrait.modPortraitBGFs.GetItem(chara.GetStr(24) ?? "BGF_1").GetObject();
272 @object.texture.filterMode = FilterMode.Bilinear;
273 portrait.imageFrame.sprite = @object;
276 listAttaribute.callbacks = new UIList.Callback<Element, ButtonElement>
277 {
278 onClick = delegate(Element a, ButtonElement b)
279 {
282 },
283 onInstantiate = delegate(Element a, ButtonElement b)
284 {
285 b.SetElement(a, chara.elements, ButtonElement.Mode.Attribute);
286 }
287 };
288 List<Element> list = chara.elements.ListElements((Element a) => a.HasTag("primary"));
289 list.Sort((Element a, Element b) => a.source.sort - b.source.sort);
290 foreach (Element item in list)
291 {
293 }
295 }
string GetStr(string id, string defaultStr=null)
Definition: Card.cs:2579
override int MaxHP
Definition: Chara.cs:726
Stats mana
Definition: Chara.cs:1189
ModItem< T > GetItem(string id, bool returnNull=false)
Definition: ModItemList.cs:61
static ModItemList< Sprite > modPortraitBGFs
Definition: Portrait.cs:8
static ModItemList< Sprite > modPortraitBGs
Definition: Portrait.cs:10
UIList listAttaribute
Definition: WindowChara.cs:74
void SetCaption(string text)
Definition: Window.cs:1289

References UIList.Add(), chara, UIList.Clear(), Card.elements, ModItemList< T >.GetItem(), Card.GetStr(), Element.HasTag(), item, listAttaribute, ElementContainer.ListElements(), Chara.mana, Stats.max, Chara.MaxHP, Portrait.modPortraitBGFs, Portrait.modPortraitBGs, Chara.NameBraced, portrait, UIList.Refresh(), RefreshStatic(), Window.SetCaption(), Portrait.SetChara(), ButtonElement.SetElement(), Element.source, WidgetTracker.Toggle(), and WindowController.window.

Referenced by OnSwitchContent(), RefreshStatic(), SetPortraitBG(), and SetPortraitFrame().

◆ RefreshStatus()

void WindowChara.RefreshStatus ( )
inline

Definition at line 297 of file WindowChara.cs.

298 {
299 layoutStatus.DestroyChildren();
300 foreach (Stats item in new List<Stats> { chara.hunger, chara.burden, chara.stamina, chara.depression, chara.bladder, chara.hygiene })
301 {
303 }
304 foreach (Condition condition in chara.conditions)
305 {
306 AddStatus(condition);
307 }
308 if (layoutStatus.transform.childCount == 1)
309 {
310 AddStatus(null);
311 }
312 layoutStatus.RebuildLayout();
313 }
Stats depression
Definition: Chara.cs:1183
List< Condition > conditions
Definition: Chara.cs:215
Stats hunger
Definition: Chara.cs:1177
Stats bladder
Definition: Chara.cs:1185
Stats stamina
Definition: Chara.cs:1181
Stats burden
Definition: Chara.cs:1179
Definition: Stats.cs:5
void AddStatus(BaseStats st)
Definition: WindowChara.cs:332

References AddStatus(), Chara.bladder, Chara.burden, chara, Chara.conditions, Chara.depression, Chara.hunger, item, layoutStatus, and Chara.stamina.

Referenced by RefreshProfile().

◆ SetChara()

void WindowChara.SetChara ( Chara  c)
inline

Definition at line 164 of file WindowChara.cs.

165 {
166 Instance = this;
167 chara = c;
168 portrait.interactable = chara.IsPC;
170 if (window.setting.tabs.Count > 6)
171 {
172 window.setting.tabs[6].button.SetActive(chara.IsPC);
173 }
174 if (window.idTab == 6 && !chara.IsPC)
175 {
177 }
178 }
static WindowChara Instance
Definition: WindowChara.cs:10
List< Tab > tabs
Definition: Window.cs:81
void SwitchContent(UIContent content)
Definition: Window.cs:1198
Setting setting
Definition: Window.cs:606

References chara, Window.idTab, Instance, Chara.IsPC, OnSwitchContent(), Window.setting, Window.SwitchContent(), Window.Setting.tabs, and WindowController.window.

Referenced by LayerChara.SetChara(), and LayerInteraction.ShowPage().

◆ SetPortraitBG()

void WindowChara.SetPortraitBG ( int  a)
inline

Definition at line 214 of file WindowChara.cs.

215 {
216 string currentId = chara.GetStr(23) ?? "BG_1";
217 currentId = Portrait.modPortraitBGs.GetNextID(currentId, a);
218 if (currentId == "BG_1")
219 {
220 currentId = null;
221 }
222 chara.SetStr(23, currentId);
224 }
void SetStr(string id, string value=null)
Definition: Card.cs:2584
string GetNextID(string currentId, int a, bool ignoreCategory=true)
Definition: ModItemList.cs:35

References chara, ModItemList< T >.GetNextID(), Card.GetStr(), Portrait.modPortraitBGs, RefreshStatic(), and Card.SetStr().

◆ SetPortraitFrame()

void WindowChara.SetPortraitFrame ( int  a)
inline

Definition at line 226 of file WindowChara.cs.

227 {
228 string currentId = chara.GetStr(24) ?? "BGF_1";
229 currentId = Portrait.modPortraitBGFs.GetNextID(currentId, a);
230 if (currentId == "BGF_1")
231 {
232 currentId = null;
233 }
234 chara.SetStr(24, currentId);
236 }

References chara, ModItemList< T >.GetNextID(), Card.GetStr(), Portrait.modPortraitBGFs, RefreshStatic(), and Card.SetStr().

◆ ToggleFeatMode()

void WindowChara.ToggleFeatMode ( )
inline

Definition at line 238 of file WindowChara.cs.

239 {
242 buttonFeatOption.SetActive(featMode);
244 {
245 EClass.game.config.showAllFeat = a;
247 });
248 }
void SetToggle(bool isOn, Action< bool > onToggle=null)
Definition: UIButton.cs:341

References buttonFeatOption, Game.config, featMode, EClass.game, Window.idTab, RefreshSkill(), UIButton.SetToggle(), Game.Config.showAllFeat, and WindowController.window.

Referenced by WidgetExp.OnClick(), and WidgetExpHome.OnClick().

◆ Update()

void WindowChara.Update ( )
inlineprivate

Definition at line 180 of file WindowChara.cs.

181 {
182 rectEquip.anchoredPosition = new Vector2(scrollSkill.content.anchoredPosition.x + equipPos.x, equipPos.y);
183 }
Vector2 equipPos
Definition: WindowChara.cs:152
UIScrollView scrollSkill
Definition: WindowChara.cs:106

References equipPos, and scrollSkill.

Member Data Documentation

◆ _header

UIHeader WindowChara._header
private

Definition at line 160 of file WindowChara.cs.

◆ barColor1

float WindowChara.barColor1

Definition at line 156 of file WindowChara.cs.

Referenced by AddNeeds().

◆ barColor2

float WindowChara.barColor2

Definition at line 158 of file WindowChara.cs.

Referenced by AddNeeds().

◆ buttonFeatMode

UIButton WindowChara.buttonFeatMode

Definition at line 138 of file WindowChara.cs.

Referenced by OnSwitchContent(), and RefreshFeatMode().

◆ buttonFeatOption

UIButton WindowChara.buttonFeatOption

Definition at line 140 of file WindowChara.cs.

Referenced by OnSwitchContent(), and ToggleFeatMode().

◆ buttonLife

ButtonElement WindowChara.buttonLife

Definition at line 110 of file WindowChara.cs.

Referenced by RefreshProfile().

◆ buttonMana

ButtonElement WindowChara.buttonMana

Definition at line 108 of file WindowChara.cs.

Referenced by RefreshProfile().

◆ buttonSpeed

ButtonElement WindowChara.buttonSpeed

Definition at line 114 of file WindowChara.cs.

Referenced by RefreshProfile().

◆ buttonVigor

ButtonElement WindowChara.buttonVigor

Definition at line 112 of file WindowChara.cs.

Referenced by RefreshProfile().

◆ chara

◆ colorUnequipped

Color WindowChara.colorUnequipped

Definition at line 150 of file WindowChara.cs.

Referenced by RefreshEquipment().

◆ contentList

Transform WindowChara.contentList

Definition at line 134 of file WindowChara.cs.

◆ equipPos

Vector2 WindowChara.equipPos

Definition at line 152 of file WindowChara.cs.

Referenced by Update().

◆ featMode

bool WindowChara.featMode

Definition at line 154 of file WindowChara.cs.

Referenced by OnSwitchContent(), RefreshFeatMode(), and ToggleFeatMode().

◆ graph

PUIExampleRPGStats WindowChara.graph

Definition at line 82 of file WindowChara.cs.

◆ gridEquip

GridLayoutGroup WindowChara.gridEquip

Definition at line 104 of file WindowChara.cs.

◆ headerEquip

UIHeader WindowChara.headerEquip

Definition at line 124 of file WindowChara.cs.

◆ imageView

Image WindowChara.imageView

Definition at line 142 of file WindowChara.cs.

◆ Instance

WindowChara WindowChara.Instance
static

Definition at line 10 of file WindowChara.cs.

Referenced by ButtonElement.Refresh(), and SetChara().

◆ layoutNeeds

LayoutGroup WindowChara.layoutNeeds

Definition at line 100 of file WindowChara.cs.

Referenced by AddNeeds().

◆ layoutStatus

LayoutGroup WindowChara.layoutStatus

Definition at line 102 of file WindowChara.cs.

Referenced by AddStatus(), and RefreshStatus().

◆ listAttaribute

UIList WindowChara.listAttaribute

Definition at line 74 of file WindowChara.cs.

Referenced by RefreshStatic().

◆ listEquipment

UIList WindowChara.listEquipment

Definition at line 76 of file WindowChara.cs.

Referenced by RefreshProfile().

◆ listEquipment2

UIList WindowChara.listEquipment2

Definition at line 78 of file WindowChara.cs.

Referenced by OnSwitchContent().

◆ mask

Sprite WindowChara.mask

Definition at line 144 of file WindowChara.cs.

Referenced by OnSwitchContent().

◆ maskResist

Sprite WindowChara.maskResist

Definition at line 146 of file WindowChara.cs.

Referenced by OnSwitchContent().

◆ matItem

Material WindowChara.matItem

Definition at line 148 of file WindowChara.cs.

Referenced by RefreshEquipment().

◆ moldHeader

UIHeader WindowChara.moldHeader

Definition at line 120 of file WindowChara.cs.

◆ moldHeader2

UIHeader WindowChara.moldHeader2

Definition at line 122 of file WindowChara.cs.

◆ moldListFeat

UIList WindowChara.moldListFeat

Definition at line 130 of file WindowChara.cs.

◆ moldListFeatPurchase

UIList WindowChara.moldListFeatPurchase

Definition at line 132 of file WindowChara.cs.

◆ moldListResist

UIList WindowChara.moldListResist

Definition at line 128 of file WindowChara.cs.

◆ moldListSkill

UIList WindowChara.moldListSkill

Definition at line 126 of file WindowChara.cs.

◆ moldNeeds

UIItem WindowChara.moldNeeds

Definition at line 118 of file WindowChara.cs.

Referenced by AddNeeds().

◆ moldStats

UIItem WindowChara.moldStats

Definition at line 116 of file WindowChara.cs.

Referenced by AddStatus().

◆ note

UINote WindowChara.note

Definition at line 80 of file WindowChara.cs.

◆ portrait

Portrait WindowChara.portrait

Definition at line 14 of file WindowChara.cs.

Referenced by OnClickPortrait(), and RefreshStatic().

◆ rectEquip

RectTransform WindowChara.rectEquip

Definition at line 136 of file WindowChara.cs.

◆ scrollSkill

UIScrollView WindowChara.scrollSkill

Definition at line 106 of file WindowChara.cs.

Referenced by Update().

◆ textAffection

UIText WindowChara.textAffection

Definition at line 88 of file WindowChara.cs.

◆ textAlias

UIText WindowChara.textAlias

Definition at line 22 of file WindowChara.cs.

◆ textAssets

UIText WindowChara.textAssets

Definition at line 64 of file WindowChara.cs.

◆ textBio

UIText WindowChara.textBio

Definition at line 26 of file WindowChara.cs.

◆ textBio2

UIText WindowChara.textBio2

Definition at line 28 of file WindowChara.cs.

◆ textBio3

UIText WindowChara.textBio3

Definition at line 30 of file WindowChara.cs.

◆ textBirthday

UIText WindowChara.textBirthday

Definition at line 32 of file WindowChara.cs.

◆ textBirthplace

UIText WindowChara.textBirthplace

Definition at line 44 of file WindowChara.cs.

◆ textCurrentZone

UIText WindowChara.textCurrentZone

Definition at line 70 of file WindowChara.cs.

◆ textDad

UIText WindowChara.textDad

Definition at line 42 of file WindowChara.cs.

◆ textDeepest

UIText WindowChara.textDeepest

Definition at line 68 of file WindowChara.cs.

◆ textDeposit

UIText WindowChara.textDeposit

Definition at line 66 of file WindowChara.cs.

◆ textDominance

UIText WindowChara.textDominance

Definition at line 90 of file WindowChara.cs.

◆ textDV

UIText WindowChara.textDV

Definition at line 96 of file WindowChara.cs.

◆ textExtroversion

UIText WindowChara.textExtroversion

Definition at line 92 of file WindowChara.cs.

◆ textFaction

UIText WindowChara.textFaction

Definition at line 34 of file WindowChara.cs.

◆ textFaith

UIText WindowChara.textFaith

Definition at line 36 of file WindowChara.cs.

◆ textFame

UIText WindowChara.textFame

Definition at line 54 of file WindowChara.cs.

◆ textFavArmor

UIText WindowChara.textFavArmor

Definition at line 94 of file WindowChara.cs.

Referenced by RefreshEquipment().

◆ textHealth

UIText WindowChara.textHealth

Definition at line 18 of file WindowChara.cs.

◆ textHobby

UIText WindowChara.textHobby

Definition at line 48 of file WindowChara.cs.

◆ textHome

UIText WindowChara.textHome

Definition at line 38 of file WindowChara.cs.

◆ textHomeZone

UIText WindowChara.textHomeZone

Definition at line 72 of file WindowChara.cs.

◆ textIncome

UIText WindowChara.textIncome

Definition at line 62 of file WindowChara.cs.

◆ textKarma

UIText WindowChara.textKarma

Definition at line 50 of file WindowChara.cs.

◆ textLaw

UIText WindowChara.textLaw

Definition at line 86 of file WindowChara.cs.

◆ textLike

UIText WindowChara.textLike

Definition at line 46 of file WindowChara.cs.

◆ textMom

UIText WindowChara.textMom

Definition at line 40 of file WindowChara.cs.

◆ textMoney

UIText WindowChara.textMoney

Definition at line 56 of file WindowChara.cs.

◆ textMood

UIText WindowChara.textMood

Definition at line 16 of file WindowChara.cs.

◆ textName

UIText WindowChara.textName

Definition at line 20 of file WindowChara.cs.

◆ textSAN

UIText WindowChara.textSAN

Definition at line 52 of file WindowChara.cs.

◆ textStability

UIText WindowChara.textStability

Definition at line 84 of file WindowChara.cs.

◆ textStyle

UIText WindowChara.textStyle

Definition at line 98 of file WindowChara.cs.

◆ textTax

UIText WindowChara.textTax

Definition at line 58 of file WindowChara.cs.

◆ textTerritory

UIText WindowChara.textTerritory

Definition at line 60 of file WindowChara.cs.

◆ textTitle

UIText WindowChara.textTitle

Definition at line 24 of file WindowChara.cs.

Property Documentation

◆ bio

Biography WindowChara.bio
get

Definition at line 162 of file WindowChara.cs.

Referenced by RefreshInfo(), and RefreshProfile().


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