From 021d34731268955106becbf32f79e8c707cb1102 Mon Sep 17 00:00:00 2001 From: Tomasz Boruc Date: Fri, 9 Oct 2026 18:38:58 +0200 Subject: [PATCH] Zmniejszenia skali --- scenes/game/game.tscn | 10 +++++----- scenes/game/player_ship.tscn | 2 +- scenes/game/weapon_test_target.tscn | 14 +++++++------- scenes/ui/inventory_slot_view.tscn | 4 ++-- scenes/ui/ship_equipment_panel.tscn | 28 ++++++++++++++-------------- scenes/ui/ship_inventory_panel.tscn | 12 ++++++------ scripts/game/ship_controller.gd | 2 +- scripts/ui/equipment_slot_view.gd | 8 +++++++- scripts/ui/ship_schematic.gd | 1 + 9 files changed, 44 insertions(+), 37 deletions(-) diff --git a/scenes/game/game.tscn b/scenes/game/game.tscn index 5220a6b..aa07676 100644 --- a/scenes/game/game.tscn +++ b/scenes/game/game.tscn @@ -67,8 +67,8 @@ mouse_filter = 2 [node name="DebugToggle" type="Button" parent="HUD/HUDRoot"] offset_left = 18.0 offset_top = 16.0 -offset_right = 120.0 -offset_bottom = 44.0 +offset_right = 110.0 +offset_bottom = 42.0 flat = true theme_override_colors/font_color = Color(0.72, 0.88, 0.98, 1) text = "DEBUG [−]" @@ -76,10 +76,10 @@ text = "DEBUG [−]" [node name="DebugInfo" type="Label" parent="HUD/HUDRoot"] offset_left = 22.0 offset_top = 48.0 -offset_right = 340.0 -offset_bottom = 470.0 +offset_right = 295.0 +offset_bottom = 420.0 theme_override_colors/font_color = Color(0.72, 0.88, 0.98, 1) -theme_override_font_sizes/font_size = 15 +theme_override_font_sizes/font_size = 11 text = "STATEK\nKADŁUB: 100 / 100\nTARCZE: 100 / 100\nENERGIA: 100 / 100" [node name="ShipEquipmentPanel" parent="HUD/HUDRoot" instance=ExtResource("5_equipment")] diff --git a/scenes/game/player_ship.tscn b/scenes/game/player_ship.tscn index e28d2bd..f791a16 100644 --- a/scenes/game/player_ship.tscn +++ b/scenes/game/player_ship.tscn @@ -5,7 +5,7 @@ [ext_resource type="Script" path="res://scripts/game/weapon_controller.gd" id="3_weapons"] [sub_resource type="CircleShape2D" id="ShipCollision"] -radius = 24.0 +radius = 18.0 [node name="PlayerShip" type="CharacterBody2D"] collision_layer = 2 diff --git a/scenes/game/weapon_test_target.tscn b/scenes/game/weapon_test_target.tscn index eaa357c..16237d3 100644 --- a/scenes/game/weapon_test_target.tscn +++ b/scenes/game/weapon_test_target.tscn @@ -4,7 +4,7 @@ [ext_resource type="Texture2D" path="res://assets/Ships/Spaceship_0.png" id="2_texture"] [sub_resource type="CircleShape2D" id="TargetCollision"] -radius = 34.0 +radius = 27.0 [node name="WeaponTestTarget" type="StaticBody2D"] collision_layer = 4 @@ -13,19 +13,19 @@ script = ExtResource("1_script") [node name="Sprite2D" type="Sprite2D" parent="."] texture = ExtResource("2_texture") -scale = Vector2(0.25, 0.25) +scale = Vector2(0.18, 0.18) texture_filter = 1 [node name="CollisionShape2D" type="CollisionShape2D" parent="."] shape = SubResource("TargetCollision") [node name="NameLabel" type="Label" parent="."] -offset_left = -90.0 -offset_top = 42.0 -offset_right = 90.0 -offset_bottom = 66.0 +offset_left = -70.0 +offset_top = 32.0 +offset_right = 70.0 +offset_bottom = 52.0 theme_override_colors/font_color = Color(0.65, 0.9, 1, 1) -theme_override_font_sizes/font_size = 16 +theme_override_font_sizes/font_size = 12 text = "CEL TESTOWY" horizontal_alignment = 1 mouse_filter = 2 diff --git a/scenes/ui/inventory_slot_view.tscn b/scenes/ui/inventory_slot_view.tscn index aa8f91d..acfa153 100644 --- a/scenes/ui/inventory_slot_view.tscn +++ b/scenes/ui/inventory_slot_view.tscn @@ -3,14 +3,14 @@ [ext_resource type="Script" path="res://scripts/ui/equipment_slot_view.gd" id="1_slot"] [node name="InventorySlot" type="PanelContainer"] -custom_minimum_size = Vector2(86, 62) +custom_minimum_size = Vector2(72, 48) script = ExtResource("1_slot") [node name="SlotLabel" type="Label" parent="."] layout_mode = 2 mouse_filter = 2 theme_override_colors/font_color = Color(0.82, 0.86, 0.9, 1) -theme_override_font_sizes/font_size = 12 +theme_override_font_sizes/font_size = 9 text = "PUSTY" horizontal_alignment = 1 vertical_alignment = 1 diff --git a/scenes/ui/ship_equipment_panel.tscn b/scenes/ui/ship_equipment_panel.tscn index a628f23..e295f47 100644 --- a/scenes/ui/ship_equipment_panel.tscn +++ b/scenes/ui/ship_equipment_panel.tscn @@ -10,19 +10,19 @@ border_width_top = 1 border_width_right = 1 border_width_bottom = 1 border_color = Color(0.12, 0.32, 0.4, 0.9) -content_margin_left = 10.0 -content_margin_top = 8.0 -content_margin_right = 10.0 -content_margin_bottom = 8.0 +content_margin_left = 7.0 +content_margin_top = 6.0 +content_margin_right = 7.0 +content_margin_bottom = 6.0 [node name="ShipEquipmentPanel" type="PanelContainer"] anchors_preset = 1 anchor_left = 1.0 anchor_right = 1.0 -offset_left = -310.0 -offset_top = 18.0 -offset_right = -18.0 -offset_bottom = 558.0 +offset_left = -248.0 +offset_top = 14.0 +offset_right = -14.0 +offset_bottom = 454.0 grow_horizontal = 0 grow_vertical = 0 theme_override_styles/panel = SubResource("EquipmentPanelStyle") @@ -34,14 +34,14 @@ theme_override_constants/separation = 6 [node name="Title" type="Label" parent="Contents"] layout_mode = 2 theme_override_colors/font_color = Color(0.72, 0.88, 0.98, 1) -theme_override_font_sizes/font_size = 16 +theme_override_font_sizes/font_size = 12 text = "WYPOSAŻENIE STATKU" horizontal_alignment = 1 [node name="WeaponLabel" type="Label" parent="Contents"] layout_mode = 2 theme_override_colors/font_color = Color(0.98, 0.72, 0.38, 1) -theme_override_font_sizes/font_size = 13 +theme_override_font_sizes/font_size = 10 text = "BROŃ PRZEDNIA" horizontal_alignment = 1 @@ -51,25 +51,25 @@ theme_override_constants/separation = 8 [node name="Weapon1" parent="Contents/WeaponSlots" instance=ExtResource("2_slot")] layout_mode = 2 -custom_minimum_size = Vector2(118, 48) +custom_minimum_size = Vector2(90, 38) slot_kind = "weapon" slot_index = 0 [node name="Weapon2" parent="Contents/WeaponSlots" instance=ExtResource("2_slot")] layout_mode = 2 -custom_minimum_size = Vector2(118, 48) +custom_minimum_size = Vector2(90, 38) slot_kind = "weapon" slot_index = 1 [node name="Schematic" type="Control" parent="Contents"] -custom_minimum_size = Vector2(0, 136) +custom_minimum_size = Vector2(0, 104) layout_mode = 2 script = ExtResource("1_schematic") [node name="ModuleLabel" type="Label" parent="Contents"] layout_mode = 2 theme_override_colors/font_color = Color(0.72, 0.88, 0.98, 1) -theme_override_font_sizes/font_size = 13 +theme_override_font_sizes/font_size = 10 text = "MODUŁY NIEBOJOWE (6)" horizontal_alignment = 1 diff --git a/scenes/ui/ship_inventory_panel.tscn b/scenes/ui/ship_inventory_panel.tscn index 372e388..ca407ae 100644 --- a/scenes/ui/ship_inventory_panel.tscn +++ b/scenes/ui/ship_inventory_panel.tscn @@ -9,17 +9,17 @@ anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 -offset_left = -245.0 -offset_top = -208.0 -offset_right = 245.0 -offset_bottom = 208.0 +offset_left = -195.0 +offset_top = -165.0 +offset_right = 195.0 +offset_bottom = 165.0 grow_horizontal = 2 grow_vertical = 2 script = ExtResource("1_inventory") [node name="Contents" type="VBoxContainer" parent="."] layout_mode = 2 -theme_override_constants/separation = 8 +theme_override_constants/separation = 6 [node name="Header" type="HBoxContainer" parent="Contents"] layout_mode = 2 @@ -28,7 +28,7 @@ layout_mode = 2 layout_mode = 2 size_flags_horizontal = 3 theme_override_colors/font_color = Color(0.72, 0.88, 0.98, 1) -theme_override_font_sizes/font_size = 16 +theme_override_font_sizes/font_size = 11 text = "MAGAZYN (0 / 20)" [node name="CloseButton" type="Button" parent="Contents/Header"] diff --git a/scripts/game/ship_controller.gd b/scripts/game/ship_controller.gd index 6dcb7c0..1d512e7 100644 --- a/scripts/game/ship_controller.gd +++ b/scripts/game/ship_controller.gd @@ -57,7 +57,7 @@ func _ready() -> void: if ship_texture: _sprite.texture = ship_texture var largest_dimension := maxf(ship_texture.get_width(), ship_texture.get_height()) - _sprite.scale = Vector2.ONE * (92.0 / largest_dimension) + _sprite.scale = Vector2.ONE * (64.0 / largest_dimension) func _ensure_input_action(action_name: StringName, physical_key: Key) -> void: if not InputMap.has_action(action_name): diff --git a/scripts/ui/equipment_slot_view.gd b/scripts/ui/equipment_slot_view.gd index f085e51..87893ee 100644 --- a/scripts/ui/equipment_slot_view.gd +++ b/scripts/ui/equipment_slot_view.gd @@ -11,7 +11,13 @@ func _ready() -> void: _inventory = get_tree().get_first_node_in_group("ship_inventory") as ShipInventory if _inventory: _inventory.inventory_changed.connect(_refresh) - custom_minimum_size = Vector2(108, 52) if slot_kind != "cargo" else Vector2(86, 62) + match slot_kind: + "weapon": + custom_minimum_size = Vector2(90, 38) + "module": + custom_minimum_size = Vector2(72, 44) + _: + custom_minimum_size = Vector2(72, 48) _refresh() func _refresh() -> void: diff --git a/scripts/ui/ship_schematic.gd b/scripts/ui/ship_schematic.gd index 69fc21a..af749ef 100644 --- a/scripts/ui/ship_schematic.gd +++ b/scripts/ui/ship_schematic.gd @@ -2,6 +2,7 @@ extends Control func _draw() -> void: var center := size.x * 0.5 + draw_set_transform(Vector2(center * 0.28, 0.0), 0.0, Vector2(0.72, 0.72)) var hull_color := Color(0.35, 0.72, 0.85, 1.0) var hull_highlight := Color(0.72, 0.9, 0.96, 1.0) var weapon_color := Color(0.98, 0.65, 0.28, 1.0)