Fixed button colors

This commit is contained in:
2025-10-23 15:05:11 +03:00
parent 6f61be29f1
commit e98c5c751c
15 changed files with 64 additions and 22 deletions
+6 -2
View File
@@ -1,5 +1,9 @@
extends CharacterBody2D
const Weapon = preload("res://game/entities/weapon.tscn")
@export var size : Vector2:
set(value):
size = value
@@ -28,8 +32,8 @@ func _ready() -> void:
$Sprite2D.texture = texture
var weapons_by_offset := {
8: preload("res://game/entities/weapon.tscn").instantiate(),
-8: preload("res://game/entities/weapon.tscn").instantiate(),
8: Weapon.instantiate(),
-8: Weapon.instantiate(),
}
for offset : int in weapons_by_offset:
var weapon : Node2D = weapons_by_offset[offset]
+2
View File
@@ -15,6 +15,7 @@ extends Node2D
@export var cooling_down_rate : int
@export var explosion_size : int
@onready var _firerate_delay : float = 60.0 / firerate
@onready var _firerate_delay_tenth : float = _firerate_delay / 10
@@ -22,6 +23,7 @@ extends Node2D
@onready var _reload_time_tenth : float = reload_time / 10.0
var _firerate_cooldown : float
var _reload_cooldown : float
+13 -7
View File
@@ -1,37 +1,43 @@
extends Node
const Passage = preload("res://game/passage.tscn")
const PauseMenu = preload("res://menu/pause_menu.tscn")
signal show_main_menu
var _pause_menu: Node
var _current_passage: Node
func _ready() -> void:
_current_passage = load("res://game/passage.tscn").instantiate()
_current_passage = Passage.instantiate()
add_child(_current_passage)
func _input(event: InputEvent) -> void:
if event.is_action_pressed("pause"):
_pause_game()
func _create_pause_menu() -> void:
_pause_menu = load("res://menu/pause_menu.tscn").instantiate()
_pause_menu = PauseMenu.instantiate()
add_child(_pause_menu)
_pause_menu.continue_game.connect(_unpause_game)
_pause_menu.show_main_menu.connect(_show_main_menu)
func _pause_game() -> void:
get_tree().paused = true
_create_pause_menu.call_deferred()
func _unpause_game() -> void:
get_tree().paused = false
_pause_menu.queue_free()
func _show_main_menu() -> void:
get_tree().paused = false
+6 -6
View File
@@ -37,7 +37,7 @@ texture_margin_left = 8.0
texture_margin_top = 8.0
texture_margin_right = 8.0
texture_margin_bottom = 8.0
region_rect = Rect2(48, 0, 48, 32)
region_rect = Rect2(0, 0, 48, 32)
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_tkt1b"]
content_margin_left = 10.0
@@ -65,14 +65,14 @@ region_rect = Rect2(0, 32, 48, 32)
[resource]
default_font = ExtResource("1_hwy2u")
Button/colors/font_color = Color(0.875, 0.875, 0.875, 1)
Button/colors/font_disabled_color = Color(0.8745098, 0.8745098, 0.8745098, 1)
Button/colors/font_focus_color = Color(0.95, 0.95, 0.95, 1)
Button/colors/font_hover_color = Color(0.95, 0.95, 0.95, 1)
Button/colors/font_color = Color(1, 1, 1, 1)
Button/colors/font_disabled_color = Color(1, 1, 1, 1)
Button/colors/font_focus_color = Color(1, 1, 1, 1)
Button/colors/font_hover_color = Color(1, 1, 1, 1)
Button/colors/font_hover_pressed_color = Color(1, 1, 1, 1)
Button/colors/font_outline_color = Color(0, 0, 0, 1)
Button/colors/font_pressed_color = Color(1, 1, 1, 1)
Button/colors/icon_disabled_color = Color(1, 1, 1, 0.4)
Button/colors/icon_disabled_color = Color(1, 1, 1, 1)
Button/colors/icon_focus_color = Color(1, 1, 1, 1)
Button/colors/icon_hover_color = Color(1, 1, 1, 1)
Button/colors/icon_hover_pressed_color = Color(1, 1, 1, 1)
BIN
View File
Binary file not shown.
+7 -2
View File
@@ -1,5 +1,10 @@
extends Node
const TitleScreen = preload("res://title_screen.tscn")
const Game = preload("res://game/game.tscn")
var _current_scene: Node
@@ -11,7 +16,7 @@ func _show_main_menu() -> void:
if _current_scene != null:
_current_scene.queue_free()
var scene : Node = load("res://title_screen.tscn").instantiate()
var scene := TitleScreen.instantiate()
add_child(scene)
scene.continue_game.connect(_continue_game)
scene.new_game.connect(_new_game)
@@ -27,7 +32,7 @@ func _new_game() -> void:
if _current_scene != null:
_current_scene.queue_free()
var scene : Node = load("res://game/game.tscn").instantiate()
var scene := Game.instantiate()
add_child(scene)
scene.show_main_menu.connect(_show_main_menu)
_current_scene = scene
+1
View File
@@ -1,5 +1,6 @@
extends Node
signal show_main_menu
+1
View File
@@ -42,6 +42,7 @@ alignment = 2
[node name="MainMenuButton" type="Button" parent="VBoxContainer/HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
mouse_filter = 2
theme = ExtResource("2_nidem")
shortcut = SubResource("Shortcut_nidem")
text = "Main Menu"
+2
View File
@@ -1,10 +1,12 @@
extends Node
signal continue_game
signal new_game
signal quit_game
signal show_options
func _ready() -> void:
_init_focus()
_setup_neighbors()
+6
View File
@@ -19,25 +19,31 @@ offset_bottom = 236.0
[node name="ContinueButton" type="Button" parent="VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
mouse_filter = 2
theme = ExtResource("2_f5okj")
disabled = true
button_mask = 0
text = "CONTINUE"
[node name="StartButton" type="Button" parent="VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
mouse_filter = 2
theme = ExtResource("2_f5okj")
button_mask = 0
text = "START"
[node name="OptionsButton" type="Button" parent="VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
mouse_filter = 2
theme = ExtResource("2_f5okj")
text = "OPTIONS"
[node name="QuitButton" type="Button" parent="VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
mouse_filter = 2
theme = ExtResource("2_f5okj")
text = "QUIT"
+1
View File
@@ -1,5 +1,6 @@
extends Node
signal show_credits
signal show_main_menu
+4
View File
@@ -35,6 +35,7 @@ text = "Fullscreen"
[node name="FullscreenCheckButton" type="CheckButton" parent="VBoxContainer/OptionsGridContainer"]
unique_name_in_owner = true
layout_mode = 2
mouse_filter = 2
[node name="WindowFactorLabel" type="Label" parent="VBoxContainer/OptionsGridContainer"]
unique_name_in_owner = true
@@ -44,6 +45,7 @@ text = "Window Factor"
[node name="WindowFactorOptionButton" type="OptionButton" parent="VBoxContainer/OptionsGridContainer"]
unique_name_in_owner = true
layout_mode = 2
mouse_filter = 2
selected = 0
item_count = 6
popup/item_0/text = "×1"
@@ -66,12 +68,14 @@ alignment = 2
[node name="CreditsButton" type="Button" parent="VBoxContainer/HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
mouse_filter = 2
theme = ExtResource("2_1tdpy")
text = "Credits"
[node name="BackButton" type="Button" parent="VBoxContainer/HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
mouse_filter = 2
theme = ExtResource("2_1tdpy")
shortcut = SubResource("Shortcut_1tdpy")
text = "Back"
+1
View File
@@ -1,5 +1,6 @@
extends Node
signal continue_game
signal show_main_menu
+2
View File
@@ -29,6 +29,7 @@ offset_bottom = 166.0
[node name="ContinueButton" type="Button" parent="VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
mouse_filter = 2
theme = ExtResource("2_vy7sn")
shortcut = SubResource("Shortcut_lgp46")
text = "CONTINUE"
@@ -36,6 +37,7 @@ text = "CONTINUE"
[node name="MainMenuButton" type="Button" parent="VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
mouse_filter = 2
theme = ExtResource("2_vy7sn")
text = "MAIN MENU"
+10 -3
View File
@@ -1,9 +1,16 @@
extends Node
const MainMenu = preload("res://menu/main_menu.tscn")
const Options = preload("res://menu/options.tscn")
const Credits = preload("res://menu/credits.tscn")
signal continue_game
signal new_game
signal quit_game
var _current_scene: Node
@@ -15,7 +22,7 @@ func _show_main_menu() -> void:
if _current_scene != null:
_current_scene.queue_free()
var scene : Node = load("res://menu/main_menu.tscn").instantiate()
var scene := MainMenu.instantiate()
add_child(scene)
scene.continue_game.connect(_continue_game)
scene.new_game.connect(_new_game)
@@ -40,7 +47,7 @@ func _show_options() -> void:
if _current_scene != null:
_current_scene.queue_free()
var scene : Node = load("res://menu/options.tscn").instantiate()
var scene := Options.instantiate()
add_child(scene)
scene.show_main_menu.connect(_show_main_menu)
scene.show_credits.connect(_show_credits)
@@ -51,7 +58,7 @@ func _show_credits() -> void:
if _current_scene != null:
_current_scene.queue_free()
var scene : Node = load("res://menu/credits.tscn").instantiate()
var scene := Credits.instantiate()
add_child(scene)
scene.show_main_menu.connect(_show_main_menu)
_current_scene = scene