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",
|
"version": "1.0.0",
|
||||||
"author": "ct",
|
"author": "ct",
|
||||||
"description": "Turn-based battle GUI: battle scene, victory/defeat screens, EXP and loot reports",
|
"description": "Turn-based battle GUI: battle scene, victory/defeat screens, EXP and loot reports",
|
||||||
"category": "library, gameplay",
|
"category": "engine, gameplay",
|
||||||
"sources": [
|
"sources": [
|
||||||
"src/**/*.cs"
|
"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_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
mouse_filter = 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]
|
[node name="CenterPanel" type="VBoxContainer" parent="Content" unique_id=695019244]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
@@ -57,7 +57,7 @@ alignment = 1
|
|||||||
[node name="TitleLabel" type="Label" parent="Content/CenterPanel" unique_id=1047371679]
|
[node name="TitleLabel" type="Label" parent="Content/CenterPanel" unique_id=1047371679]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 4
|
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
|
theme_override_font_sizes/font_size = 48
|
||||||
text = "ui/battle/defeat"
|
text = "ui/battle/defeat"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
|||||||
@@ -33,12 +33,12 @@ stretch_mode = 5
|
|||||||
|
|
||||||
[node name="NameLabel" type="Label" parent="Panel" unique_id=555712225]
|
[node name="NameLabel" type="Label" parent="Panel" unique_id=555712225]
|
||||||
layout_mode = 2
|
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
|
theme_override_font_sizes/font_size = 16
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
|
||||||
[node name="ExpLabel" type="Label" parent="Panel" unique_id=1019918817]
|
[node name="ExpLabel" type="Label" parent="Panel" unique_id=1019918817]
|
||||||
layout_mode = 2
|
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
|
theme_override_font_sizes/font_size = 22
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
@@ -34,7 +34,7 @@ mouse_filter = 2
|
|||||||
|
|
||||||
[node name="CountLabel" type="Label" parent="Panel"]
|
[node name="CountLabel" type="Label" parent="Panel"]
|
||||||
layout_mode = 2
|
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
|
theme_override_font_sizes/font_size = 16
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
mouse_filter = 2
|
mouse_filter = 2
|
||||||
@@ -38,7 +38,7 @@ anchor_bottom = 1.0
|
|||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
mouse_filter = 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]
|
[node name="CharExpContainer" type="HBoxContainer" parent="Content" unique_id=1416765042]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
@@ -105,7 +105,7 @@ alignment = 1
|
|||||||
auto_translate_mode = 1
|
auto_translate_mode = 1
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 4
|
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
|
theme_override_font_sizes/font_size = 48
|
||||||
text = "ui/battle/victory"
|
text = "ui/battle/victory"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Cthangover.Core.Battle;
|
using Cthangover.Core.Battle;
|
||||||
using Cthangover.Core.Settings;
|
using Cthangover.Core.Settings;
|
||||||
|
using Cthangover.Core.UI.Theming;
|
||||||
using Godot;
|
using Godot;
|
||||||
|
|
||||||
namespace Cthangover.TurnBattle
|
namespace Cthangover.TurnBattle
|
||||||
@@ -27,6 +28,8 @@ namespace Cthangover.TurnBattle
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public BattleSpeedControl()
|
public BattleSpeedControl()
|
||||||
{
|
{
|
||||||
|
CthangoverTheme.Apply(this);
|
||||||
|
|
||||||
var speeds = new[] { 1, 4, 8 };
|
var speeds = new[] { 1, 4, 8 };
|
||||||
var hbox = new HBoxContainer { Name = "SpeedButtons" };
|
var hbox = new HBoxContainer { Name = "SpeedButtons" };
|
||||||
hbox.Alignment = BoxContainer.AlignmentMode.Begin;
|
hbox.Alignment = BoxContainer.AlignmentMode.Begin;
|
||||||
@@ -100,7 +103,7 @@ namespace Cthangover.TurnBattle
|
|||||||
foreach (var kv in _buttons)
|
foreach (var kv in _buttons)
|
||||||
{
|
{
|
||||||
var isActive = kv.Key == _activeSpeed;
|
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.Scenes;
|
||||||
using Cthangover.Core.Settings;
|
using Cthangover.Core.Settings;
|
||||||
using Cthangover.Core.UI.Base.Lists;
|
using Cthangover.Core.UI.Base.Lists;
|
||||||
|
using Cthangover.Core.UI.Theming;
|
||||||
using Cthangover.Core.Utils;
|
using Cthangover.Core.Utils;
|
||||||
using Godot;
|
using Godot;
|
||||||
|
|
||||||
@@ -34,6 +35,9 @@ namespace Cthangover.TurnBattle
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public override void Show()
|
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);
|
GameLogger.Log("BATTLE", $"Deadground.Show() ENTER: Visible={Visible}, GodotVisible={base.Visible}", LogLevel.Debug);
|
||||||
|
|
||||||
var audioService = GetNode<AudioService>("/root/AudioService");
|
var audioService = GetNode<AudioService>("/root/AudioService");
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using Cthangover.Core.UI.Theming;
|
||||||
using Godot;
|
using Godot;
|
||||||
|
|
||||||
namespace Cthangover.TurnBattle
|
namespace Cthangover.TurnBattle
|
||||||
@@ -28,6 +29,8 @@ namespace Cthangover.TurnBattle
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void Setup(Texture2D characterIcon, string characterName, int exp)
|
public void Setup(Texture2D characterIcon, string characterName, int exp)
|
||||||
{
|
{
|
||||||
|
CthangoverTheme.Apply(this);
|
||||||
|
|
||||||
ResolveMissingNodes();
|
ResolveMissingNodes();
|
||||||
|
|
||||||
if (icon != null && characterIcon != null)
|
if (icon != null && characterIcon != null)
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using Cthangover.Core.UI.Theming;
|
||||||
using Godot;
|
using Godot;
|
||||||
|
|
||||||
namespace Cthangover.TurnBattle
|
namespace Cthangover.TurnBattle
|
||||||
@@ -29,6 +30,8 @@ namespace Cthangover.TurnBattle
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void Setup(Texture2D itemIcon, string localizedName, int count)
|
public void Setup(Texture2D itemIcon, string localizedName, int count)
|
||||||
{
|
{
|
||||||
|
CthangoverTheme.Apply(this);
|
||||||
|
|
||||||
ResolveMissingNodes();
|
ResolveMissingNodes();
|
||||||
|
|
||||||
if (icon != null && itemIcon != null)
|
if (icon != null && itemIcon != null)
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using Cthangover.Core.UI.Theming;
|
||||||
using Godot;
|
using Godot;
|
||||||
|
|
||||||
namespace Cthangover.TurnBattle
|
namespace Cthangover.TurnBattle
|
||||||
@@ -37,7 +38,7 @@ namespace Cthangover.TurnBattle
|
|||||||
_label.HorizontalAlignment = HorizontalAlignment.Center;
|
_label.HorizontalAlignment = HorizontalAlignment.Center;
|
||||||
_label.VerticalAlignment = VerticalAlignment.Center;
|
_label.VerticalAlignment = VerticalAlignment.Center;
|
||||||
_label.AddThemeFontSizeOverride("font_size", 28);
|
_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);
|
_label.AddThemeConstantOverride("outline_size", 6);
|
||||||
AddChild(_label);
|
AddChild(_label);
|
||||||
}
|
}
|
||||||
@@ -54,8 +55,8 @@ namespace Cthangover.TurnBattle
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
var color = isHeal
|
var color = isHeal
|
||||||
? new Color(0.3f, 1f, 0.3f, 1f)
|
? UiTokens.SuccessText
|
||||||
: new Color(1f, 0.3f, 0.3f, 1f);
|
: UiTokens.DangerText;
|
||||||
|
|
||||||
var hint = new ShowDamageBehaviour();
|
var hint = new ShowDamageBehaviour();
|
||||||
parent.AddChild(hint);
|
parent.AddChild(hint);
|
||||||
@@ -74,7 +75,7 @@ namespace Cthangover.TurnBattle
|
|||||||
|
|
||||||
var hint = new ShowDamageBehaviour();
|
var hint = new ShowDamageBehaviour();
|
||||||
parent.AddChild(hint);
|
parent.AddChild(hint);
|
||||||
hint.Init(amount, position, new Color(0.3f, 0.3f, 1f, 1f));
|
hint.Init(amount, position, UiTokens.Info);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ using Cthangover.Core.Relationship;
|
|||||||
using Cthangover.Core.Scenes;
|
using Cthangover.Core.Scenes;
|
||||||
using Cthangover.Core.Settings;
|
using Cthangover.Core.Settings;
|
||||||
using Cthangover.Core.UI.Base.Lists;
|
using Cthangover.Core.UI.Base.Lists;
|
||||||
|
using Cthangover.Core.UI.Theming;
|
||||||
using Cthangover.Core.Characters;
|
using Cthangover.Core.Characters;
|
||||||
using Cthangover.Core.Mods.Resolvers;
|
using Cthangover.Core.Mods.Resolvers;
|
||||||
using Cthangover.Core.Utils;
|
using Cthangover.Core.Utils;
|
||||||
@@ -60,6 +61,9 @@ namespace Cthangover.TurnBattle
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public override void Show()
|
public override void Show()
|
||||||
{
|
{
|
||||||
|
CthangoverTheme.Apply(this);
|
||||||
|
CthangoverTheme.ApplyPrimary(GetNodeOrNull<Button>("Content/CenterPanel/ContinueButton"));
|
||||||
|
|
||||||
lootTitle.Text = TranslationServer.Translate("ui/battle/victory/loot_title");
|
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);
|
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