blob: 7209e85a9da1b5e65303d2f24a5bf520ee68b859 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
extends Node2D
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func _on_close_button_up() -> void:
get_tree().quit()
func _on_minimize_button_up() -> void:
OS.shell_open("https://tenor.com/en-CA/view/free-smileys-faces-de-emoji-nope-no-nah-gif-16168307")
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_MINIMIZED)
func _on_start_pressed() -> void:
#get_window().size = Vector2(0,0) This messes up the text for some godforesaken reason
get_window().position = Vector2(-1000,-1000)
var new_window = Window.new()
new_window.size = Vector2i(1280, 720)
new_window.initial_position = Window.WINDOW_INITIAL_POSITION_CENTER_SCREEN_WITH_MOUSE_FOCUS
#new_window.canvas_item_default_texture_filter = Viewport.DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST
var main_scene = preload("res://scenes/main.tscn")
var main_scene_instance = main_scene.instantiate()
new_window.add_child(main_scene_instance)
add_child(new_window)
|