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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue