mirror of
https://github.com/Relintai/godot-engine.file-editor.git
synced 2024-11-12 22:27:22 +01:00
Types part3.
This commit is contained in:
parent
a01c7c4bca
commit
3eac800771
@ -67,10 +67,10 @@ var LastOpenedFiles : Reference = null
|
||||
var Preview = preload("res://addons/file-editor/scripts/Preview.gd")
|
||||
var VanillaEditor = preload("res://addons/file-editor/scripts/VanillaEditor.gd")
|
||||
|
||||
var directories : Array = []
|
||||
var files : Array = []
|
||||
var directories : Array
|
||||
var files : Array
|
||||
var current_file_index : int = -1
|
||||
var current_file_path : String = ""
|
||||
var current_file_path : String
|
||||
var save_as : bool = false
|
||||
var current_editor : Control
|
||||
var current_font : DynamicFont
|
||||
@ -495,13 +495,13 @@ func open_in_vanillaeditor(path : String) -> Control:
|
||||
|
||||
return editor
|
||||
|
||||
func close_file(index) -> void:
|
||||
func close_file(index : int) -> void:
|
||||
if editing_file:
|
||||
confirmation_close.popup()
|
||||
else:
|
||||
confirm_close(index)
|
||||
|
||||
func confirm_close(index) -> void:
|
||||
func confirm_close(index : int) -> void:
|
||||
LastOpenedFiles.remove_opened_file(index,open_file_list)
|
||||
open_file_list.remove_item(index)
|
||||
open_file_name.clear()
|
||||
|
@ -1,11 +1,6 @@
|
||||
tool
|
||||
extends Node
|
||||
|
||||
var imgBuffer
|
||||
|
||||
func _ready():
|
||||
pass
|
||||
|
||||
func load_icon_from_name(icon_name : String) -> ImageTexture:
|
||||
var file : File = File.new()
|
||||
var image : Image = Image.new()
|
||||
|
@ -7,8 +7,6 @@ var table_preview : GridContainer = null
|
||||
signal image_downloaded()
|
||||
signal image_loaded()
|
||||
|
||||
var imgBuffer : Image
|
||||
|
||||
func _init() -> void:
|
||||
window_title = "File preview"
|
||||
resizable = true
|
||||
|
@ -275,12 +275,12 @@ func update_lastmodified(last_modified : Dictionary, icon : String) -> void:
|
||||
file_info_last_modified.set_text(str(last_modified.hour)+":"+str(last_modified.minute)+" "+str(last_modified.day)+"/"+str(last_modified.month)+"/"+str(last_modified.year))
|
||||
#file_info_last_modified_icon.texture = IconLoader.load_icon_from_name(icon)
|
||||
|
||||
func new_file_create(file_name) -> void:
|
||||
func new_file_create(file_name : String) -> void:
|
||||
text_editor.set_text("")
|
||||
|
||||
file_list.invalidate()
|
||||
|
||||
func _on_Readonly_toggled(button_pressed) -> void:
|
||||
func _on_Readonly_toggled(button_pressed : bool) -> void:
|
||||
if button_pressed:
|
||||
file_info_read_only.set_text("Read Only")
|
||||
text_editor.readonly = (true)
|
||||
|
Loading…
Reference in New Issue
Block a user