Removed decimal places in speed display, dadded style to menu

This commit is contained in:
KingGurke 2023-10-01 17:12:57 +02:00
parent a72576bea6
commit 3e41ef3aaa
2 changed files with 46 additions and 2 deletions

View file

@ -6,7 +6,7 @@ extends Control
@export var distance: Label @export var distance: Label
func _on_player_speed_changed(speed_float:float): func _on_player_speed_changed(speed_float:float):
var speed_string = "%.02f" % speed_float var speed_string = "%.f" % speed_float
# print_debug("changing speed display to ", speed_string) # print_debug("changing speed display to ", speed_string)
speed.set_text(speed_string) speed.set_text(speed_string)

View file

@ -1,7 +1,50 @@
[gd_scene load_steps=2 format=3 uid="uid://bgtkxeh3lciik"] [gd_scene load_steps=6 format=3 uid="uid://bgtkxeh3lciik"]
[ext_resource type="Script" path="res://src/gui/menu/main.gd" id="1_p5r7q"] [ext_resource type="Script" path="res://src/gui/menu/main.gd" id="1_p5r7q"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_2u7je"]
bg_color = Color(1, 1, 1, 1)
border_width_left = 2
border_width_top = 2
border_width_right = 2
border_width_bottom = 2
border_color = Color(0, 0, 0, 1)
border_blend = true
corner_radius_top_left = 5
corner_radius_top_right = 5
corner_radius_bottom_right = 5
corner_radius_bottom_left = 5
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_uo2yv"]
bg_color = Color(1, 1, 1, 1)
corner_radius_top_left = 5
corner_radius_top_right = 5
corner_radius_bottom_right = 5
corner_radius_bottom_left = 5
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_sjhib"]
bg_color = Color(0, 0, 0, 1)
border_width_left = 2
border_width_top = 2
border_width_right = 2
border_width_bottom = 2
border_color = Color(1, 1, 1, 1)
border_blend = true
corner_radius_top_left = 5
corner_radius_top_right = 5
corner_radius_bottom_right = 5
corner_radius_bottom_left = 5
[sub_resource type="Theme" id="Theme_67fiq"]
Button/colors/font_color = Color(0, 0, 0, 1)
Button/colors/font_focus_color = Color(0, 0, 0, 1)
Button/colors/font_hover_color = Color(0, 0, 0, 1)
Button/colors/font_hover_pressed_color = Color(0, 0, 0, 1)
Button/colors/font_pressed_color = Color(1, 1, 1, 1)
Button/styles/hover = SubResource("StyleBoxFlat_2u7je")
Button/styles/normal = SubResource("StyleBoxFlat_uo2yv")
Button/styles/pressed = SubResource("StyleBoxFlat_sjhib")
[node name="Menu" type="Control"] [node name="Menu" type="Control"]
layout_mode = 3 layout_mode = 3
anchors_preset = 15 anchors_preset = 15
@ -9,6 +52,7 @@ anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
grow_horizontal = 2 grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
theme = SubResource("Theme_67fiq")
script = ExtResource("1_p5r7q") script = ExtResource("1_p5r7q")
[node name="VBoxContainer" type="VBoxContainer" parent="."] [node name="VBoxContainer" type="VBoxContainer" parent="."]