From 5384fa3caa15f2fbe5cdafef596e61e315df8555 Mon Sep 17 00:00:00 2001 From: Ruslan Ignatov Date: Wed, 24 Dec 2025 17:57:23 +0300 Subject: [PATCH] Some style fixes --- game/entities/ships/enemies/abstract_enemy_ship.gd | 12 +++++------- game/menu/common/credits.tscn | 5 ++--- game/menu/ingame/game_over_screen.tscn | 1 + game/menu/ingame/victory_screen.tscn | 1 + game/menu/ingame/weapon_selection_screen.tscn | 4 +++- game/menu/main/seed_selection_menu.tscn | 6 ++++-- 6 files changed, 16 insertions(+), 13 deletions(-) diff --git a/game/entities/ships/enemies/abstract_enemy_ship.gd b/game/entities/ships/enemies/abstract_enemy_ship.gd index d1e10db..2a4b271 100644 --- a/game/entities/ships/enemies/abstract_enemy_ship.gd +++ b/game/entities/ships/enemies/abstract_enemy_ship.gd @@ -3,13 +3,7 @@ extends AbstractShip var is_on_screen : bool = false -var weapon_type : AbstractWeapon.Type: - set(value): - pass - get(): - var type := AbstractWeapon.Type.NONE - for weapon in _weapons: type = weapon.type - return type + var enemy_data : EnemyData: set = _set_enemy_data @@ -24,6 +18,10 @@ func _physics_process(delta: float) -> void: shoot() +func weapon_type() -> AbstractWeapon.Type: + return AbstractWeapon.Type.NONE if _weapons.is_empty() else _weapons[0].type + + func _on_visible_on_screen_notifier_2d_screen_entered() -> void: is_on_screen = true diff --git a/game/menu/common/credits.tscn b/game/menu/common/credits.tscn index 0dd4dce..c25c6d2 100644 --- a/game/menu/common/credits.tscn +++ b/game/menu/common/credits.tscn @@ -1,8 +1,7 @@ -[gd_scene load_steps=6 format=3 uid="uid://c3q3g2647qc27"] +[gd_scene load_steps=5 format=3 uid="uid://c3q3g2647qc27"] [ext_resource type="Script" uid="uid://dclkpithyykju" path="res://game/menu/common/credits.gd" id="1_wp78b"] [ext_resource type="Theme" uid="uid://dtnd3tqllufey" path="res://styles/menu_button.tres" id="2_nidem"] -[ext_resource type="Theme" uid="uid://cigren10ijb75" path="res://styles/label.tres" id="3_x2hwc"] [sub_resource type="InputEventAction" id="InputEventAction_wp78b"] action = &"ui_cancel" @@ -36,7 +35,7 @@ offset_top = 360.0 offset_right = 640.0 offset_bottom = 760.0 grow_horizontal = 2 -theme = ExtResource("3_x2hwc") +theme = ExtResource("2_nidem") text = "PROGRAMMING diff --git a/game/menu/ingame/game_over_screen.tscn b/game/menu/ingame/game_over_screen.tscn index b12b255..736e205 100644 --- a/game/menu/ingame/game_over_screen.tscn +++ b/game/menu/ingame/game_over_screen.tscn @@ -26,6 +26,7 @@ layout_mode = 2 [node name="Label" type="Label" parent="CenterContainer/VBoxContainer"] z_index = 100 layout_mode = 2 +theme = ExtResource("2_uh3ar") text = "Game Over" horizontal_alignment = 1 diff --git a/game/menu/ingame/victory_screen.tscn b/game/menu/ingame/victory_screen.tscn index a7e4800..5439878 100644 --- a/game/menu/ingame/victory_screen.tscn +++ b/game/menu/ingame/victory_screen.tscn @@ -26,6 +26,7 @@ layout_mode = 2 [node name="Label" type="Label" parent="CenterContainer/VBoxContainer"] z_index = 100 layout_mode = 2 +theme = ExtResource("2_wb4d8") text = "Victory!" horizontal_alignment = 1 diff --git a/game/menu/ingame/weapon_selection_screen.tscn b/game/menu/ingame/weapon_selection_screen.tscn index 0599ee4..160a179 100644 --- a/game/menu/ingame/weapon_selection_screen.tscn +++ b/game/menu/ingame/weapon_selection_screen.tscn @@ -1,6 +1,7 @@ -[gd_scene load_steps=2 format=3 uid="uid://cv122gw47cnun"] +[gd_scene load_steps=3 format=3 uid="uid://cv122gw47cnun"] [ext_resource type="Script" uid="uid://6isk1tmc2ik1" path="res://game/menu/ingame/weapon_selection_screen.gd" id="1_hl2ql"] +[ext_resource type="Theme" uid="uid://dtnd3tqllufey" path="res://styles/menu_button.tres" id="2_mi7cn"] [node name="WeaponSelectionScreen" type="Control"] layout_mode = 3 @@ -28,6 +29,7 @@ alignment = 1 layout_mode = 2 size_flags_horizontal = 4 size_flags_vertical = 0 +theme = ExtResource("2_mi7cn") text = "Select your first weapon" [node name="WeaponSelectors" type="HBoxContainer" parent="MarginContainer/VBoxContainer"] diff --git a/game/menu/main/seed_selection_menu.tscn b/game/menu/main/seed_selection_menu.tscn index 0922c40..b723c8c 100644 --- a/game/menu/main/seed_selection_menu.tscn +++ b/game/menu/main/seed_selection_menu.tscn @@ -35,8 +35,9 @@ columns = 2 [node name="SeedLabel" type="Label" parent="GridContainer"] unique_name_in_owner = true -custom_minimum_size = Vector2(200, 0) +custom_minimum_size = Vector2(280, 0) layout_mode = 2 +theme = ExtResource("2_s4s14") horizontal_alignment = 1 [node name="UseRandomButton" type="Button" parent="GridContainer"] @@ -48,9 +49,10 @@ text = "Use random seed" [node name="SeedEdit" type="LineEdit" parent="GridContainer"] unique_name_in_owner = true -custom_minimum_size = Vector2(200, 0) +custom_minimum_size = Vector2(280, 0) layout_mode = 2 mouse_filter = 2 +theme = ExtResource("2_s4s14") placeholder_text = "Enter seed" alignment = 1 max_length = 16