61 lines
1.5 KiB
GDScript3
61 lines
1.5 KiB
GDScript3
|
extends Control
|
||
|
|
||
|
onready var mist_shader = get_node("%Mist")
|
||
|
onready var mood_light = get_node("%MoodLight")
|
||
|
|
||
|
onready var line_text = get_node("%LineEdit")
|
||
|
onready var settings_menu = get_node("%Settings")
|
||
|
onready var center_text = get_node("%CenterText")
|
||
|
onready var settings_button = get_node("%SettingsButton")
|
||
|
|
||
|
var dynamic_font = DynamicFont.new()
|
||
|
|
||
|
# Called when the node enters the scene tree for the first time.
|
||
|
func _ready() -> void:
|
||
|
line_text.text = "This presentation will begin shortly"
|
||
|
dynamic_font.font_data = load("res://futura_font/FutuBk.ttf")
|
||
|
dynamic_font.size = 64
|
||
|
center_text.set("custom_fonts/font", dynamic_font)
|
||
|
|
||
|
|
||
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||
|
#func _process(delta: float) -> void:
|
||
|
# pass
|
||
|
|
||
|
|
||
|
func _on_OKButton_pressed() -> void:
|
||
|
center_text.text = line_text.text
|
||
|
settings_menu.visible = false
|
||
|
settings_button.visible = true
|
||
|
|
||
|
|
||
|
func _on_SettingsButton_pressed() -> void:
|
||
|
settings_menu.visible = true
|
||
|
settings_button.visible = false
|
||
|
|
||
|
|
||
|
func _on_CloseButton_pressed() -> void:
|
||
|
get_tree().quit()
|
||
|
|
||
|
|
||
|
func _on_FontSizePlus_pressed() -> void:
|
||
|
dynamic_font.size += 2
|
||
|
|
||
|
|
||
|
func _on_FontSizeMin_pressed() -> void:
|
||
|
dynamic_font.size -= 2
|
||
|
|
||
|
|
||
|
func _on_MistBox_toggled(button_pressed: bool) -> void:
|
||
|
if button_pressed == true:
|
||
|
mist_shader.visible = true
|
||
|
else:
|
||
|
mist_shader.visible = false
|
||
|
|
||
|
|
||
|
func _on_LightBox_toggled(button_pressed: bool) -> void:
|
||
|
if button_pressed == true:
|
||
|
mood_light.visible = true
|
||
|
else:
|
||
|
mood_light.visible = false
|