Font fixes
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
[gd_resource type="Theme" load_steps=2 format=3 uid="uid://daxuhpmyxwxck"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://cb41qqmxqurj8" path="res://src/ui/fonts/FT88-Bold.ttf" id="1_r1ugn"]
|
||||
[ext_resource type="FontFile" uid="uid://duu4matpexcq4" path="res://src/ui/fonts/LSANS.TTF" id="1_cnp0c"]
|
||||
|
||||
[resource]
|
||||
default_font = ExtResource("1_r1ugn")
|
||||
default_font = ExtResource("1_cnp0c")
|
||||
default_font_size = 32
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[gd_resource type="LabelSettings" load_steps=2 format=3 uid="uid://bl5xpqyq8vjtv"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://dit3vylt7hmmx" path="res://src/ui/fonts/FT88-Regular.ttf" id="1_1lnq2"]
|
||||
[ext_resource type="FontFile" uid="uid://duu4matpexcq4" path="res://src/ui/fonts/LSANS.TTF" id="1_ednmm"]
|
||||
|
||||
[resource]
|
||||
font = ExtResource("1_1lnq2")
|
||||
font = ExtResource("1_ednmm")
|
||||
font_size = 30
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
using Zennysoft.Game.Ma;
|
||||
using Godot;
|
||||
|
||||
namespace Zennysoft.Game.Ma;
|
||||
@@ -10,7 +9,7 @@ public partial class ItemLabel : Label
|
||||
LabelSettings = UnequippedItemFont;
|
||||
}
|
||||
|
||||
private static LabelSettings UnequippedItemFont => GD.Load<LabelSettings>("res://src/ui/label_settings/MainTextRegular.tres");
|
||||
private static LabelSettings UnequippedItemFont => GD.Load<LabelSettings>("res://src/ui/label_settings/MainTextBold.tres");
|
||||
private static LabelSettings EquippedItemFont => GD.Load<LabelSettings>("res://src/ui/label_settings/MainTextFontEquipped.tres");
|
||||
|
||||
public void EquipItem()
|
||||
|
||||
@@ -35,7 +35,7 @@ public partial class ItemSlot : HBoxContainer, IItemSlot
|
||||
|
||||
[Node] public Label ItemCount { get; set; } = default!;
|
||||
|
||||
private static LabelSettings ItemFont => GD.Load<LabelSettings>("res://src/ui/label_settings/MainTextRegular.tres");
|
||||
private static LabelSettings ItemFont => GD.Load<LabelSettings>("res://src/ui/label_settings/MainTextBold.tres");
|
||||
private static LabelSettings SelectedItemFont => GD.Load<LabelSettings>("res://src/ui/label_settings/MainTextFontItalicized.tres");
|
||||
private static LabelSettings EquippedItemFont => GD.Load<LabelSettings>("res://src/ui/label_settings/MainTextFontEquipped.tres");
|
||||
|
||||
@@ -43,54 +43,54 @@ public partial class ItemSlot : HBoxContainer, IItemSlot
|
||||
|
||||
public void OnReady()
|
||||
{
|
||||
ItemName.Text = Item.ItemName;
|
||||
ItemTexture.Texture = Item.GetTexture();
|
||||
Player.EquippedWeapon.Sync += EquipableItem_Sync;
|
||||
Player.EquippedArmor.Sync += EquipableItem_Sync;
|
||||
Player.EquippedAccessory.Sync += EquipableItem_Sync;
|
||||
ItemName.Text = Item.ItemName;
|
||||
ItemTexture.Texture = Item.GetTexture();
|
||||
Player.EquippedWeapon.Sync += EquipableItem_Sync;
|
||||
Player.EquippedArmor.Sync += EquipableItem_Sync;
|
||||
Player.EquippedAccessory.Sync += EquipableItem_Sync;
|
||||
|
||||
if (Item is IStackable stackableItem)
|
||||
{
|
||||
ItemCount.Text = $"{stackableItem.Count:D2}";
|
||||
ItemCount.Visible = true;
|
||||
}
|
||||
if (Item is IStackable stackableItem)
|
||||
{
|
||||
ItemCount.Text = $"{stackableItem.Count:D2}";
|
||||
ItemCount.Visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void EquipableItem_Sync(EquipableItem obj)
|
||||
{
|
||||
if (Item is EquipableItem equipableItem && equipableItem == obj)
|
||||
{
|
||||
SetEquippedSelectedItemStyle();
|
||||
}
|
||||
if (Item is EquipableItem unequippedItem && unequippedItem != obj)
|
||||
{
|
||||
SetItemStyle();
|
||||
}
|
||||
if (Item is EquipableItem equipableItem && equipableItem == obj)
|
||||
{
|
||||
SetEquippedSelectedItemStyle();
|
||||
}
|
||||
if (Item is EquipableItem unequippedItem && unequippedItem != obj)
|
||||
{
|
||||
SetItemStyle();
|
||||
}
|
||||
}
|
||||
|
||||
public void SetItemStyle()
|
||||
{
|
||||
ItemName.LabelSettings = ItemFont;
|
||||
ItemName.LabelSettings = ItemFont;
|
||||
}
|
||||
public void SetSelectedItemStyle()
|
||||
{
|
||||
if (Item is EquipableItem equipableItem && equipableItem.IsEquipped)
|
||||
{
|
||||
ItemName.LabelSettings = SelectedEquippedItemFont;
|
||||
}
|
||||
else
|
||||
{
|
||||
ItemName.LabelSettings = SelectedItemFont;
|
||||
}
|
||||
if (Item is EquipableItem equipableItem && equipableItem.IsEquipped)
|
||||
{
|
||||
ItemName.LabelSettings = SelectedEquippedItemFont;
|
||||
}
|
||||
else
|
||||
{
|
||||
ItemName.LabelSettings = SelectedItemFont;
|
||||
}
|
||||
}
|
||||
public void SetEquippedItemStyle()
|
||||
{
|
||||
ItemName.LabelSettings = EquippedItemFont;
|
||||
ItemName.LabelSettings = EquippedItemFont;
|
||||
}
|
||||
|
||||
public void SetEquippedSelectedItemStyle()
|
||||
{
|
||||
ItemName.LabelSettings = SelectedEquippedItemFont;
|
||||
ItemName.LabelSettings = SelectedEquippedItemFont;
|
||||
}
|
||||
|
||||
public InventoryItem Item { get; set; } = default!;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,8 +1,8 @@
|
||||
[gd_resource type="LabelSettings" load_steps=2 format=3 uid="uid://cuuo43x72xcsc"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://cb41qqmxqurj8" path="res://src/ui/fonts/FT88-Bold.ttf" id="1_4xbcf"]
|
||||
[ext_resource type="FontFile" uid="uid://duu4matpexcq4" path="res://src/ui/fonts/LSANS.TTF" id="1_fbwht"]
|
||||
|
||||
[resource]
|
||||
font = ExtResource("1_4xbcf")
|
||||
font = ExtResource("1_fbwht")
|
||||
font_size = 32
|
||||
font_color = Color(0.737255, 0.705882, 0.690196, 1)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
[gd_resource type="LabelSettings" load_steps=2 format=3 uid="uid://b3jrpf2sdtsqo"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://bohbd123672ea" path="res://src/ui/fonts/FT88-Italic.ttf" id="1_usib5"]
|
||||
[ext_resource type="FontFile" uid="uid://ddvfnyovqnvew" path="res://src/ui/fonts/LSANSI.TTF" id="1_r2ost"]
|
||||
|
||||
[resource]
|
||||
font = ExtResource("1_usib5")
|
||||
font = ExtResource("1_r2ost")
|
||||
font_size = 36
|
||||
font_color = Color(0, 0.682353, 0.937255, 1)
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
[gd_resource type="LabelSettings" load_steps=2 format=3 uid="uid://cvjhqu13opvjq"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://bt7dv5ayfvmti" path="res://src/ui/fonts/bodoni-italic.ttf" id="1_u6juj"]
|
||||
|
||||
[resource]
|
||||
font = ExtResource("1_u6juj")
|
||||
font_size = 32
|
||||
font_color = Color(0.792157, 0.698039, 0.643137, 1)
|
||||
@@ -1,7 +1,7 @@
|
||||
[gd_scene load_steps=19 format=4 uid="uid://dxl8il8f13c2x"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b65cbirtijlii" path="res://src/ui/player_ui/PlayerInfoUI.cs" id="1_d8yyu"]
|
||||
[ext_resource type="LabelSettings" uid="uid://ca1q6yu8blwxf" path="res://src/ui/label_settings/InventoryMainTextBold.tres" id="2_aa7fx"]
|
||||
[ext_resource type="LabelSettings" uid="uid://cvjhqu13opvjq" path="res://src/ui/label_settings/PlayerUIStatName.tres" id="2_hkw8m"]
|
||||
[ext_resource type="LabelSettings" uid="uid://dupifadnagodp" path="res://src/ui/label_settings/MainTextRegular.tres" id="3_xdjh1"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_bqtin"]
|
||||
@@ -94,7 +94,9 @@ data = PackedByteArray("AAEAAAAOAIAAAwBgT1MvMlNnO3gAASZsAAAATmNtYXD2ngiaAAD9WAAA
|
||||
font_name = "Bodoni"
|
||||
style_name = "Italic"
|
||||
font_style = 2
|
||||
subpixel_positioning = 0
|
||||
msdf_pixel_range = 8
|
||||
msdf_size = 128
|
||||
cache/0/16/0/ascent = 12.0
|
||||
cache/0/16/0/descent = 5.0
|
||||
cache/0/16/0/underline_position = 1.6875
|
||||
@@ -102,27 +104,27 @@ cache/0/16/0/underline_thickness = 0.796875
|
||||
cache/0/16/0/scale = 1.0
|
||||
cache/0/16/0/textures/0/offsets = PackedInt32Array(69, 0, 187, 15)
|
||||
cache/0/16/0/textures/0/image = SubResource("Image_02jmw")
|
||||
cache/0/16/0/glyphs/43/advance = Vector2(12.6094, 15.5469)
|
||||
cache/0/16/0/glyphs/43/advance = Vector2(13, 16)
|
||||
cache/0/16/0/glyphs/43/offset = Vector2(-1, -12)
|
||||
cache/0/16/0/glyphs/43/size = Vector2(18, 13)
|
||||
cache/0/16/0/glyphs/43/uv_rect = Rect2(1, 1, 18, 13)
|
||||
cache/0/16/0/glyphs/43/texture_idx = 0
|
||||
cache/0/16/0/glyphs/51/advance = Vector2(9.73438, 15.5469)
|
||||
cache/0/16/0/glyphs/51/advance = Vector2(10, 16)
|
||||
cache/0/16/0/glyphs/51/offset = Vector2(-1, -12)
|
||||
cache/0/16/0/glyphs/51/size = Vector2(14, 13)
|
||||
cache/0/16/0/glyphs/51/uv_rect = Rect2(21, 1, 14, 13)
|
||||
cache/0/16/0/glyphs/51/texture_idx = 0
|
||||
cache/0/16/0/glyphs/29/advance = Vector2(3.84375, 15.5469)
|
||||
cache/0/16/0/glyphs/29/advance = Vector2(4, 16)
|
||||
cache/0/16/0/glyphs/29/offset = Vector2(0, -8)
|
||||
cache/0/16/0/glyphs/29/size = Vector2(6, 9)
|
||||
cache/0/16/0/glyphs/29/uv_rect = Rect2(37, 1, 6, 9)
|
||||
cache/0/16/0/glyphs/29/texture_idx = 0
|
||||
cache/0/16/0/glyphs/268435507/advance = Vector2(9.73438, 15.5469)
|
||||
cache/0/16/0/glyphs/268435507/advance = Vector2(10, 16)
|
||||
cache/0/16/0/glyphs/268435507/offset = Vector2(-1, -12)
|
||||
cache/0/16/0/glyphs/268435507/size = Vector2(15, 13)
|
||||
cache/0/16/0/glyphs/268435507/uv_rect = Rect2(45, 1, 15, 13)
|
||||
cache/0/16/0/glyphs/268435507/texture_idx = 0
|
||||
cache/0/16/0/glyphs/134217757/advance = Vector2(3.84375, 15.5469)
|
||||
cache/0/16/0/glyphs/134217757/advance = Vector2(4, 16)
|
||||
cache/0/16/0/glyphs/134217757/offset = Vector2(0, -8)
|
||||
cache/0/16/0/glyphs/134217757/size = Vector2(6, 9)
|
||||
cache/0/16/0/glyphs/134217757/uv_rect = Rect2(62, 1, 6, 9)
|
||||
@@ -203,17 +205,17 @@ cache/0/20/0/underline_thickness = 1.0
|
||||
cache/0/20/0/scale = 1.0
|
||||
cache/0/20/0/textures/0/offsets = PackedInt32Array(51, 0, 205, 17)
|
||||
cache/0/20/0/textures/0/image = SubResource("Image_d10ca")
|
||||
cache/0/20/0/glyphs/43/advance = Vector2(15.7656, 19.4375)
|
||||
cache/0/20/0/glyphs/43/advance = Vector2(16, 19)
|
||||
cache/0/20/0/glyphs/43/offset = Vector2(-1, -14)
|
||||
cache/0/20/0/glyphs/43/size = Vector2(21, 15)
|
||||
cache/0/20/0/glyphs/43/uv_rect = Rect2(1, 1, 21, 15)
|
||||
cache/0/20/0/glyphs/43/texture_idx = 0
|
||||
cache/0/20/0/glyphs/51/advance = Vector2(12.1563, 19.4375)
|
||||
cache/0/20/0/glyphs/51/advance = Vector2(12, 19)
|
||||
cache/0/20/0/glyphs/51/offset = Vector2(-1, -14)
|
||||
cache/0/20/0/glyphs/51/size = Vector2(17, 15)
|
||||
cache/0/20/0/glyphs/51/uv_rect = Rect2(24, 1, 17, 15)
|
||||
cache/0/20/0/glyphs/51/texture_idx = 0
|
||||
cache/0/20/0/glyphs/29/advance = Vector2(4.79688, 19.4375)
|
||||
cache/0/20/0/glyphs/29/advance = Vector2(5, 19)
|
||||
cache/0/20/0/glyphs/29/offset = Vector2(0, -8)
|
||||
cache/0/20/0/glyphs/29/size = Vector2(7, 9)
|
||||
cache/0/20/0/glyphs/29/uv_rect = Rect2(43, 1, 7, 9)
|
||||
@@ -359,7 +361,9 @@ data = PackedByteArray("AAEAAAAOAIAAAwBgT1MvMlNnO3gAASZsAAAATmNtYXD2ngiaAAD9WAAA
|
||||
font_name = "Bodoni"
|
||||
style_name = "Italic"
|
||||
font_style = 2
|
||||
subpixel_positioning = 0
|
||||
msdf_pixel_range = 8
|
||||
msdf_size = 128
|
||||
cache/0/16/0/ascent = 12.0
|
||||
cache/0/16/0/descent = 5.0
|
||||
cache/0/16/0/underline_position = 1.6875
|
||||
@@ -367,27 +371,27 @@ cache/0/16/0/underline_thickness = 0.796875
|
||||
cache/0/16/0/scale = 1.0
|
||||
cache/0/16/0/textures/0/offsets = PackedInt32Array(69, 0, 187, 15)
|
||||
cache/0/16/0/textures/0/image = SubResource("Image_02jmw")
|
||||
cache/0/16/0/glyphs/43/advance = Vector2(12.6094, 15.5469)
|
||||
cache/0/16/0/glyphs/43/advance = Vector2(13, 16)
|
||||
cache/0/16/0/glyphs/43/offset = Vector2(-1, -12)
|
||||
cache/0/16/0/glyphs/43/size = Vector2(18, 13)
|
||||
cache/0/16/0/glyphs/43/uv_rect = Rect2(1, 1, 18, 13)
|
||||
cache/0/16/0/glyphs/43/texture_idx = 0
|
||||
cache/0/16/0/glyphs/51/advance = Vector2(9.73438, 15.5469)
|
||||
cache/0/16/0/glyphs/51/advance = Vector2(10, 16)
|
||||
cache/0/16/0/glyphs/51/offset = Vector2(-1, -12)
|
||||
cache/0/16/0/glyphs/51/size = Vector2(14, 13)
|
||||
cache/0/16/0/glyphs/51/uv_rect = Rect2(21, 1, 14, 13)
|
||||
cache/0/16/0/glyphs/51/texture_idx = 0
|
||||
cache/0/16/0/glyphs/29/advance = Vector2(3.84375, 15.5469)
|
||||
cache/0/16/0/glyphs/29/advance = Vector2(4, 16)
|
||||
cache/0/16/0/glyphs/29/offset = Vector2(0, -8)
|
||||
cache/0/16/0/glyphs/29/size = Vector2(6, 9)
|
||||
cache/0/16/0/glyphs/29/uv_rect = Rect2(37, 1, 6, 9)
|
||||
cache/0/16/0/glyphs/29/texture_idx = 0
|
||||
cache/0/16/0/glyphs/268435507/advance = Vector2(9.73438, 15.5469)
|
||||
cache/0/16/0/glyphs/268435507/advance = Vector2(10, 16)
|
||||
cache/0/16/0/glyphs/268435507/offset = Vector2(-1, -12)
|
||||
cache/0/16/0/glyphs/268435507/size = Vector2(15, 13)
|
||||
cache/0/16/0/glyphs/268435507/uv_rect = Rect2(45, 1, 15, 13)
|
||||
cache/0/16/0/glyphs/268435507/texture_idx = 0
|
||||
cache/0/16/0/glyphs/134217757/advance = Vector2(3.84375, 15.5469)
|
||||
cache/0/16/0/glyphs/134217757/advance = Vector2(4, 16)
|
||||
cache/0/16/0/glyphs/134217757/offset = Vector2(0, -8)
|
||||
cache/0/16/0/glyphs/134217757/size = Vector2(6, 9)
|
||||
cache/0/16/0/glyphs/134217757/uv_rect = Rect2(62, 1, 6, 9)
|
||||
@@ -468,17 +472,17 @@ cache/0/20/0/underline_thickness = 1.0
|
||||
cache/0/20/0/scale = 1.0
|
||||
cache/0/20/0/textures/0/offsets = PackedInt32Array(51, 0, 205, 17)
|
||||
cache/0/20/0/textures/0/image = SubResource("Image_d10ca")
|
||||
cache/0/20/0/glyphs/43/advance = Vector2(15.7656, 19.4375)
|
||||
cache/0/20/0/glyphs/43/advance = Vector2(16, 19)
|
||||
cache/0/20/0/glyphs/43/offset = Vector2(-1, -14)
|
||||
cache/0/20/0/glyphs/43/size = Vector2(21, 15)
|
||||
cache/0/20/0/glyphs/43/uv_rect = Rect2(1, 1, 21, 15)
|
||||
cache/0/20/0/glyphs/43/texture_idx = 0
|
||||
cache/0/20/0/glyphs/51/advance = Vector2(12.1563, 19.4375)
|
||||
cache/0/20/0/glyphs/51/advance = Vector2(12, 19)
|
||||
cache/0/20/0/glyphs/51/offset = Vector2(-1, -14)
|
||||
cache/0/20/0/glyphs/51/size = Vector2(17, 15)
|
||||
cache/0/20/0/glyphs/51/uv_rect = Rect2(24, 1, 17, 15)
|
||||
cache/0/20/0/glyphs/51/texture_idx = 0
|
||||
cache/0/20/0/glyphs/29/advance = Vector2(4.79688, 19.4375)
|
||||
cache/0/20/0/glyphs/29/advance = Vector2(5, 19)
|
||||
cache/0/20/0/glyphs/29/offset = Vector2(0, -8)
|
||||
cache/0/20/0/glyphs/29/size = Vector2(7, 9)
|
||||
cache/0/20/0/glyphs/29/uv_rect = Rect2(43, 1, 7, 9)
|
||||
@@ -648,7 +652,7 @@ layout_mode = 2
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
theme_override_constants/separation = 15
|
||||
theme_override_constants/separation = 10
|
||||
|
||||
[node name="HP Box" type="HBoxContainer" parent="AspectRatio/PlayerInfo/HBoxContainer/VBox"]
|
||||
layout_mode = 2
|
||||
@@ -658,7 +662,7 @@ size_flags_horizontal = 3
|
||||
custom_minimum_size = Vector2(75, 0)
|
||||
layout_mode = 2
|
||||
text = "HP"
|
||||
label_settings = ExtResource("2_aa7fx")
|
||||
label_settings = ExtResource("2_hkw8m")
|
||||
|
||||
[node name="HPNumber" type="Label" parent="AspectRatio/PlayerInfo/HBoxContainer/VBox/HP Box"]
|
||||
unique_name_in_owner = true
|
||||
@@ -685,7 +689,7 @@ layout_mode = 2
|
||||
custom_minimum_size = Vector2(75, 0)
|
||||
layout_mode = 2
|
||||
text = "VT"
|
||||
label_settings = ExtResource("2_aa7fx")
|
||||
label_settings = ExtResource("2_hkw8m")
|
||||
|
||||
[node name="VTNumber" type="Label" parent="AspectRatio/PlayerInfo/HBoxContainer/VBox/VT Box"]
|
||||
unique_name_in_owner = true
|
||||
@@ -711,7 +715,7 @@ layout_mode = 2
|
||||
custom_minimum_size = Vector2(75, 0)
|
||||
layout_mode = 2
|
||||
text = "LVL."
|
||||
label_settings = ExtResource("2_aa7fx")
|
||||
label_settings = ExtResource("2_hkw8m")
|
||||
|
||||
[node name="LevelNumber" type="Label" parent="AspectRatio/PlayerInfo/HBoxContainer/VBox/Level Box"]
|
||||
unique_name_in_owner = true
|
||||
@@ -727,7 +731,7 @@ layout_mode = 2
|
||||
custom_minimum_size = Vector2(75, 0)
|
||||
layout_mode = 2
|
||||
text = "XP"
|
||||
label_settings = ExtResource("2_aa7fx")
|
||||
label_settings = ExtResource("2_hkw8m")
|
||||
|
||||
[node name="EXPNumber" type="Label" parent="AspectRatio/PlayerInfo/HBoxContainer/VBox/EXP Box"]
|
||||
unique_name_in_owner = true
|
||||
|
||||
Reference in New Issue
Block a user