Refactored a lot of stuff.

Added property lists.
Renamed FileAdapter to FileSystemAdapter.
And more smaller stuff.
This commit is contained in:
2021-08-18 22:03:39 +02:00
parent 8a536887cf
commit 07ebc1a707
22 changed files with 954 additions and 36 deletions

View File

@@ -0,0 +1,44 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://addons/de.mewin.gduibasics/scripts/types/misc/constraints/dynamic_grid_constraints.gd" type="Script" id=2]
[ext_resource path="res://addons/de.mewin.gduibasics/scenes/property_list/scripts/header.gd" type="Script" id=3]
[sub_resource type="StyleBoxFlat" id=1]
bg_color = Color( 0, 0, 0, 0.627451 )
corner_radius_top_left = 2
corner_radius_top_right = 2
corner_radius_bottom_right = 2
corner_radius_bottom_left = 2
[node name="header" type="PanelContainer"]
margin_right = 198.0
margin_bottom = 22.0
size_flags_horizontal = 3
custom_styles/panel = SubResource( 1 )
script = ExtResource( 3 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="header_info" type="HBoxContainer" parent="."]
margin_right = 198.0
margin_bottom = 22.0
alignment = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="texture" type="TextureRect" parent="header_info"]
margin_left = 70.0
margin_right = 70.0
margin_bottom = 22.0
[node name="label" type="Label" parent="header_info"]
margin_left = 74.0
margin_right = 128.0
margin_bottom = 22.0
text = "Header"
[node name="constraints" type="Node" parent="."]
script = ExtResource( 2 )
colspan = 2

View File

@@ -0,0 +1,21 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://addons/de.mewin.gduibasics/scenes/property_list/scripts/property_label.gd" type="Script" id=1]
[node name="property_label" type="HBoxContainer"]
anchor_right = 1.0
anchor_bottom = 1.0
size_flags_horizontal = 3
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="texture" type="TextureRect" parent="."]
margin_bottom = 600.0
[node name="label" type="Label" parent="."]
margin_left = 4.0
margin_top = 289.0
margin_right = 12.0
margin_bottom = 311.0

View File

@@ -0,0 +1,19 @@
extends Control
var label := "" setget _set_label, _get_label
var texture : Texture = null setget _set_texture, _get_texture
#####################
# setters & getters #
#####################
func _set_label(label_ : String) -> void:
$header_info/label.text = label_
func _get_label() -> String:
return $header_info/label.text
func _set_texture(texture_ : Texture) -> void:
$header_info/texture.texture = texture_
func _get_texture() -> Texture:
return $header_info/texture.texture

View File

@@ -0,0 +1,19 @@
extends Control
var label := "" setget _set_label, _get_label
var texture : Texture = null setget _set_texture, _get_texture
#####################
# setters & getters #
#####################
func _set_label(label_ : String) -> void:
$label.text = label_
func _get_label() -> String:
return $label.text
func _set_texture(texture_ : Texture) -> void:
$texture.texture = texture_
func _get_texture() -> Texture:
return $texture.texture