main menu changes

This commit is contained in:
Fabio 2024-08-17 11:20:56 +02:00
parent 18e144e81d
commit bb034108c8
8 changed files with 226 additions and 94 deletions

Binary file not shown.

View file

@ -0,0 +1,34 @@
[remap]
importer="font_data_dynamic"
type="FontFile"
uid="uid://d3pbvdemdbxes"
path="res://.godot/imported/CommodoreSixtyFour.ttf-500f068f8657866f33df01894c79f165.fontdata"
[deps]
source_file="res://CommodoreSixtyFour.ttf"
dest_files=["res://.godot/imported/CommodoreSixtyFour.ttf-500f068f8657866f33df01894c79f165.fontdata"]
[params]
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
allow_system_fallback=true
force_autohinter=false
hinting=1
subpixel_positioning=1
oversampling=0.0
Fallbacks=null
fallbacks=[]
Compress=null
compress=true
preload=[]
language_support={}
script_support={}
opentype_features={}

BIN
gmtk_2024/Winds 7.ttf Normal file

Binary file not shown.

View file

@ -0,0 +1,34 @@
[remap]
importer="font_data_dynamic"
type="FontFile"
uid="uid://b1m5vkvhmf1x8"
path="res://.godot/imported/Winds 7.ttf-d65fb42952f9ffdf099366b21f03c274.fontdata"
[deps]
source_file="res://Winds 7.ttf"
dest_files=["res://.godot/imported/Winds 7.ttf-d65fb42952f9ffdf099366b21f03c274.fontdata"]
[params]
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
allow_system_fallback=true
force_autohinter=false
hinting=1
subpixel_positioning=1
oversampling=0.0
Fallbacks=null
fallbacks=[]
Compress=null
compress=true
preload=[]
language_support={}
script_support={}
opentype_features={}

View file

@ -1,59 +0,0 @@
extends Control
var display_text = "ULTIM809 COMPUTER BY MATT SARNOFF\nDEBUG ROM V0.3 - 28 JUN 2010\n512KB AVAILABLE RAM\n\nCARD: NO NAME\n128040960 BYTES\nOFFSETS: F:33 R:279 D:311\n\nMONITOR READY."
var current_text = ""
var char_index = 0
var typing_speed = 0.05
var fast_typing_speed = 0.01
func _ready():
modulate = Color(0, 0, 0)
$VBoxContainer/Label.add_theme_color_override("font_color", Color(0, 1, 0))
$VBoxContainer/Label.set_custom_minimum_size(Vector2(20, 0))
for button in $VBoxContainer.get_children():
if button is Button:
button.visible = false
button.add_theme_color_override("font_color", Color(0, 1, 0))
button.add_theme_stylebox_override("normal", StyleBoxEmpty.new())
_start_typing()
func _process(delta: float) -> void:
if Input.is_action_pressed("ui_accept") or Input.is_action_pressed("click"):
typing_speed = fast_typing_speed
else:
typing_speed = 0.05
func _start_typing() -> void:
current_text = ""
char_index = 0
_update_text()
func _update_text() -> void:
if char_index < display_text.length():
current_text += display_text[char_index]
$VBoxContainer/Label.text = current_text
char_index += 1
await get_tree().create_timer(typing_speed).timeout
_update_text()
else:
_show_menu_options()
func _show_menu_options() -> void:
for button in $VBoxContainer.get_children():
button.visible = true
func _on_start_button_pressed() -> void:
print("Start Button Clicked")
func _on_credits_button_pressed() -> void:
print("Credits Button Clicked")
func _on_quit_button_pressed() -> void:
$VBoxContainer/Label.text += "\nBye!"
await get_tree().create_timer(1).timeout
get_tree().quit()

View file

@ -1,34 +0,0 @@
[gd_scene load_steps=2 format=3 uid="uid://cscsuljo8ivad"]
[ext_resource type="Script" path="res://control.gd" id="1_demfw"]
[node name="Control" type="Control"]
layout_mode = 3
anchors_preset = 0
offset_right = 40.0
offset_bottom = 40.0
script = ExtResource("1_demfw")
[node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 2
offset_right = 70.0
offset_bottom = 101.0
[node name="Label" type="Label" parent="VBoxContainer"]
layout_mode = 2
[node name="start" type="Button" parent="VBoxContainer"]
layout_mode = 2
text = ">start"
[node name="credits" type="Button" parent="VBoxContainer"]
layout_mode = 2
text = ">credits"
[node name="quit" type="Button" parent="VBoxContainer"]
layout_mode = 2
text = ">quit"
[connection signal="pressed" from="VBoxContainer/start" to="." method="_on_start_button_pressed"]
[connection signal="pressed" from="VBoxContainer/credits" to="." method="_on_credits_button_pressed"]
[connection signal="pressed" from="VBoxContainer/quit" to="." method="_on_quit_button_pressed"]

View file

@ -0,0 +1,157 @@
[gd_scene load_steps=3 format=3 uid="uid://dpiyhpt7it05x"]
[ext_resource type="FontFile" uid="uid://d3pbvdemdbxes" path="res://CommodoreSixtyFour.ttf" id="1_4eeva"]
[sub_resource type="GDScript" id="GDScript_0d3dd"]
script/source = "extends Control
var display_text = \"\"\"
SYSTEM INITIALIZATION...
---------------------------------------
PLACEHOLDER BOOT SEQUENCE
COPYRIGHT PLACEHOLDER
> CPU:
> MEMORY:
> STORAGE:
> GPU:
>> WARNING:
>> RECOMMENDED ACTION:
SYSTEM READY.
PRESS START TO INITIATE.
\"\"\"
var current_text = \"\"
var char_index = 0
var typing_speed = 0.05
var fast_typing_speed = 0.01
func _ready():
modulate = Color(0, 0, 0)
$VBoxContainer/Label.add_theme_color_override(\"font_color\", Color(0, 1, 0))
$VBoxContainer/Label.set_custom_minimum_size(Vector2(20, 0))
for button in $VBoxContainer/VBoxContainer2.get_children():
if button is Button:
button.visible = false
button.add_theme_color_override(\"font_color\", Color(0, 1, 0))
button.add_theme_stylebox_override(\"normal\", StyleBoxEmpty.new())
_start_typing()
func _process(delta: float) -> void:
if Input.is_action_pressed(\"ui_accept\") or Input.is_action_pressed(\"click\"):
typing_speed = fast_typing_speed
else:
typing_speed = 0.05
func _start_typing() -> void:
current_text = \"\"
char_index = 0
_update_text()
func _update_text() -> void:
if char_index < display_text.length():
current_text += display_text[char_index]
$VBoxContainer/Label.text = current_text
char_index += 1
await get_tree().create_timer(typing_speed).timeout
_update_text()
else:
_show_menu_options()
func _show_menu_options() -> void:
for button in $VBoxContainer/VBoxContainer2.get_children():
button.visible = true
func _on_start_button_pressed() -> void:
print(\"Start Button Clicked\")
func _on_credits_button_pressed() -> void:
print(\"Credits Button Clicked\")
func _on_quit_button_pressed() -> void:
$VBoxContainer/Label.text += \"\\nBye!\"
await get_tree().create_timer(1).timeout
get_tree().quit()
"
[node name="MainMenu" type="MarginContainer"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="ColorRect" type="ColorRect" parent="."]
visible = false
layout_mode = 2
color = Color(0, 0, 0, 1)
[node name="Control" type="Control" parent="."]
layout_mode = 2
script = SubResource("GDScript_0d3dd")
[node name="VBoxContainer" type="VBoxContainer" parent="Control"]
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
[node name="Label" type="Label" parent="Control/VBoxContainer"]
layout_mode = 2
theme_override_colors/font_color = Color(0, 1, 0, 1)
theme_override_fonts/font = ExtResource("1_4eeva")
[node name="VBoxContainer2" type="VBoxContainer" parent="Control/VBoxContainer"]
layout_mode = 2
[node name="HBoxContainer" type="HBoxContainer" parent="Control/VBoxContainer/VBoxContainer2"]
layout_mode = 2
[node name="Label" type="Label" parent="Control/VBoxContainer/VBoxContainer2/HBoxContainer"]
custom_minimum_size = Vector2(8, 0)
layout_mode = 2
theme_override_fonts/font = ExtResource("1_4eeva")
text = ">"
[node name="start" type="Button" parent="Control/VBoxContainer/VBoxContainer2/HBoxContainer"]
layout_mode = 2
theme_override_fonts/font = ExtResource("1_4eeva")
text = "start"
[node name="HBoxContainer2" type="HBoxContainer" parent="Control/VBoxContainer/VBoxContainer2"]
layout_mode = 2
[node name="Label" type="Label" parent="Control/VBoxContainer/VBoxContainer2/HBoxContainer2"]
custom_minimum_size = Vector2(8, 0)
layout_mode = 2
theme_override_fonts/font = ExtResource("1_4eeva")
text = ">"
[node name="credits" type="Button" parent="Control/VBoxContainer/VBoxContainer2/HBoxContainer2"]
layout_mode = 2
theme_override_fonts/font = ExtResource("1_4eeva")
text = "credits"
[node name="HBoxContainer3" type="HBoxContainer" parent="Control/VBoxContainer/VBoxContainer2"]
layout_mode = 2
[node name="Label" type="Label" parent="Control/VBoxContainer/VBoxContainer2/HBoxContainer3"]
custom_minimum_size = Vector2(8, 0)
layout_mode = 2
theme_override_fonts/font = ExtResource("1_4eeva")
text = ">"
[node name="quit" type="Button" parent="Control/VBoxContainer/VBoxContainer2/HBoxContainer3"]
layout_mode = 2
theme_override_fonts/font = ExtResource("1_4eeva")
text = "quit"
[connection signal="pressed" from="Control/VBoxContainer/VBoxContainer2/HBoxContainer/start" to="Control" method="_on_start_button_pressed"]
[connection signal="pressed" from="Control/VBoxContainer/VBoxContainer2/HBoxContainer2/credits" to="Control" method="_on_credits_button_pressed"]
[connection signal="pressed" from="Control/VBoxContainer/VBoxContainer2/HBoxContainer3/quit" to="Control" method="_on_quit_button_pressed"]

View file

@ -11,7 +11,7 @@ config_version=5
[application]
config/name="GMTK_2024"
run/main_scene="res://levels/TestingRoom.tscn"
run/main_scene="res://menu/main_menu/main_menu.tscn"
config/features=PackedStringArray("4.3", "GL Compatibility")
config/icon="res://icon.svg"