mirror of
https://github.com/CrispyPin/ovr-utils.git
synced 2024-11-21 23:20:25 +01:00
set imageviewer file dialog to start in home directory
This commit is contained in:
parent
078cd11e5e
commit
386465e8d9
2 changed files with 7 additions and 4 deletions
|
@ -3,6 +3,9 @@ extends Control
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
get_viewport().get_parent().add_cursor()
|
get_viewport().get_parent().add_cursor()
|
||||||
|
var homefolder = OS.get_user_data_dir()
|
||||||
|
homefolder = homefolder.get_base_dir().get_base_dir().get_base_dir()
|
||||||
|
$FileDialog.current_dir = homefolder
|
||||||
|
|
||||||
|
|
||||||
func _on_Open_pressed() -> void:
|
func _on_Open_pressed() -> void:
|
||||||
|
|
|
@ -35,15 +35,15 @@ rect_clip_content = true
|
||||||
theme = ExtResource( 2 )
|
theme = ExtResource( 2 )
|
||||||
window_title = "Open a File or Directory"
|
window_title = "Open a File or Directory"
|
||||||
mode = 3
|
mode = 3
|
||||||
access = 1
|
access = 2
|
||||||
current_dir = "user://"
|
current_dir = "/home/crispypin/proj/godot/ovr-utils/ovr-utils"
|
||||||
current_path = "user://"
|
current_path = "/home/crispypin/proj/godot/ovr-utils/ovr-utils/"
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_edit_use_anchors_": false
|
"_edit_use_anchors_": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="Open" type="Button" parent="."]
|
[node name="Open" type="Button" parent="."]
|
||||||
modulate = Color( 1, 1, 1, 0.498039 )
|
modulate = Color( 1, 1, 1, 0.8 )
|
||||||
anchor_top = 1.0
|
anchor_top = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
margin_top = -191.0
|
margin_top = -191.0
|
||||||
|
|
Loading…
Reference in a new issue