From 794c8ecad52c4f939e7a3453af14b4519f19af38 Mon Sep 17 00:00:00 2001 From: Shnok Date: Fri, 12 Jul 2024 17:35:37 +0800 Subject: [PATCH] characterinfo ui fix --- .../UI/_Elements/Game/CharacterInfoWindow.uxml | 18 +++++++++--------- .../UI/Game/Character/CharacterWindow.cs | 12 ++++++------ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/l2-unity/Assets/Resources/Data/UI/_Elements/Game/CharacterInfoWindow.uxml b/l2-unity/Assets/Resources/Data/UI/_Elements/Game/CharacterInfoWindow.uxml index 9dec1b200..83daa13f2 100644 --- a/l2-unity/Assets/Resources/Data/UI/_Elements/Game/CharacterInfoWindow.uxml +++ b/l2-unity/Assets/Resources/Data/UI/_Elements/Game/CharacterInfoWindow.uxml @@ -87,19 +87,19 @@ - - - - + + + + - - - - + + + + - + diff --git a/l2-unity/Assets/Scripts/UI/Game/Character/CharacterWindow.cs b/l2-unity/Assets/Scripts/UI/Game/Character/CharacterWindow.cs index db7a2492f..2cc9e6390 100644 --- a/l2-unity/Assets/Scripts/UI/Game/Character/CharacterWindow.cs +++ b/l2-unity/Assets/Scripts/UI/Game/Character/CharacterWindow.cs @@ -108,13 +108,13 @@ protected override IEnumerator BuildWindow(VisualElement root) { _spLabel = GetLabelById("SpLabel"); _expLabel = GetLabelById("ExpLabel"); _weightLabel = GetLabelById("WeightLabel"); - _cpLabel = GetLabelById("CpVal"); + _cpLabel = GetLabelById("CpLabelB"); _hpBar = GetElementById("HpGauge"); _hpBarBg = GetElementById("HpBg"); _mpBar = GetElementById("MpGauge"); _mpBarBg = GetElementById("MpBg"); - _cpBar = GetElementById("CpGauge"); - _cpBarBg = GetElementById("CpBg"); + _cpBar = GetElementById("CpGaugeB"); + _cpBarBg = GetElementById("CpBgB"); _weightBar = GetElementById("WeightGauge"); _weightBarBg = GetElementById("WeightBg"); _expBar = GetElementById("ExpGauge"); @@ -210,18 +210,18 @@ private void UpdateSocial(PlayerStats stats) { private void UpdateBars(PlayerStatus status, PlayerStats stats) { _hpLabel.text = $"{status.Hp}/{stats.MaxHp}"; - _mpLabel.text = $"{status.Hp}/{stats.MaxHp}"; + _mpLabel.text = $"{status.Mp}/{stats.MaxMp}"; _cpLabel.text = $"{status.Cp}/{stats.MaxCp}"; _spLabel.text = stats.Sp.ToString(); if (stats.MaxExp > 0) { - _expLabel.text = $"{(float)stats.Exp / stats.MaxExp}%"; + _expLabel.text = $"{((float)stats.Exp / stats.MaxExp).ToString("0.00")}%"; } else { _expLabel.text = $"00.00%"; } if (stats.MaxWeight > 0) { - _weightLabel.text = $"{(float)stats.CurrWeight / stats.MaxWeight}%"; + _weightLabel.text = $"{((float)stats.CurrWeight / stats.MaxWeight).ToString("0.00")}%"; } else { _weightLabel.text = $"00.00%"; }