New File Popup (no function)

This commit is contained in:
bleeptrack 2020-11-10 18:34:51 +01:00
parent 563f6ba835
commit 39e62eb8cf
3 changed files with 11 additions and 1 deletions

View file

@ -24,6 +24,7 @@ func _ready():
update()
_set_mode(mode)
_set_title(title)
$PopupMenu.add_item("New file", 1)
func _input(event):
if event.is_action_pressed("save"):
@ -176,6 +177,11 @@ func _set_title(new_title):
title = new_title
if title_label:
title_label.text = new_title
func _gui_input(event):
if event is InputEventMouseButton and event.is_pressed() and event.button_index == BUTTON_RIGHT:
$PopupMenu.set_position(get_global_mouse_position())
$PopupMenu.popup()
func very_best_sort(a,b):
if a[0] == "." and b[0] != ".":