Skip to content

Commit 0ab882e

Browse files
authored
Merge pull request #152 from Project-Funk-Engine/NewUITesting
Update UI
2 parents 6132f32 + 27235c3 commit 0ab882e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+937
-157
lines changed
-4 Bytes
Loading

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@ Music:
2424

2525
Images:
2626
- Input Buttons: [inputKeys - Nicolae (Xelu) Berbece](https://thoseawesomeguys.com/prompts/)
27+
- Light map texture: [Godot Engine docs - Godot Foundation](https://docs.godotengine.org/en/stable/tutorials/2d/2d_lights_and_shadows.html)
2728
- Title Screen Font: [04B-30 - Yuji Oshimoto](http://04.jp.org/)
28-
- Light map texture: [Godot Engine docs - Godot Foundation](https://docs.godotengine.org/en/stable/tutorials/2d/2d_lights_and_shadows.html)
29+
- Main System Font: [Fibberish - nathan scott](https://caffinate.itch.io/fibberish/)

Scenes/BattleDirector/BattleScene.tscn

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[gd_scene load_steps=10 format=3 uid="uid://b0mrgr7h0ty1y"]
1+
[gd_scene load_steps=11 format=3 uid="uid://b0mrgr7h0ty1y"]
22

33
[ext_resource type="Script" uid="uid://bttu0wmy2fp64" path="res://Scenes/BattleDirector/Scripts/BattleDirector.cs" id="1_jmdo1"]
44
[ext_resource type="Script" uid="uid://pl57giqyhckb" path="res://Scenes/UI/Scripts/MenuModule.cs" id="2_ka0ws"]
@@ -7,6 +7,7 @@
77
[ext_resource type="PackedScene" uid="uid://dfevfib11kou1" path="res://Scenes/ChartViewport/ChartViewport.tscn" id="5_r2xh0"]
88
[ext_resource type="Texture2D" uid="uid://qhwve7fik4do" path="res://SharedAssets/BackGround_Full.png" id="6_0jtpx"]
99
[ext_resource type="Texture2D" uid="uid://dbjotl0v1ymia" path="res://SharedAssets/BattleFrame1.png" id="7_klvil"]
10+
[ext_resource type="Theme" uid="uid://d37e3tpsbxwak" path="res://Scenes/UI/Assets/GeneralTheme.tres" id="8_62qim"]
1011

1112
[sub_resource type="Gradient" id="Gradient_8uy3a"]
1213
offsets = PackedFloat32Array(0, 0.766234, 1)
@@ -81,9 +82,9 @@ offset_bottom = 360.0
8182
texture = ExtResource("7_klvil")
8283

8384
[node name="StartButton" type="Button" parent="."]
84-
modulate = Color(5, 5, 5, 1)
8585
offset_left = 241.0
86-
offset_top = 234.0
87-
offset_right = 399.0
88-
offset_bottom = 265.0
86+
offset_top = 230.0
87+
offset_right = 443.0
88+
offset_bottom = 267.0
89+
theme = ExtResource("8_62qim")
8990
text = "BATTLE_ROOM_BEGIN_BUTTON"

Scenes/BattleDirector/NotePlacementBar.tscn

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ layout_mode = 0
108108
offset_right = 80.0
109109
offset_bottom = 35.0
110110
mouse_filter = 2
111-
text = " x1"
111+
theme_override_font_sizes/font_size = 32
112+
text = " x1"
112113
context_menu_enabled = false
113114
shortcut_keys_enabled = false
114115
selecting_enabled = false

Scenes/BattleDirector/Scripts/NotePlacementBar.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ private double CurrentBarValue
4949

5050
private void UpdateComboMultText()
5151
{
52-
_currentComboMultText.Text = $" x{ComboMult.ToString()}";
52+
_currentComboMultText.Text = $" x{ComboMult.ToString()}";
5353
}
5454
#endregion
5555

Scenes/ChestScene/ChestScene.tscn

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
[gd_scene load_steps=9 format=3 uid="uid://c4vmb783d3v03"]
1+
[gd_scene load_steps=10 format=3 uid="uid://c4vmb783d3v03"]
22

33
[ext_resource type="Script" uid="uid://cetn71kolbrmg" path="res://Scenes/ChestScene/ChestScene.cs" id="1_ardd2"]
44
[ext_resource type="AudioStream" uid="uid://be5ial13ynf3o" path="res://Audio/Song1.ogg" id="2_x78jo"]
55
[ext_resource type="Script" uid="uid://pl57giqyhckb" path="res://Scenes/UI/Scripts/MenuModule.cs" id="3_5uvci"]
66
[ext_resource type="Shader" uid="uid://dp36iuuy414k1" path="res://SharedAssets/StarryNight.gdshader" id="5_whthd"]
77
[ext_resource type="Texture2D" uid="uid://qhwve7fik4do" path="res://SharedAssets/BackGround_Full.png" id="6_37nar"]
88
[ext_resource type="Texture2D" uid="uid://d0ywqw1j1k71v" path="res://Scenes/ChestScene/Assets/Chest.png" id="6_58hf4"]
9+
[ext_resource type="Theme" uid="uid://bcejp4llrb3m0" path="res://Scenes/UI/Assets/EmptyButton.tres" id="6_pisq4"]
910
[ext_resource type="Texture2D" uid="uid://dbjotl0v1ymia" path="res://SharedAssets/BattleFrame1.png" id="7_kkck7"]
1011

1112
[sub_resource type="ShaderMaterial" id="ShaderMaterial_8x17a"]
@@ -18,7 +19,7 @@ shader_parameter/time_scale = 1.0
1819
[node name="ChestScene" type="Node2D" node_paths=PackedStringArray("ChestButton", "PlayerMarker")]
1920
process_mode = 1
2021
script = ExtResource("1_ardd2")
21-
ChestButton = NodePath("ChestButton")
22+
ChestButton = NodePath("CenterContainer/VBoxContainer/ChestButton")
2223
PlayerMarker = NodePath("PlayerMarker")
2324

2425
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
@@ -45,12 +46,34 @@ offset_right = 640.0
4546
offset_bottom = 360.0
4647
texture = ExtResource("7_kkck7")
4748

48-
[node name="ChestButton" type="Button" parent="."]
49-
offset_left = 375.0
50-
offset_top = 126.0
51-
offset_right = 431.0
49+
[node name="CenterContainer" type="CenterContainer" parent="."]
50+
offset_left = 348.0
51+
offset_top = 88.0
52+
offset_right = 424.0
5253
offset_bottom = 166.0
54+
55+
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"]
56+
layout_mode = 2
57+
58+
[node name="OpenLabel" type="Label" parent="CenterContainer/VBoxContainer"]
59+
layout_mode = 2
60+
theme_override_colors/font_shadow_color = Color(0, 0, 0, 1)
61+
theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
62+
theme_override_constants/shadow_offset_x = 2
63+
theme_override_constants/shadow_offset_y = 3
64+
theme_override_constants/outline_size = 2
65+
theme_override_constants/shadow_outline_size = 6
66+
theme_override_font_sizes/font_size = 48
67+
text = "!"
68+
horizontal_alignment = 1
69+
vertical_alignment = 1
70+
71+
[node name="ChestButton" type="Button" parent="CenterContainer/VBoxContainer"]
72+
custom_minimum_size = Vector2(60, 44)
73+
layout_mode = 2
74+
theme = ExtResource("6_pisq4")
5375
icon = ExtResource("6_58hf4")
76+
icon_alignment = 1
5477

5578
[node name="SubViewportContainer" type="SubViewportContainer" parent="."]
5679
z_index = -2

Scenes/Maps/Cartographer.tscn

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
1-
[gd_scene load_steps=5 format=3 uid="uid://cydmo2lbnj1de"]
1+
[gd_scene load_steps=6 format=3 uid="uid://cydmo2lbnj1de"]
22

3-
[ext_resource type="Script" path="res://Scenes/Maps/Scripts/Cartographer.cs" id="1_u4q3n"]
3+
[ext_resource type="Script" uid="uid://dtlpiwt4n3pta" path="res://Scenes/Maps/Scripts/Cartographer.cs" id="1_u4q3n"]
44
[ext_resource type="Texture2D" uid="uid://qhwve7fik4do" path="res://SharedAssets/BackGround_Full.png" id="2_5g6at"]
5-
[ext_resource type="Script" path="res://Scenes/UI/Scripts/MenuModule.cs" id="2_cl7v0"]
5+
[ext_resource type="Script" uid="uid://pl57giqyhckb" path="res://Scenes/UI/Scripts/MenuModule.cs" id="2_cl7v0"]
6+
[ext_resource type="Theme" uid="uid://bcejp4llrb3m0" path="res://Scenes/UI/Assets/EmptyButton.tres" id="2_rnj1y"]
67
[ext_resource type="Texture2D" uid="uid://cmc7gcplqnebx" path="res://SharedAssets/Player.png" id="3_qiprp"]
78

89
[node name="Cartographer" type="Node2D" node_paths=PackedStringArray("PlayerSprite")]
910
process_mode = 1
1011
script = ExtResource("1_u4q3n")
1112
PlayerSprite = NodePath("Player")
13+
ButtonTheme = ExtResource("2_rnj1y")
1214

1315
[node name="UI" type="CanvasLayer" parent="." node_paths=PackedStringArray("CurSceneNode")]
1416
script = ExtResource("2_cl7v0")
1517
CurSceneNode = NodePath("..")
1618

1719
[node name="BG" type="Sprite2D" parent="."]
1820
modulate = Color(0.462, 0.462, 0.66, 1)
19-
position = Vector2(870, 219)
20-
scale = Vector2(2.75702, 2.75702)
21+
position = Vector2(-10, 229)
22+
scale = Vector2(3, 3)
2123
texture = ExtResource("2_5g6at")
2224

2325
[node name="Player" type="Sprite2D" parent="."]

Scenes/Maps/Scripts/Cartographer.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ public partial class Cartographer : Node2D
1414
[Export]
1515
public Sprite2D PlayerSprite;
1616

17+
[Export]
18+
public Theme ButtonTheme;
19+
1720
private Button[] _validButtons = Array.Empty<Button>();
1821

1922
private Button _focusedButton;
@@ -70,9 +73,14 @@ private void DrawMap()
7073
AddFocusNeighbors();
7174
}
7275

76+
private static readonly Vector2 MapIconSize = new(48, 48);
77+
7378
private void DrawMapSprite(MapGrid.Room room)
7479
{
7580
var newButton = new Button();
81+
newButton.Theme = ButtonTheme;
82+
newButton.CustomMinimumSize = MapIconSize;
83+
newButton.IconAlignment = HorizontalAlignment.Center;
7684
AddChild(newButton);
7785
//button is disabled if it is not a child of current room.
7886
if (!StageProducer.GetCurRoom().Children.Contains(room.Idx))
@@ -94,7 +102,7 @@ private void DrawMapSprite(MapGrid.Room room)
94102
newButton.Icon = StageIcons[room.Type];
95103

96104
newButton.ZIndex = 1;
97-
newButton.Position = GetPosition(room.X, room.Y) - newButton.Size * 2;
105+
newButton.Position = GetPosition(room.X, room.Y) - newButton.Size / 2;
98106
if (room == StageProducer.GetCurRoom())
99107
PlayerSprite.Position = newButton.Position + newButton.Size * .5f;
100108
}

Scenes/UI/Assets/3DButton.png

1.97 KB
Loading
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="CompressedTexture2D"
5+
uid="uid://dj0nfgig1kd5l"
6+
path="res://.godot/imported/3DButton.png-5667e80fe10b05a655cb053e722bb974.ctex"
7+
metadata={
8+
"vram_texture": false
9+
}
10+
11+
[deps]
12+
13+
source_file="res://Scenes/UI/Assets/3DButton.png"
14+
dest_files=["res://.godot/imported/3DButton.png-5667e80fe10b05a655cb053e722bb974.ctex"]
15+
16+
[params]
17+
18+
compress/mode=0
19+
compress/high_quality=false
20+
compress/lossy_quality=0.7
21+
compress/hdr_compression=1
22+
compress/normal_map=0
23+
compress/channel_pack=0
24+
mipmaps/generate=false
25+
mipmaps/limit=-1
26+
roughness/mode=0
27+
roughness/src_normal=""
28+
process/fix_alpha_border=true
29+
process/premult_alpha=false
30+
process/normal_map_invert_y=false
31+
process/hdr_as_srgb=false
32+
process/hdr_clamp_exposure=false
33+
process/size_limit=0
34+
detect_3d/compress_to=1

0 commit comments

Comments
 (0)