diff --git a/Scripts/Global.gd b/Scripts/Global.gd index 800c45d43..55e02d26e 100644 --- a/Scripts/Global.gd +++ b/Scripts/Global.gd @@ -7,6 +7,7 @@ enum Brush_Types {PIXEL, CIRCLE, FILLED_CIRCLE, FILE, RANDOM_FILE, CUSTOM} var root_directory := "." var window_title := "" setget title_changed # Why doesn't Godot have get_window_title()? var config_cache := ConfigFile.new() + # warning-ignore:unused_class_variable var loaded_locales : Array var undo_redo : UndoRedo diff --git a/Scripts/XDGDataPaths.gd b/Scripts/XDGDataPaths.gd new file mode 100644 index 000000000..2b206fe9b --- /dev/null +++ b/Scripts/XDGDataPaths.gd @@ -0,0 +1,27 @@ +extends Node + +var xdg_data_home : String +var xdg_data_dirs : Array + +# Default location for xdg_data_home relative to $HOME +const default_xdg_data_home_rel := ".local/share" +const default_xdg_data_dirs := ["/usr/local/share", "/usr/share"] + +const config_subdir_name := "pixelorama" + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" + + +# Called when the node enters the scene tree for the first time. +func _ready(): + if OS.has_feature("X11"): + xdg_data_home = OS.get_environment("HOME").plus_file(default_xdg_data_home_rel) + + + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# pass