From f5f98ba77da5ed33a49d85ca0d33ace4a1d3b176 Mon Sep 17 00:00:00 2001 From: Tomasz Boruc Date: Fri, 7 Nov 2025 00:13:27 +0100 Subject: [PATCH] Zmian menu na canvas --- scenes/menu.tscn | 13 ++----------- scenes/planet.tscn | 4 ++-- scripts/BuildingsList.gd | 2 +- scripts/galaxy.gd | 2 +- scripts/menu.gd | 2 +- 5 files changed, 7 insertions(+), 16 deletions(-) diff --git a/scenes/menu.tscn b/scenes/menu.tscn index e993f3c..c60a390 100644 --- a/scenes/menu.tscn +++ b/scenes/menu.tscn @@ -249,21 +249,13 @@ _data = { &"ship3": SubResource("Animation_rsfmq") } -[node name="MainMenu" type="Control"] +[node name="MainMenu" type="CanvasLayer"] process_mode = 3 -top_level = true -z_index = 100 -layout_mode = 3 -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 +layer = 50 script = ExtResource("1_vjb58") [node name="TextureRect" type="TextureRect" parent="."] z_index = 10 -layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 @@ -538,7 +530,6 @@ autoplay = "ship3" [node name="VBoxContainer" type="GridContainer" parent="."] visible = false -layout_mode = 1 anchors_preset = 2 anchor_top = 1.0 anchor_bottom = 1.0 diff --git a/scenes/planet.tscn b/scenes/planet.tscn index fe77217..94e9d46 100644 --- a/scenes/planet.tscn +++ b/scenes/planet.tscn @@ -39,10 +39,10 @@ vertical_alignment = 1 [node name="Info" type="Label" parent="CanvasLayer"] offset_left = 16.0 offset_top = 32.0 -offset_right = 278.0 +offset_right = 375.0 offset_bottom = 215.0 theme_override_colors/font_outline_color = Color(0, 0, 0, 1) theme_override_constants/outline_size = 1 theme_override_fonts/font = ExtResource("3_ggt7d") -theme_override_font_sizes/font_size = 9 +theme_override_font_sizes/font_size = 17 autowrap_mode = 2 diff --git a/scripts/BuildingsList.gd b/scripts/BuildingsList.gd index 7b1f52a..25c3ea9 100644 --- a/scripts/BuildingsList.gd +++ b/scripts/BuildingsList.gd @@ -81,7 +81,7 @@ func _ready(): func _load_mod_buildings(): - var mod_path = "res://mods/buildings1.json" + var mod_path = "res://mods/buildings.json" if not FileAccess.file_exists(mod_path): print("Brak pliku modów: ", mod_path) diff --git a/scripts/galaxy.gd b/scripts/galaxy.gd index 246700b..bb29c09 100644 --- a/scripts/galaxy.gd +++ b/scripts/galaxy.gd @@ -108,7 +108,7 @@ func show_menu(): var menu_instance = MenuScene.instantiate() #TimeDispaly.visible = false add_child(menu_instance) - menu_instance.z_index = 100 # na wierzchu wszystkiego + #menu_instance.z_index = 100 # na wierzchu wszystkiego get_tree().paused = true # pauzuje grę, jeśli chcesz diff --git a/scripts/menu.gd b/scripts/menu.gd index 892f1f1..e671b4b 100644 --- a/scripts/menu.gd +++ b/scripts/menu.gd @@ -1,4 +1,4 @@ -extends Control +extends CanvasLayer @onready var option_popup = $OptionPopup @onready var back_button = $TextureRect/back @onready var save_button = $TextureRect/save