skill confirm button rework (#461)

This commit is contained in:
Nuxs
2026-01-14 19:34:53 +07:00
committed by GitHub
parent 2986ed09b4
commit 1932daf402

View File

@@ -95,24 +95,7 @@ public sealed partial class SkillsForcedWindow : FancyWindow
HorizontalAlignment = Control.HAlignment.Center
};
confirmButton.OnPressed += _ =>
{
if (_totalPoints - _spentPoints == 0)
{
Close();
}
else
{
warningContainer.RemoveAllChildren();
var warning = new Label
{
Text = Loc.GetString("skills-unspent-warning"),
FontColorOverride = Color.Yellow,
HorizontalAlignment = Control.HAlignment.Center
};
warningContainer.AddChild(warning);
}
};
confirmButton.OnPressed += _ => Close();
bottomContainer.AddChild(confirmButton);
bottomContainer.AddChild(warningContainer);