ui stule update

This commit is contained in:
cthangover committed 2026-09-26 08:05:11 +03:00
1 parent c286271083
commit b5ad139d69
11 files changed
+32 -14

No files matched your search

+4 -1
View File
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using Cthangover.Core.Battle;
using Cthangover.Core.Settings;
using Cthangover.Core.UI.Theming;
using Godot;
namespace Cthangover.TurnBattle
@@ -27,6 +28,8 @@ namespace Cthangover.TurnBattle
/// </summary>
public BattleSpeedControl()
{
CthangoverTheme.Apply(this);
var speeds = new[] { 1, 4, 8 };
var hbox = new HBoxContainer { Name = "SpeedButtons" };
hbox.Alignment = BoxContainer.AlignmentMode.Begin;
@@ -100,7 +103,7 @@ namespace Cthangover.TurnBattle
foreach (var kv in _buttons)
{
var isActive = kv.Key == _activeSpeed;
kv.Value.Modulate = isActive ? new Color(0.4f, 1f, 0.4f, 1f) : Colors.White;
kv.Value.Modulate = isActive ? UiTokens.Success : UiTokens.White;
}
}
}
+4
View File
@@ -4,6 +4,7 @@ using Cthangover.Core.Mods.Resolvers;
using Cthangover.Core.Scenes;
using Cthangover.Core.Settings;
using Cthangover.Core.UI.Base.Lists;
using Cthangover.Core.UI.Theming;
using Cthangover.Core.Utils;
using Godot;
@@ -34,6 +35,9 @@ namespace Cthangover.TurnBattle
/// </summary>
public override void Show()
{
CthangoverTheme.Apply(this);
CthangoverTheme.ApplyPrimary(GetNodeOrNull<Button>("Content/CenterPanel/MainMenuButton"));
GameLogger.Log("BATTLE", $"Deadground.Show() ENTER: Visible={Visible}, GodotVisible={base.Visible}", LogLevel.Debug);
var audioService = GetNode<AudioService>("/root/AudioService");
+3
View File
@@ -1,3 +1,4 @@
using Cthangover.Core.UI.Theming;
using Godot;
namespace Cthangover.TurnBattle
@@ -28,6 +29,8 @@ namespace Cthangover.TurnBattle
/// </summary>
public void Setup(Texture2D characterIcon, string characterName, int exp)
{
CthangoverTheme.Apply(this);
ResolveMissingNodes();
if (icon != null && characterIcon != null)
+3
View File
@@ -1,3 +1,4 @@
using Cthangover.Core.UI.Theming;
using Godot;
namespace Cthangover.TurnBattle
@@ -29,6 +30,8 @@ namespace Cthangover.TurnBattle
/// </summary>
public void Setup(Texture2D itemIcon, string localizedName, int count)
{
CthangoverTheme.Apply(this);
ResolveMissingNodes();
if (icon != null && itemIcon != null)
+5 -4
View File
@@ -1,3 +1,4 @@
using Cthangover.Core.UI.Theming;
using Godot;
namespace Cthangover.TurnBattle
@@ -37,7 +38,7 @@ namespace Cthangover.TurnBattle
_label.HorizontalAlignment = HorizontalAlignment.Center;
_label.VerticalAlignment = VerticalAlignment.Center;
_label.AddThemeFontSizeOverride("font_size", 28);
_label.AddThemeColorOverride("font_outline_color", new Color(0, 0, 0, 1));
_label.AddThemeColorOverride("font_outline_color", UiTokens.Alpha(Colors.Black, 1f));
_label.AddThemeConstantOverride("outline_size", 6);
AddChild(_label);
}
@@ -54,8 +55,8 @@ namespace Cthangover.TurnBattle
return;
var color = isHeal
? new Color(0.3f, 1f, 0.3f, 1f)
: new Color(1f, 0.3f, 0.3f, 1f);
? UiTokens.SuccessText
: UiTokens.DangerText;
var hint = new ShowDamageBehaviour();
parent.AddChild(hint);
@@ -74,7 +75,7 @@ namespace Cthangover.TurnBattle
var hint = new ShowDamageBehaviour();
parent.AddChild(hint);
hint.Init(amount, position, new Color(0.3f, 0.3f, 1f, 1f));
hint.Init(amount, position, UiTokens.Info);
}
/// <summary>
+4
View File
@@ -10,6 +10,7 @@ using Cthangover.Core.Relationship;
using Cthangover.Core.Scenes;
using Cthangover.Core.Settings;
using Cthangover.Core.UI.Base.Lists;
using Cthangover.Core.UI.Theming;
using Cthangover.Core.Characters;
using Cthangover.Core.Mods.Resolvers;
using Cthangover.Core.Utils;
@@ -60,6 +61,9 @@ namespace Cthangover.TurnBattle
/// </summary>
public override void Show()
{
CthangoverTheme.Apply(this);
CthangoverTheme.ApplyPrimary(GetNodeOrNull<Button>("Content/CenterPanel/ContinueButton"));
lootTitle.Text = TranslationServer.Translate("ui/battle/victory/loot_title");
GameLogger.Log("BATTLE", $"Winground.Show() ENTER: Visible={Visible}, GodotVisible={base.Visible}, txtInfo={(txtInfo != null ? "found" : "NULL")}", LogLevel.Debug);