Initial Android commit
This commit is contained in:
commit
1e2b80c13d
8521 changed files with 231475 additions and 0 deletions
|
@ -0,0 +1,53 @@
|
|||
extends Button
|
||||
|
||||
onready var ExplanationControl = preload("res://resources/customControls/DifficultySelector/Explanation.tscn");
|
||||
onready var NormalBackground = preload("res://resources/graphics/GUI/Menu/Difficulties/normal_background.webp");
|
||||
onready var HardBackground = preload("res://resources/graphics/GUI/Menu/Difficulties/hard_background.webp");
|
||||
|
||||
|
||||
|
||||
func Init(type:String):
|
||||
if type == "Normal":
|
||||
InitNormal();
|
||||
elif type == "Hard":
|
||||
InitHard();
|
||||
|
||||
var normalExplanations = [
|
||||
"ui_difficulty_normal_explanation_1",
|
||||
"ui_difficulty_normal_explanation_2",
|
||||
"ui_difficulty_normal_explanation_3",
|
||||
"ui_difficulty_normal_explanation_4",
|
||||
];
|
||||
|
||||
func InitNormal():
|
||||
$Background.texture = NormalBackground;
|
||||
$Header.text = tr("ui_difficulty_normal_header");
|
||||
$Title.text = tr("ui_difficulty_normal_title");
|
||||
for i in normalExplanations:
|
||||
var control = ExplanationControl.instance();
|
||||
control.Init(i);
|
||||
$Explanations.add_child(control);
|
||||
|
||||
|
||||
var hardExplanations = [
|
||||
"ui_difficulty_hard_explanation_1",
|
||||
"ui_difficulty_hard_explanation_2",
|
||||
"ui_difficulty_hard_explanation_3",
|
||||
"ui_difficulty_hard_explanation_4",
|
||||
];
|
||||
|
||||
func InitHard():
|
||||
$Background.texture = HardBackground;
|
||||
$Header.text = tr("ui_difficulty_hard_header");
|
||||
$Title.text = tr("ui_difficulty_hard_title");
|
||||
for i in hardExplanations:
|
||||
var control = ExplanationControl.instance();
|
||||
control.Init(i);
|
||||
$Explanations.add_child(control);
|
||||
|
||||
|
||||
func _on_Control_mouse_entered():
|
||||
$Background.modulate.a = 0.85;
|
||||
|
||||
func _on_Control_mouse_exited():
|
||||
$Background.modulate.a = 1;
|
4
scripts/CustomControls/DifficultySelector/Explanation.gd
Normal file
4
scripts/CustomControls/DifficultySelector/Explanation.gd
Normal file
|
@ -0,0 +1,4 @@
|
|||
extends HBoxContainer
|
||||
|
||||
func Init(text:String):
|
||||
$Label.text = tr(text);
|
Loading…
Add table
Add a link
Reference in a new issue