64 lines
1.5 KiB
GDScript
64 lines
1.5 KiB
GDScript
extends Node2D
|
|
|
|
var dialogNode
|
|
var buttonpressed:bool
|
|
|
|
func _ready():
|
|
if not get_tree().root.has_node("Root"):
|
|
return ;
|
|
|
|
buttonpressed = false
|
|
GallerySingleton.AddBackground("Scene_alt1");
|
|
|
|
var locale = TranslationServer.get_locale();
|
|
if locale == "en":
|
|
$Sprite.visible = false;
|
|
$Sprite2.visible = true;
|
|
$Sprite3.visible = false;
|
|
elif locale == "ru":
|
|
$Sprite.visible = true;
|
|
$Sprite2.visible = false;
|
|
$Sprite3.visible = false;
|
|
elif locale == "uk":
|
|
$Sprite.visible = false;
|
|
$Sprite2.visible = false;
|
|
$Sprite3.visible = true;
|
|
|
|
dialogNode = get_tree().root.get_node("Root/Game").get_child(0).get_node("DialogNode");
|
|
|
|
func InitForGallery()->Array:
|
|
scale = Vector2(0.5, 0.5)
|
|
return [
|
|
"English", "Русский",
|
|
|
|
];
|
|
|
|
func SetSettings(setting):
|
|
if setting == "English":
|
|
$Sprite.visible = false;
|
|
$Sprite2.visible = true;
|
|
$Sprite3.visible = false;
|
|
elif setting == "Русский":
|
|
$Sprite.visible = true;
|
|
$Sprite2.visible = false;
|
|
$Sprite3.visible = false;
|
|
elif setting == "Українська":
|
|
$Sprite.visible = false;
|
|
$Sprite2.visible = false;
|
|
$Sprite3.visible = true;
|
|
|
|
func _on_TextureButton_pressed():
|
|
if dialogNode != null and not buttonpressed:
|
|
|
|
buttonpressed = true
|
|
Dialogic.change_timeline("Timeline_EasterZakviel")
|
|
|
|
|
|
func _on_TextureButton_mouse_entered():
|
|
if get_tree().root.get_node("Root/Game").get_child_count() != 0:
|
|
dialogNode.catOnHover = true;
|
|
|
|
|
|
func _on_TextureButton_mouse_exited():
|
|
if get_tree().root.get_node("Root/Game").get_child_count() != 0:
|
|
dialogNode.catOnHover = false;
|