ui stule update
This commit is contained in:
1 parent
c286271083
commit
b5ad139d69
11 files changed
+32
-14
No files matched your search
+2
-2
@@ -4,9 +4,9 @@
|
||||
"version": "1.0.0",
|
||||
"author": "ct",
|
||||
"description": "Turn-based battle GUI: battle scene, victory/defeat screens, EXP and loot reports",
|
||||
"category": "library, gameplay",
|
||||
"category": "engine, gameplay",
|
||||
"sources": [
|
||||
"src/**/*.cs"
|
||||
],
|
||||
"depends": [ "core>=1", "interface>=1" ]
|
||||
"depends": [ "visual_novel_core>=1", "interface>=1" ]
|
||||
}
|
||||
@@ -37,7 +37,7 @@ anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
color = Color(0, 0, 0, 0.7)
|
||||
color = Color(0, 0, 0, 0.9)
|
||||
|
||||
[node name="CenterPanel" type="VBoxContainer" parent="Content" unique_id=695019244]
|
||||
layout_mode = 1
|
||||
@@ -57,7 +57,7 @@ alignment = 1
|
||||
[node name="TitleLabel" type="Label" parent="Content/CenterPanel" unique_id=1047371679]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
theme_override_colors/font_color = Color(1, 0.3, 0.3, 1)
|
||||
theme_override_colors/font_color = Color(0.909804, 0.662745, 0.670588, 1)
|
||||
theme_override_font_sizes/font_size = 48
|
||||
text = "ui/battle/defeat"
|
||||
horizontal_alignment = 1
|
||||
|
||||
@@ -33,12 +33,12 @@ stretch_mode = 5
|
||||
|
||||
[node name="NameLabel" type="Label" parent="Panel" unique_id=555712225]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(1, 1, 1, 1)
|
||||
theme_override_colors/font_color = Color(0.956863, 0.941176, 0.905882, 1)
|
||||
theme_override_font_sizes/font_size = 16
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="ExpLabel" type="Label" parent="Panel" unique_id=1019918817]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.5, 1, 0.5, 1)
|
||||
theme_override_colors/font_color = Color(0.72549, 0.827451, 0.682353, 1)
|
||||
theme_override_font_sizes/font_size = 22
|
||||
horizontal_alignment = 1
|
||||
@@ -34,7 +34,7 @@ mouse_filter = 2
|
||||
|
||||
[node name="CountLabel" type="Label" parent="Panel"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(1, 1, 1, 1)
|
||||
theme_override_colors/font_color = Color(0.956863, 0.941176, 0.905882, 1)
|
||||
theme_override_font_sizes/font_size = 16
|
||||
horizontal_alignment = 1
|
||||
mouse_filter = 2
|
||||
@@ -38,7 +38,7 @@ anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
color = Color(0, 0, 0, 0.7)
|
||||
color = Color(0, 0, 0, 0.9)
|
||||
|
||||
[node name="CharExpContainer" type="HBoxContainer" parent="Content" unique_id=1416765042]
|
||||
layout_mode = 1
|
||||
@@ -105,7 +105,7 @@ alignment = 1
|
||||
auto_translate_mode = 1
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
theme_override_colors/font_color = Color(0.3, 1, 0.3, 1)
|
||||
theme_override_colors/font_color = Color(0.72549, 0.827451, 0.682353, 1)
|
||||
theme_override_font_sizes/font_size = 48
|
||||
text = "ui/battle/victory"
|
||||
horizontal_alignment = 1
|
||||
|
||||
@@ -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,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");
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user