added first theme progress and switched all files to use static typing
This commit is contained in:
parent
c9458f3627
commit
b5ace17da9
2665 changed files with 50249 additions and 476 deletions
|
|
@ -1,23 +1,25 @@
|
|||
extends Control
|
||||
|
||||
var move_button = preload("res://ui/battle_ui/battle_move_button.tscn")
|
||||
@onready var battle_moves_menu: VBoxContainer = %BattleMovesMenu
|
||||
|
||||
var move_button: PackedScene = preload("res://ui/battle_ui/battle_move_button.tscn")
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
self.visible = false
|
||||
for i in range(4):
|
||||
var button = move_button.instantiate()
|
||||
%BattleMovesMenu.add_child(button)
|
||||
for i: int in range(4):
|
||||
var button: Node = move_button.instantiate()
|
||||
battle_moves_menu.add_child(button)
|
||||
|
||||
func update() -> void:
|
||||
var player = Utils.get_player()
|
||||
var player_fighter = SaveManager.current_save.party[0] as MonsterData
|
||||
|
||||
var player: Node3D = Utils.get_player()
|
||||
var player_fighter: MonsterData = SaveManager.current_save.party[0] as MonsterData
|
||||
|
||||
%PartyFighterLevel.text = "Lv. %s" % str(player_fighter.level)
|
||||
%PartyFighterName.text = player_fighter.nickname if not player_fighter.nickname.is_empty() else player_fighter.name
|
||||
%PartyFighterHealthbar.max_value = player_fighter.health
|
||||
%PartyFighterHealthbar.value = player_fighter.current_health
|
||||
|
||||
|
||||
%EnemyMonsterLevel.text = "Lv. %s" % player.enemy.data.level
|
||||
%EnemyMonsterName.text = player.enemy.data.name
|
||||
%EnemyMonsterHealthbar.max_value = player.enemy.data.health
|
||||
|
|
@ -30,3 +32,16 @@ func _on_battle_button_pressed() -> void:
|
|||
|
||||
func set_message(msg: String) -> void:
|
||||
%Message.text = msg
|
||||
|
||||
|
||||
func disable() -> void:
|
||||
%BattleButton.disabled = true
|
||||
%PartyButton.disabled = true
|
||||
%ItemsButton.disabled = true
|
||||
%RunButton.disabled = true
|
||||
|
||||
func enable() -> void:
|
||||
%BattleButton.disabled = false
|
||||
%PartyButton.disabled = false
|
||||
%ItemsButton.disabled = false
|
||||
%RunButton.disabled = false
|
||||
|
|
|
|||
|
|
@ -345,6 +345,7 @@ layout_mode = 2
|
|||
size_flags_horizontal = 3
|
||||
|
||||
[node name="BattleButton" type="Button" parent="BottomMarginContainer/VBoxContainer/HBoxContainer/MainBattleMenu"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_constants/h_separation = 18
|
||||
theme_override_constants/icon_max_width = 20
|
||||
|
|
@ -365,6 +366,7 @@ icon = ExtResource("4_saqy8")
|
|||
alignment = 0
|
||||
|
||||
[node name="PartyButton" type="Button" parent="BottomMarginContainer/VBoxContainer/HBoxContainer/MainBattleMenu"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_constants/h_separation = 18
|
||||
theme_override_constants/icon_max_width = 20
|
||||
|
|
@ -385,6 +387,7 @@ icon = ExtResource("5_pnobx")
|
|||
alignment = 0
|
||||
|
||||
[node name="ItemsButton" type="Button" parent="BottomMarginContainer/VBoxContainer/HBoxContainer/MainBattleMenu"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_constants/h_separation = 18
|
||||
theme_override_constants/icon_max_width = 20
|
||||
|
|
@ -405,6 +408,7 @@ icon = ExtResource("6_ikm1n")
|
|||
alignment = 0
|
||||
|
||||
[node name="RunButton" type="Button" parent="BottomMarginContainer/VBoxContainer/HBoxContainer/MainBattleMenu"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_constants/h_separation = 18
|
||||
theme_override_constants/icon_max_width = 20
|
||||
|
|
|
|||
|
|
@ -26,13 +26,13 @@ func _gui_input(event: InputEvent) -> void:
|
|||
|
||||
if pressed and event is InputEventScreenDrag:
|
||||
delta_position = clamp(previous_position - event.position, Vector2(-10, -10), Vector2(10, 10))
|
||||
|
||||
|
||||
# finally update the previous position
|
||||
previous_position = event.position
|
||||
|
||||
func simulate_joystick_motion(axis: int, value: float, device_id: int = 0) -> void:
|
||||
var joystick_event = InputEventJoypadMotion.new()
|
||||
joystick_event.device = device_id
|
||||
func simulate_joystick_motion(axis: JoyAxis, value: float, device_id: int = 0) -> void:
|
||||
var joystick_event: InputEventJoypadMotion = InputEventJoypadMotion.new()
|
||||
joystick_event.device = device_id
|
||||
joystick_event.axis = axis # Axis index (e.g., 0 for X-axis, 1 for Y-axis)
|
||||
joystick_event.axis_value = value # Value of the axis, typically between -1 and 1
|
||||
|
||||
|
|
|
|||
|
|
@ -12,15 +12,15 @@ var save_button_held_down: bool = false
|
|||
var save_timer: float = 0.0
|
||||
var time_to_save: float = 0.8 # second
|
||||
|
||||
func _process(delta) -> void:
|
||||
func _process(delta: float) -> void:
|
||||
if save_button_held_down:
|
||||
if save_timer >= time_to_save:
|
||||
save_timer_reached.emit()
|
||||
save_timer = 0.0
|
||||
|
||||
|
||||
# Save the game
|
||||
SaveManager.save_game()
|
||||
|
||||
|
||||
save_button_held_down = false
|
||||
else:
|
||||
save_timer_incremented.emit(ceili((save_timer / time_to_save) * 100))
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ theme_override_styles/panel = SubResource("StyleBoxFlat_nfkty")
|
|||
script = ExtResource("2_pyri2")
|
||||
|
||||
[node name="Thumbstick" type="TextureRect" parent="MarginContainer/HBoxContainer/Left/JoystickPanel"]
|
||||
unique_name_in_owner = true
|
||||
self_modulate = Color(0, 0, 0, 0.392157)
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
extends Panel
|
||||
|
||||
@onready var talk_a_texture = preload("res://assets/textures/Xbox Series/Vector/xbox_button_a.svg")
|
||||
@onready var drag_texture = preload("res://assets/textures/Generic/Vector/generic_button_circle.svg")
|
||||
@onready var thumbstick = $Thumbstick
|
||||
var thumbstick_size_factor = 0.5
|
||||
@onready var talk_a_texture: CompressedTexture2D = preload("res://assets/textures/Xbox Series/Vector/xbox_button_a.svg")
|
||||
@onready var drag_texture: CompressedTexture2D = preload("res://assets/textures/Generic/Vector/generic_button_circle.svg")
|
||||
@onready var thumbstick: TextureRect = %Thumbstick
|
||||
var thumbstick_size_factor: float = 0.5
|
||||
|
||||
|
||||
var middle: Vector2 = Vector2(100, 100)
|
||||
|
|
@ -18,46 +18,46 @@ var rotation_delta: Vector2 = Vector2(0, 0)
|
|||
func _ready() -> void:
|
||||
#thumbstick.custom_minimum_size = Vector2(size.x, size.x) * thumbstick_size_factor
|
||||
thumbstick.position = middle - thumbstick.size / 2.0
|
||||
|
||||
|
||||
func _on_gui_input(event: InputEvent) -> void:
|
||||
if event is not InputEventScreenTouch and event is not InputEventScreenDrag:
|
||||
return
|
||||
|
||||
|
||||
if event.is_pressed() == false:
|
||||
simulate_joystick_motion(JOY_AXIS_LEFT_X, Vector2.ZERO.x)
|
||||
simulate_joystick_motion(JOY_AXIS_LEFT_Y, Vector2.ZERO.y)
|
||||
thumbstick.position = middle - thumbstick.size / 2.0
|
||||
thumbstick.texture = talk_a_texture
|
||||
|
||||
|
||||
if event is InputEventScreenTouch and pressed == true:
|
||||
Input.action_press("ui_select")
|
||||
pressed = false
|
||||
|
||||
|
||||
if event is InputEventScreenTouch and event.is_pressed():
|
||||
pressed = true
|
||||
|
||||
|
||||
if event is InputEventScreenDrag:
|
||||
# cancel the talking action
|
||||
pressed = false
|
||||
# swap to drag texture
|
||||
thumbstick.texture = drag_texture
|
||||
|
||||
var touch_position = event.position
|
||||
|
||||
|
||||
var touch_position: Vector2 = event.position
|
||||
|
||||
# visual thumbstick movement
|
||||
var thumbstick_position = touch_position - thumbstick.size / 2.0
|
||||
var thumbstick_position: Vector2 = touch_position - thumbstick.size / 2.0
|
||||
#var clamped_thumbstick_position = thumbstick_position.clampf(-40.0, 40.0)
|
||||
thumbstick.position = thumbstick_position
|
||||
|
||||
|
||||
# actual value
|
||||
var _delta = middle - touch_position
|
||||
var direction = _delta.normalized()
|
||||
var _delta: Vector2 = middle - touch_position
|
||||
var direction: Vector2 = _delta.normalized()
|
||||
simulate_joystick_motion(JOY_AXIS_LEFT_X, -direction.x)
|
||||
simulate_joystick_motion(JOY_AXIS_LEFT_Y, -direction.y)
|
||||
|
||||
func simulate_joystick_motion(axis: int, value: float, device_id: int = 0) -> void:
|
||||
var joystick_event = InputEventJoypadMotion.new()
|
||||
joystick_event.device = device_id
|
||||
func simulate_joystick_motion(axis: JoyAxis, value: float, device_id: int = 0) -> void:
|
||||
var joystick_event: InputEventJoypadMotion = InputEventJoypadMotion.new()
|
||||
joystick_event.device = device_id
|
||||
joystick_event.axis = axis # Axis index (e.g., 0 for X-axis, 1 for Y-axis)
|
||||
joystick_event.axis_value = value # Value of the axis, typically between -1 and 1
|
||||
|
||||
|
|
|
|||
|
|
@ -1,31 +1,25 @@
|
|||
extends Control
|
||||
class_name MonsterList
|
||||
|
||||
@onready var monster_list_entry_container: MarginContainer = $MarginContainer/PanelContainer/VBoxContainer/MonsterListEntryContainer
|
||||
@onready var monster_list_entry = preload("res://ui/ingame_menu/party_list_entry.tscn")
|
||||
@onready var monster_list_entry_container: VBoxContainer = %MonsterListEntryContainer/VBoxContainer
|
||||
@onready var monster_list_entry: PackedScene = preload("res://ui/ingame_menu/party_list_entry.tscn")
|
||||
|
||||
func _ready() -> void:
|
||||
visible = false
|
||||
for i: int in range(6):
|
||||
var entry: Node = monster_list_entry.instantiate()
|
||||
monster_list_entry_container.add_child(entry)
|
||||
|
||||
func _on_close_button_pressed() -> void:
|
||||
visible = false
|
||||
pass # Replace with function body.
|
||||
|
||||
func update() -> void:
|
||||
pass
|
||||
|
||||
func _update_monster_list() -> void:
|
||||
print("update list")
|
||||
for i in SaveManager.current_save.party.size():
|
||||
var monster = SaveManager.current_save.party[i]
|
||||
var entry = monster_list_entry.instantiate()
|
||||
|
||||
# populate the new entry
|
||||
entry.populate(monster)
|
||||
|
||||
# add it to the list
|
||||
monster_list_entry_container.add_child(entry)
|
||||
for i: int in SaveManager.current_save.party.size():
|
||||
var monster: MonsterData = SaveManager.current_save.party[i]
|
||||
var entry: Node = monster_list_entry_container.get_child(i)
|
||||
entry.update(monster)
|
||||
|
||||
|
||||
func _update_player_info() -> void:
|
||||
#%PlayerName.text =
|
||||
#%PlayerName.text =
|
||||
pass
|
||||
|
|
|
|||
|
|
@ -1,18 +1,10 @@
|
|||
[gd_scene load_steps=8 format=3 uid="uid://bbvbnrcjatkrb"]
|
||||
[gd_scene load_steps=6 format=3 uid="uid://bbvbnrcjatkrb"]
|
||||
|
||||
[ext_resource type="Script" path="res://ui/ingame_menu/ingame_menu.gd" id="1_beinb"]
|
||||
[ext_resource type="FontFile" uid="uid://bjaavdnopfh0q" path="res://assets/fonts/aoboshi_one/AoboshiOne-Regular.ttf" id="2_1e4kf"]
|
||||
[ext_resource type="Texture2D" uid="uid://bhh31i3wgww43" path="res://assets/textures/Game Icons/Vector/2x/singleplayer.png" id="2_c2ia0"]
|
||||
[ext_resource type="Texture2D" uid="uid://c737p2osplq2o" path="res://assets/textures/Xbox Series/Vector/xbox_button_x_outline.svg" id="3_kgfth"]
|
||||
[ext_resource type="Texture2D" uid="uid://cxry7h4q17lir" path="res://assets/textures/Game Icons/Vector/2x/star.png" id="3_oo4iu"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_co4a0"]
|
||||
bg_color = Color(0.9, 0.9, 0.9, 1)
|
||||
corner_radius_top_left = 64
|
||||
corner_radius_top_right = 64
|
||||
corner_radius_bottom_right = 64
|
||||
corner_radius_bottom_left = 64
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_flvbu"]
|
||||
|
||||
[node name="IngameMenu" type="Control"]
|
||||
|
|
@ -38,7 +30,6 @@ theme_override_constants/margin_bottom = 50
|
|||
|
||||
[node name="PanelContainer" type="PanelContainer" parent="MarginContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_co4a0")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/PanelContainer"]
|
||||
layout_mode = 2
|
||||
|
|
@ -105,17 +96,20 @@ theme_override_constants/margin_right = 40
|
|||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
theme_override_fonts/font = ExtResource("2_1e4kf")
|
||||
theme_override_font_sizes/font_size = 36
|
||||
text = "Your Monsters"
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="MonsterListEntryContainer" type="MarginContainer" parent="MarginContainer/PanelContainer/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 2
|
||||
theme_override_constants/margin_left = 20
|
||||
theme_override_constants/margin_right = 20
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/PanelContainer/VBoxContainer/MonsterListEntryContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="CloseButtonContainer" type="MarginContainer" parent="MarginContainer/PanelContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_bottom = 32
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
extends HBoxContainer
|
||||
extends PanelContainer
|
||||
class_name PartyListEntry
|
||||
|
||||
func populate(monster: MonsterData) -> void:
|
||||
func update(monster: MonsterData) -> void:
|
||||
%MonsterID.text = str(0)
|
||||
%MonsterName.text = monster.name
|
||||
%MonsterLevel.text = "Lvl. %s" % monster.level
|
||||
%HealthProgressBar.value = monster.current_health
|
||||
%HealthProgressBar.max_value = monster.health
|
||||
%ExperienceProgressBar.value = monster.xp
|
||||
%ExperienceProgressBar.max_value = monster.base_xp
|
||||
%ExperienceProgressBar.max_value = monster.xp_for_levelup
|
||||
|
|
|
|||
|
|
@ -20,30 +20,33 @@ bg_color = Color(0, 0.56, 0.84, 1)
|
|||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_x2rfb"]
|
||||
|
||||
[node name="MonsterListEntry" type="HBoxContainer"]
|
||||
[node name="PartyListEntry" type="PanelContainer"]
|
||||
anchors_preset = 10
|
||||
anchor_right = 1.0
|
||||
offset_bottom = 72.0
|
||||
offset_bottom = 100.0
|
||||
grow_horizontal = 2
|
||||
script = ExtResource("1_gdhy7")
|
||||
|
||||
[node name="Thumbnail" type="TextureRect" parent="."]
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Thumbnail" type="TextureRect" parent="HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(70, 70)
|
||||
layout_mode = 2
|
||||
texture = ExtResource("2_rogma")
|
||||
expand_mode = 3
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 4
|
||||
|
||||
[node name="NameAndLevelContainer" type="HBoxContainer" parent="VBoxContainer"]
|
||||
[node name="NameAndLevelContainer" type="HBoxContainer" parent="HBoxContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 10
|
||||
|
||||
[node name="MonsterID" type="Label" parent="VBoxContainer/NameAndLevelContainer"]
|
||||
[node name="MonsterID" type="Label" parent="HBoxContainer/VBoxContainer/NameAndLevelContainer"]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
|
|
@ -51,7 +54,7 @@ theme_override_colors/font_color = Color(0, 0, 0, 1)
|
|||
text = "ID"
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="MonsterName" type="Label" parent="VBoxContainer/NameAndLevelContainer"]
|
||||
[node name="MonsterName" type="Label" parent="HBoxContainer/VBoxContainer/NameAndLevelContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
|
|
@ -59,7 +62,7 @@ theme_override_font_sizes/font_size = 24
|
|||
text = "Name"
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="MonsterLevel" type="Label" parent="VBoxContainer/NameAndLevelContainer"]
|
||||
[node name="MonsterLevel" type="Label" parent="HBoxContainer/VBoxContainer/NameAndLevelContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 8
|
||||
|
|
@ -68,13 +71,13 @@ theme_override_font_sizes/font_size = 24
|
|||
text = "Lvl"
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="ProgressBarContainer" type="VBoxContainer" parent="VBoxContainer"]
|
||||
[node name="ProgressBarContainer" type="VBoxContainer" parent="HBoxContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 4
|
||||
theme_override_constants/separation = 0
|
||||
|
||||
[node name="HealthProgressBar" type="ProgressBar" parent="VBoxContainer/ProgressBarContainer"]
|
||||
[node name="HealthProgressBar" type="ProgressBar" parent="HBoxContainer/VBoxContainer/ProgressBarContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
|
@ -85,7 +88,7 @@ step = 1.0
|
|||
rounded = true
|
||||
show_percentage = false
|
||||
|
||||
[node name="ExperienceProgressBar" type="ProgressBar" parent="VBoxContainer/ProgressBarContainer"]
|
||||
[node name="ExperienceProgressBar" type="ProgressBar" parent="HBoxContainer/VBoxContainer/ProgressBarContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_styles/background = SubResource("StyleBoxFlat_fkb5g")
|
||||
|
|
@ -94,7 +97,7 @@ step = 1.0
|
|||
rounded = true
|
||||
show_percentage = false
|
||||
|
||||
[node name="SwapPositionButton" type="Button" parent="."]
|
||||
[node name="SwapPositionButton" type="Button" parent="HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
self_modulate = Color(0, 0, 0, 1)
|
||||
custom_minimum_size = Vector2(100, 100)
|
||||
|
|
|
|||
|
|
@ -3,23 +3,29 @@ extends Control
|
|||
signal on_new_game_started
|
||||
signal on_game_continued
|
||||
|
||||
@onready var continue_game_button: Button = %ContinueGameButton
|
||||
@onready var new_game_button: Button = %NewGameButton
|
||||
|
||||
# On ready, check which buttons to show
|
||||
func _ready() -> void:
|
||||
if SaveManager.save_exists():
|
||||
%ContinueGameButton.visible = true
|
||||
%NewGameButton.visible = false
|
||||
continue_game_button.visible = true
|
||||
new_game_button.visible = false
|
||||
else:
|
||||
continue_game_button.visible = false
|
||||
new_game_button.visible = true
|
||||
|
||||
func _on_new_game_button_pressed() -> void:
|
||||
# Hide the main menu
|
||||
self.visible = false
|
||||
|
||||
|
||||
# emit the new game signal
|
||||
on_new_game_started.emit()
|
||||
|
||||
func _on_continue_game_button_pressed() -> void:
|
||||
# Hide the main menu
|
||||
self.visible = false
|
||||
|
||||
|
||||
# emit the continue game signal
|
||||
on_game_continued.emit()
|
||||
|
||||
|
|
|
|||
|
|
@ -1,59 +1,9 @@
|
|||
[gd_scene load_steps=10 format=3 uid="uid://dt00rjsodtady"]
|
||||
[gd_scene load_steps=5 format=3 uid="uid://dt00rjsodtady"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://b6ylra30qxf30" path="res://assets/logo/logo.png" id="1_1fmce"]
|
||||
[ext_resource type="Script" path="res://ui/main_menu/main_menu.gd" id="1_5gs73"]
|
||||
[ext_resource type="FontFile" uid="uid://bjaavdnopfh0q" path="res://assets/fonts/aoboshi_one/AoboshiOne-Regular.ttf" id="2_aqmkw"]
|
||||
[ext_resource type="Texture2D" uid="uid://da7o6lfuoliid" path="res://assets/textures/Backgrounds/meadow2.jpg" id="2_bb61v"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_7grw7"]
|
||||
content_margin_left = 20.0
|
||||
content_margin_right = 20.0
|
||||
content_margin_bottom = 5.0
|
||||
bg_color = Color(0.799841, 0.529277, 0.323387, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_xjg0j"]
|
||||
content_margin_left = 20.0
|
||||
content_margin_right = 20.0
|
||||
content_margin_bottom = 5.0
|
||||
bg_color = Color(0.799841, 0.529277, 0.323387, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_3y6oq"]
|
||||
content_margin_left = 20.0
|
||||
content_margin_right = 20.0
|
||||
content_margin_bottom = 5.0
|
||||
bg_color = Color(0.799841, 0.529277, 0.323387, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_cnake"]
|
||||
content_margin_left = 20.0
|
||||
content_margin_right = 20.0
|
||||
content_margin_bottom = 5.0
|
||||
bg_color = Color(0.799841, 0.529277, 0.323387, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_0d7mr"]
|
||||
content_margin_left = 20.0
|
||||
content_margin_right = 20.0
|
||||
content_margin_bottom = 5.0
|
||||
bg_color = Color(0.799841, 0.529277, 0.323387, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
[ext_resource type="Theme" uid="uid://xfq6d5yqsdh5" path="res://theme/basic_theme.tres" id="4_y6s8u"]
|
||||
|
||||
[node name="MainMenu" type="Control"]
|
||||
layout_mode = 3
|
||||
|
|
@ -104,7 +54,6 @@ grow_vertical = 0
|
|||
theme_override_colors/font_color = Color(0.945573, 0.745802, 0.348774, 1)
|
||||
theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
|
||||
theme_override_constants/outline_size = 30
|
||||
theme_override_fonts/font = ExtResource("2_aqmkw")
|
||||
theme_override_font_sizes/font_size = 70
|
||||
text = "MONSTER
|
||||
FANGEN"
|
||||
|
|
@ -127,68 +76,38 @@ size_flags_vertical = 3
|
|||
[node name="NewGameButton" type="Button" parent="VBoxContainer/MarginContainer/MenuButtons"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.355673, 0.203473, 0.0399276, 1)
|
||||
theme_override_fonts/font = ExtResource("2_aqmkw")
|
||||
theme_override_font_sizes/font_size = 45
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_7grw7")
|
||||
theme_override_styles/hover_pressed = SubResource("StyleBoxFlat_xjg0j")
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_3y6oq")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_cnake")
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme = ExtResource("4_y6s8u")
|
||||
theme_override_font_sizes/font_size = 32
|
||||
text = "New Game"
|
||||
|
||||
[node name="ContinueGameButton" type="Button" parent="VBoxContainer/MarginContainer/MenuButtons"]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.356863, 0.203922, 0.0392157, 1)
|
||||
theme_override_fonts/font = ExtResource("2_aqmkw")
|
||||
theme_override_font_sizes/font_size = 45
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme_override_styles/hover_pressed = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme = ExtResource("4_y6s8u")
|
||||
theme_override_font_sizes/font_size = 32
|
||||
text = "Continue"
|
||||
|
||||
[node name="OptionsButton" type="Button" parent="VBoxContainer/MarginContainer/MenuButtons"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.356863, 0.203922, 0.0392157, 1)
|
||||
theme_override_fonts/font = ExtResource("2_aqmkw")
|
||||
theme_override_font_sizes/font_size = 45
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme_override_styles/hover_pressed = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme = ExtResource("4_y6s8u")
|
||||
theme_override_font_sizes/font_size = 32
|
||||
text = "Options"
|
||||
|
||||
[node name="LicensesButton" type="Button" parent="VBoxContainer/MarginContainer/MenuButtons"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.356863, 0.203922, 0.0392157, 1)
|
||||
theme_override_fonts/font = ExtResource("2_aqmkw")
|
||||
theme_override_font_sizes/font_size = 45
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme_override_styles/hover_pressed = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme = ExtResource("4_y6s8u")
|
||||
theme_override_font_sizes/font_size = 32
|
||||
text = "Licenses"
|
||||
|
||||
[node name="ExitButton" type="Button" parent="VBoxContainer/MarginContainer/MenuButtons"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 10
|
||||
theme_override_colors/font_color = Color(0.356863, 0.203922, 0.0392157, 1)
|
||||
theme_override_fonts/font = ExtResource("2_aqmkw")
|
||||
theme_override_font_sizes/font_size = 45
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme_override_styles/hover_pressed = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme = ExtResource("4_y6s8u")
|
||||
theme_override_font_sizes/font_size = 32
|
||||
text = "Exit"
|
||||
|
||||
[connection signal="pressed" from="VBoxContainer/MarginContainer/MenuButtons/NewGameButton" to="." method="_on_new_game_button_pressed"]
|
||||
|
|
|
|||
20
ui/ui.gd
20
ui/ui.gd
|
|
@ -15,22 +15,22 @@ signal on_game_continued
|
|||
func _ready() -> void:
|
||||
main_menu.connect("on_game_continued", _on_main_menu_on_game_continued)
|
||||
main_menu.connect("on_new_game_started", _on_main_menu_on_new_game_started)
|
||||
|
||||
|
||||
ingame_controls.connect("menu_button_clicked", _on_ingame_controls_menu_button_clicked)
|
||||
ingame_controls.connect("save_button_clicked", _on_ingame_controls_save_button_clicked)
|
||||
ingame_controls.connect("save_button_released", _on_ingame_controls_save_button_released)
|
||||
ingame_controls.connect("save_timer_incremented", _on_ingame_controls_save_timer_incremented)
|
||||
ingame_controls.connect("save_timer_reached", _on_ingame_controls_save_timer_reached)
|
||||
|
||||
|
||||
pass
|
||||
|
||||
func show_main_menu(p_visible = true) -> void:
|
||||
func show_main_menu(p_visible: bool = true) -> void:
|
||||
main_menu.visible = p_visible
|
||||
|
||||
func show_ingame_controls(p_visible = true) -> void:
|
||||
|
||||
func show_ingame_controls(p_visible: bool = true) -> void:
|
||||
ingame_controls.visible = p_visible
|
||||
|
||||
func show_battle_ui(p_visible = true) -> void:
|
||||
func show_battle_ui(p_visible: bool = true) -> void:
|
||||
battle_ui.visible = p_visible
|
||||
battle_ui.update()
|
||||
|
||||
|
|
@ -41,10 +41,10 @@ func _on_ingame_controls_menu_button_clicked() -> void:
|
|||
func update() -> void:
|
||||
# Updating the player info
|
||||
ingame_menu._update_player_info()
|
||||
|
||||
|
||||
# Updating the monster list
|
||||
ingame_menu._update_monster_list()
|
||||
|
||||
ingame_menu.update()
|
||||
|
||||
|
||||
func _on_ingame_controls_save_button_clicked() -> void:
|
||||
save_ui.visible = true
|
||||
|
|
@ -52,7 +52,7 @@ func _on_ingame_controls_save_button_clicked() -> void:
|
|||
func _on_ingame_controls_save_button_released() -> void:
|
||||
save_ui.visible = false
|
||||
|
||||
func _on_ingame_controls_save_timer_incremented(value) -> void:
|
||||
func _on_ingame_controls_save_timer_incremented(value: int) -> void:
|
||||
save_ui.get_node("SavePercentage").text = str(value)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue