Basic layout and textures, started work on first screen
This commit is contained in:
BIN
assets/fonts/PixelOperator8-Bold.ttf
Normal file
BIN
assets/fonts/PixelOperator8-Bold.ttf
Normal file
Binary file not shown.
36
assets/fonts/PixelOperator8-Bold.ttf.import
Normal file
36
assets/fonts/PixelOperator8-Bold.ttf.import
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="font_data_dynamic"
|
||||||
|
type="FontFile"
|
||||||
|
uid="uid://5pk6vnctpyaf"
|
||||||
|
path="res://.godot/imported/PixelOperator8-Bold.ttf-74faf550739674ad3170f08e646e0614.fontdata"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/fonts/PixelOperator8-Bold.ttf"
|
||||||
|
dest_files=["res://.godot/imported/PixelOperator8-Bold.ttf-74faf550739674ad3170f08e646e0614.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
|
||||||
|
modulate_color_glyphs=false
|
||||||
|
hinting=1
|
||||||
|
subpixel_positioning=4
|
||||||
|
keep_rounding_remainders=true
|
||||||
|
oversampling=0.0
|
||||||
|
Fallbacks=null
|
||||||
|
fallbacks=[]
|
||||||
|
Compress=null
|
||||||
|
compress=true
|
||||||
|
preload=[]
|
||||||
|
language_support={}
|
||||||
|
script_support={}
|
||||||
|
opentype_features={}
|
||||||
BIN
assets/fonts/PixelOperator8.ttf
Normal file
BIN
assets/fonts/PixelOperator8.ttf
Normal file
Binary file not shown.
36
assets/fonts/PixelOperator8.ttf.import
Normal file
36
assets/fonts/PixelOperator8.ttf.import
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="font_data_dynamic"
|
||||||
|
type="FontFile"
|
||||||
|
uid="uid://c3jmev24lo6ci"
|
||||||
|
path="res://.godot/imported/PixelOperator8.ttf-6f9f01766aff16f52046b880ffb8d367.fontdata"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/fonts/PixelOperator8.ttf"
|
||||||
|
dest_files=["res://.godot/imported/PixelOperator8.ttf-6f9f01766aff16f52046b880ffb8d367.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
|
||||||
|
modulate_color_glyphs=false
|
||||||
|
hinting=1
|
||||||
|
subpixel_positioning=4
|
||||||
|
keep_rounding_remainders=true
|
||||||
|
oversampling=0.0
|
||||||
|
Fallbacks=null
|
||||||
|
fallbacks=[]
|
||||||
|
Compress=null
|
||||||
|
compress=true
|
||||||
|
preload=[]
|
||||||
|
language_support={}
|
||||||
|
script_support={}
|
||||||
|
opentype_features={}
|
||||||
BIN
assets/sprites/AssetTileset.png
Normal file
BIN
assets/sprites/AssetTileset.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
40
assets/sprites/AssetTileset.png.import
Normal file
40
assets/sprites/AssetTileset.png.import
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://dlx02qat7j6lf"
|
||||||
|
path="res://.godot/imported/AssetTileset.png-61cab4eb65e8853e2f236960720774cb.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/sprites/AssetTileset.png"
|
||||||
|
dest_files=["res://.godot/imported/AssetTileset.png-61cab4eb65e8853e2f236960720774cb.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
42
scenes/button_small.tscn
Normal file
42
scenes/button_small.tscn
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
[gd_scene load_steps=7 format=3 uid="uid://d1wr0v5ht8vqb"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://frisgjvf17ym" path="res://scripts/button_small.gd" id="2_06p6p"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dlx02qat7j6lf" path="res://assets/sprites/AssetTileset.png" id="2_q2stu"]
|
||||||
|
[ext_resource type="FontFile" uid="uid://c3jmev24lo6ci" path="res://assets/fonts/PixelOperator8.ttf" id="3_dxjfy"]
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_6ptbq"]
|
||||||
|
atlas = ExtResource("2_q2stu")
|
||||||
|
region = Rect2(8, 16, 32, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_06p6p"]
|
||||||
|
atlas = ExtResource("2_q2stu")
|
||||||
|
region = Rect2(8, 32, 32, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_q2stu"]
|
||||||
|
atlas = ExtResource("2_q2stu")
|
||||||
|
region = Rect2(8, 0, 32, 16)
|
||||||
|
|
||||||
|
[node name="ButtonSmall" type="TextureButton"]
|
||||||
|
offset_top = -16.0
|
||||||
|
offset_right = 32.0
|
||||||
|
texture_normal = SubResource("AtlasTexture_6ptbq")
|
||||||
|
texture_pressed = SubResource("AtlasTexture_06p6p")
|
||||||
|
texture_hover = SubResource("AtlasTexture_q2stu")
|
||||||
|
script = ExtResource("2_06p6p")
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="."]
|
||||||
|
layout_mode = 0
|
||||||
|
offset_left = 1.0
|
||||||
|
offset_top = 5.0
|
||||||
|
offset_right = 31.0
|
||||||
|
offset_bottom = 13.0
|
||||||
|
theme_override_colors/font_color = Color(2.7723312e-05, 0.60865843, 0.9772685, 1)
|
||||||
|
theme_override_fonts/font = ExtResource("3_dxjfy")
|
||||||
|
theme_override_font_sizes/font_size = 8
|
||||||
|
text = "TEMP"
|
||||||
|
horizontal_alignment = 1
|
||||||
|
|
||||||
|
[connection signal="button_down" from="." to="." method="onButtonDown"]
|
||||||
|
[connection signal="button_up" from="." to="." method="onButtonUp"]
|
||||||
|
[connection signal="mouse_entered" from="." to="." method="onMouseEnter"]
|
||||||
|
[connection signal="mouse_exited" from="." to="." method="onMouseExit"]
|
||||||
19
scenes/create_join_room.tscn
Normal file
19
scenes/create_join_room.tscn
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
[gd_scene load_steps=3 format=3 uid="uid://cct663hb47yka"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" uid="uid://d1wr0v5ht8vqb" path="res://scenes/button_small.tscn" id="1_4km6l"]
|
||||||
|
[ext_resource type="Script" uid="uid://b1ogflafdte71" path="res://scripts/create_join_room.gd" id="1_k6yuv"]
|
||||||
|
|
||||||
|
[node name="CreateJoinRoom" type="Node2D"]
|
||||||
|
script = ExtResource("1_k6yuv")
|
||||||
|
|
||||||
|
[node name="JoinGameButton" parent="." instance=ExtResource("1_4km6l")]
|
||||||
|
offset_left = -16.0
|
||||||
|
offset_top = 12.0
|
||||||
|
offset_right = 16.0
|
||||||
|
offset_bottom = 28.0
|
||||||
|
|
||||||
|
[node name="CreateGameButton" parent="." instance=ExtResource("1_4km6l")]
|
||||||
|
offset_left = -16.0
|
||||||
|
offset_top = 40.0
|
||||||
|
offset_right = 16.0
|
||||||
|
offset_bottom = 56.0
|
||||||
12
scenes/game.tscn
Normal file
12
scenes/game.tscn
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
[gd_scene load_steps=2 format=3 uid="uid://cr8fi0e4r88s8"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" uid="uid://cct663hb47yka" path="res://scenes/create_join_room.tscn" id="1_uwrxv"]
|
||||||
|
|
||||||
|
[node name="Game" type="Node2D"]
|
||||||
|
|
||||||
|
[node name="GameManager" type="Node" parent="."]
|
||||||
|
|
||||||
|
[node name="Camera2D" type="Camera2D" parent="."]
|
||||||
|
zoom = Vector2(5, 5)
|
||||||
|
|
||||||
|
[node name="CreateJoinRoom" parent="." instance=ExtResource("1_uwrxv")]
|
||||||
22
scripts/button_small.gd
Normal file
22
scripts/button_small.gd
Normal 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);
|
||||||
1
scripts/button_small.gd.uid
Normal file
1
scripts/button_small.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://frisgjvf17ym
|
||||||
14
scripts/create_join_room.gd
Normal file
14
scripts/create_join_room.gd
Normal 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
|
||||||
1
scripts/create_join_room.gd.uid
Normal file
1
scripts/create_join_room.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://b1ogflafdte71
|
||||||
Reference in New Issue
Block a user