Basic layout and textures, started work on first screen

This commit is contained in:
Multiplyster
2025-11-21 20:40:29 -05:00
Unverified
parent 395d76a208
commit 13bf28712e
13 changed files with 223 additions and 0 deletions

22
scripts/button_small.gd Normal file
View File

@@ -0,0 +1,22 @@
extends TextureButton
@onready var label: Label = $Label
const DEFAULT_COLOR = Color(0.0, 0.6087, 0.9773, 1.0);
const HOVERED_COLOR = Color(0.29, 0.792, 1.0, 1.0);
const CLICKED_COLOR = Color(0.0, 0.243, 0.447, 1.0);
func onMouseEnter() -> void:
label.add_theme_color_override("font_color", HOVERED_COLOR);
func onMouseExit() -> void:
label.add_theme_color_override("font_color", DEFAULT_COLOR);
func onButtonDown() -> void:
label.add_theme_color_override("font_color", CLICKED_COLOR);
func onButtonUp() -> void:
if is_hovered():
label.add_theme_color_override("font_color", HOVERED_COLOR);
else:
label.add_theme_color_override("font_color", DEFAULT_COLOR);

View File

@@ -0,0 +1 @@
uid://frisgjvf17ym

View File

@@ -0,0 +1,14 @@
extends Node2D
@onready var join_game_button: TextureButton = $JoinGameButton
@onready var create_game_button: TextureButton = $CreateGameButton
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
(join_game_button.get_node("Label") as Label).text = "JOIN";
(create_game_button.get_node("Label") as Label).text = "HOST";
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass

View File

@@ -0,0 +1 @@
uid://b1ogflafdte71