mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-22 15:38:14 +00:00
added the game
This commit is contained in:
24
Scripts/UI/EditorPopupMenu.gd
Normal file
24
Scripts/UI/EditorPopupMenu.gd
Normal file
@@ -0,0 +1,24 @@
|
||||
extends Control
|
||||
|
||||
var active := false
|
||||
|
||||
signal closed
|
||||
|
||||
func _ready() -> void:
|
||||
set_process(false)
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
if Input.is_action_just_pressed("ui_cancel") or Input.is_action_just_pressed("editor_open_menu"):
|
||||
close()
|
||||
|
||||
func open() -> void:
|
||||
set_process(true)
|
||||
show()
|
||||
active = true
|
||||
|
||||
func close() -> void:
|
||||
set_process(false)
|
||||
hide()
|
||||
active = false
|
||||
await get_tree().create_timer(0.1).timeout
|
||||
closed.emit()
|
||||
Reference in New Issue
Block a user