Work on quest locations and the first, brokedown guildhall scene.
This commit is contained in:
@@ -1,26 +1,39 @@
|
||||
extends Control
|
||||
|
||||
@onready var firstEdit : TextEdit = %FirstNameEdit
|
||||
@onready var lastEdit : TextEdit = %LastNameEdit
|
||||
@onready var signButton : Button = %SignButton
|
||||
@onready var portraitButton : TextureButton = %PortraitButton
|
||||
|
||||
|
||||
@onready var first_edit : TextEdit = %FirstNameEdit
|
||||
@onready var last_edit : TextEdit = %LastNameEdit
|
||||
@onready var sign_button : Button = %SignButton
|
||||
@onready var portrait_button : TextureButton = %PortraitButton
|
||||
@onready var signature : TextureRect = %Signature
|
||||
@onready var write_sound : AudioStreamPlayer = $AudioStreamPlayer
|
||||
@onready var portrait_customizer = $PortraitCustomizer
|
||||
@onready var portrait : AdventurerPortrait = %HeroPortrait
|
||||
@onready var portrait_container = %PortraitContainer
|
||||
var first_set : bool = false
|
||||
var last_set : bool = false
|
||||
var portrait_set : bool = false
|
||||
|
||||
func validate_signature() -> void:
|
||||
signButton.disabled = !(first_set and last_set and portrait_set)
|
||||
|
||||
func _on_portrait_button_pressed() -> void:
|
||||
#Open the Portrait Screesn
|
||||
sign_button.disabled = !(first_set and last_set and portrait_set)
|
||||
|
||||
func _on_portrait_customized() -> void:
|
||||
Game.player_data.appearance = portrait_customizer.appearance
|
||||
portrait.set_appearance(portrait_customizer.appearance)
|
||||
portrait_container.visible = true
|
||||
portrait_customizer.visible = false
|
||||
portrait_set = true
|
||||
validate_signature()
|
||||
|
||||
|
||||
func _on_portrait_button_pressed() -> void:
|
||||
#Open the Portrait Screen
|
||||
portrait_customizer.visible = true
|
||||
|
||||
|
||||
func _on_first_name_edit_text_changed() -> void:
|
||||
if firstEdit.text != "":
|
||||
if first_edit.text != "":
|
||||
first_set = true
|
||||
else:
|
||||
last_set = true
|
||||
@@ -28,7 +41,7 @@ func _on_first_name_edit_text_changed() -> void:
|
||||
|
||||
|
||||
func _on_last_name_edit_text_changed() -> void:
|
||||
if lastEdit.text != "":
|
||||
if last_edit.text != "":
|
||||
last_set = true
|
||||
else:
|
||||
last_set = false
|
||||
@@ -38,7 +51,7 @@ func update_signature_threshold(value : float) -> void:
|
||||
signature.set_instance_shader_parameter("threshold", value)
|
||||
|
||||
func _on_sign_button_pressed() -> void:
|
||||
signButton.visible = false
|
||||
sign_button.visible = false
|
||||
var tween = create_tween()
|
||||
Game.player_data.name = %FirstNameEdit.text
|
||||
Game.player_data.surname = %LastNameEdit.text
|
||||
|
||||
Reference in New Issue
Block a user