add custom image picker
This commit is contained in:
parent
42fd81b914
commit
e90eb40630
12 changed files with 310 additions and 43 deletions
69
src/ImagePicker.tscn
Normal file
69
src/ImagePicker.tscn
Normal file
|
@ -0,0 +1,69 @@
|
|||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://src/ImagePicker.gd" type="Script" id=1]
|
||||
[ext_resource path="res://src/FileList.tscn" type="PackedScene" id=2]
|
||||
|
||||
[node name="ImagePicker" type="Panel"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
rect_clip_content = true
|
||||
alignment = 1
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="TabContainer" type="TabContainer" parent="VBoxContainer"]
|
||||
margin_right = 1024.0
|
||||
margin_bottom = 512.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Taqin" type="Tabs" parent="VBoxContainer/TabContainer"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_left = 8.0
|
||||
margin_top = 61.0
|
||||
margin_right = -8.0
|
||||
margin_bottom = -8.0
|
||||
rect_clip_content = true
|
||||
|
||||
[node name="FileList" parent="VBoxContainer/TabContainer/Taqin" instance=ExtResource( 2 )]
|
||||
|
||||
[node name="Filesystem" type="Tabs" parent="VBoxContainer/TabContainer"]
|
||||
visible = false
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_left = 8.0
|
||||
margin_top = 61.0
|
||||
margin_right = -8.0
|
||||
margin_bottom = -8.0
|
||||
|
||||
[node name="FileList" parent="VBoxContainer/TabContainer/Filesystem" instance=ExtResource( 2 )]
|
||||
root_dir = "/home/fabs/Pictures"
|
||||
walkable = true
|
||||
|
||||
[node name="Button" type="Button" parent="VBoxContainer"]
|
||||
margin_top = 520.0
|
||||
margin_right = 1024.0
|
||||
margin_bottom = 600.0
|
||||
rect_min_size = Vector2( 0, 80 )
|
||||
text = "Cancel"
|
||||
flat = true
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
[connection signal="item_rect_changed" from="." to="." method="_on_ImagePicker_item_rect_changed"]
|
||||
[connection signal="resized" from="." to="." method="_on_ImagePicker_resized"]
|
||||
[connection signal="file_selected" from="VBoxContainer/TabContainer/Taqin/FileList" to="." method="_on_FileList_file_selected"]
|
||||
[connection signal="file_selected" from="VBoxContainer/TabContainer/Filesystem/FileList" to="." method="_on_FileList_file_selected"]
|
Loading…
Add table
Add a link
Reference in a new issue