foitin/engine/scenes/title.gd
m3ultra 12528b4de0 Title screen, FOITIN editor, pck-safe loaders, export presets
- Title: PLAY / EDITOR entry
- Editor (in-app): edit fighter name/stats/colour -> user://overrides,
  import character folders -> user://characters, add stage backgrounds
  -> user://stages, open content folder
- loaders work in editor, exported .pck, and user:// drop-ins
  (ResourceLoader remap-stripping + byte-buffer fallbacks)
- stage backgrounds render behind fights when present
- export_presets: mac (universal, ad-hoc sign), win x86_64, linux x86_64

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-29 15:02:37 +10:00

42 lines
1.2 KiB
GDScript

extends Node2D
## Title screen: PLAY -> character select, EDITOR -> content editor.
func _ready() -> void:
var bg := ColorRect.new()
bg.color = Color("#101218")
bg.size = Vector2(1280, 720)
add_child(bg)
var title := Label.new()
title.text = "F O I T I N"
title.add_theme_font_size_override("font_size", 110)
title.position = Vector2(400, 170)
add_child(title)
var sub := Label.new()
sub.text = "digitized fighting"
sub.modulate = Color(1, 1, 1, 0.45)
sub.add_theme_font_size_override("font_size", 26)
sub.position = Vector2(540, 300)
add_child(sub)
_button("PLAY", Vector2(540, 420), func():
get_tree().change_scene_to_file("res://engine/scenes/Select.tscn"))
_button("EDITOR", Vector2(540, 500), func():
get_tree().change_scene_to_file("res://engine/scenes/Editor.tscn"))
var hint := Label.new()
hint.text = "P1: WASD + J/K P2: arrows + O/P"
hint.modulate = Color(1, 1, 1, 0.35)
hint.position = Vector2(470, 660)
add_child(hint)
func _button(text: String, pos: Vector2, cb: Callable) -> void:
var b := Button.new()
b.text = text
b.position = pos
b.size = Vector2(200, 56)
b.add_theme_font_size_override("font_size", 28)
b.pressed.connect(cb)
add_child(b)