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