Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 28 additions & 47 deletions inspector_theme.tres
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
[gd_resource type="Theme" load_steps=16 format=3 uid="uid://brgv3slrtq5v1"]
[gd_resource type="Theme" load_steps=10 format=3 uid="uid://brgv3slrtq5v1"]

[ext_resource type="Texture2D" uid="uid://b82h7242i36or" path="res://addons/object-inspector/icons/file.svg" id="1_65vh4"]
[ext_resource type="Texture2D" uid="uid://dvt70e6munbkf" path="res://addons/object-inspector/icons/maximize.svg" id="1_hfaeu"]
[ext_resource type="Texture2D" uid="uid://faojaqlvg054" path="res://addons/object-inspector/icons/collapsed.svg" id="1_hpca1"]
[ext_resource type="Texture2D" uid="uid://c5cbw3xdfivxx" path="res://addons/object-inspector/icons/expanded.svg" id="2_0jwgf"]
[ext_resource type="Texture2D" uid="uid://bi7im00qdi8of" path="res://addons/object-inspector/icons/search.svg" id="2_vebvf"]
[ext_resource type="Texture2D" uid="uid://cujxaq5yaha2c" path="res://addons/object-inspector/icons/page_first.svg" id="5_e0bdv"]
[ext_resource type="Texture2D" uid="uid://bvqcp5vebapcw" path="res://addons/object-inspector/icons/edit.svg" id="5_x0g0o"]
[ext_resource type="Texture2D" uid="uid://cq5bgu087atty" path="res://addons/object-inspector/icons/page_last.svg" id="6_wdbtw"]
[ext_resource type="Texture2D" uid="uid://qiroidw4fe7t" path="res://addons/object-inspector/icons/page_next.svg" id="7_hjbvh"]
[ext_resource type="Texture2D" uid="uid://77sssjy7pfpb" path="res://addons/object-inspector/icons/page_prev.svg" id="8_ybigx"]
[ext_resource type="Texture2D" uid="uid://clcforx3jk84m" path="res://addons/object-inspector/icons/delete.svg" id="9_t1qfx"]

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_cncyr"]
content_margin_left = 2.0
content_margin_top = 2.0
content_margin_right = 2.0
content_margin_bottom = 2.0
bg_color = Color(1, 1, 1, 0.125)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ds1an"]
content_margin_left = 4.0
content_margin_top = 4.0
content_margin_right = 4.0
content_margin_bottom = 4.0
bg_color = Color(0, 0, 0, 0.5)
corner_radius_top_left = 3
corner_radius_top_right = 3
corner_radius_bottom_right = 3
Expand All @@ -27,25 +21,25 @@ anti_aliasing = false

[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_h08j0"]

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ds1an"]
content_margin_left = 4.0
content_margin_top = 4.0
content_margin_right = 4.0
content_margin_bottom = 4.0
bg_color = Color(0, 0, 0, 0.5)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_idiuy"]
content_margin_left = 2.0
content_margin_top = 2.0
content_margin_right = 2.0
content_margin_bottom = 2.0
bg_color = Color(0.225, 0.225, 0.225, 0.5)
corner_radius_top_left = 3
corner_radius_top_right = 3
corner_radius_bottom_right = 3
corner_radius_bottom_left = 3
corner_detail = 3
anti_aliasing = false

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_idiuy"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_cncyr"]
content_margin_left = 2.0
content_margin_top = 2.0
content_margin_right = 2.0
content_margin_bottom = 2.0
bg_color = Color(0.225, 0.225, 0.225, 0.5)
bg_color = Color(1, 1, 1, 0.125)
corner_radius_top_left = 3
corner_radius_top_right = 3
corner_radius_bottom_right = 3
Expand All @@ -61,29 +55,16 @@ Inspector/base_type = &"VBoxContainer"
Inspector/icons/file = ExtResource("1_65vh4")
Inspector/icons/maximize = ExtResource("1_hfaeu")
Inspector/icons/search = ExtResource("2_vebvf")
InspectorPropertyPaginator/base_type = &"VBoxContainer"
InspectorPropertyPaginator/icons/page_first = ExtResource("5_e0bdv")
InspectorPropertyPaginator/icons/page_last = ExtResource("6_wdbtw")
InspectorPropertyPaginator/icons/page_next = ExtResource("7_hjbvh")
InspectorPropertyPaginator/icons/page_prev = ExtResource("8_ybigx")
InspectorSubProperty/base_type = &"PropertyHandler"
InspectorSubProperty/styles/panel = SubResource("StyleBoxFlat_cncyr")
PropertyHandler/base_type = &"PanelContainer"
PropertyHandler/styles/panel = SubResource("StyleBoxEmpty_h08j0")
PropertyHandlerArray/base_type = &"PanelContainer"
PropertyHandlerArray/icons/delete = ExtResource("9_t1qfx")
PropertyHandlerArray/icons/edit = ExtResource("5_x0g0o")
PropertyHandlerArray/styles/panel = SubResource("StyleBoxEmpty_h08j0")
PropertyHandlerCategory/base_type = &"PanelContainer"
PropertyHandlerCategory/styles/header = SubResource("StyleBoxFlat_ds1an")
PropertyHandlerCategory/styles/panel = SubResource("StyleBoxEmpty_h08j0")
PropertyHandlerDictionary/base_type = &"PanelContainer"
PropertyHandlerDictionary/icons/delete = ExtResource("9_t1qfx")
PropertyHandlerDictionary/icons/edit = ExtResource("5_x0g0o")
PropertyHandlerDictionary/styles/panel = SubResource("StyleBoxEmpty_h08j0")
PropertyHandlerGroup/base_type = &"PanelContainer"
PropertyHandlerGroup/icons/collapsed = ExtResource("1_hpca1")
PropertyHandlerGroup/icons/expanded = ExtResource("2_0jwgf")
PropertyHandlerGroup/styles/panel = SubResource("StyleBoxFlat_idiuy")
PropertyHandlerSubGroup/base_type = &"PropertyHandlerGroup"
PropertyHandlerSubGroup/styles/panel = SubResource("StyleBoxFlat_cncyr")
PropertyCategory/base_type = &"PanelContainer"
PropertyCategory/styles/header = SubResource("StyleBoxFlat_ds1an")
PropertyCategory/styles/panel = SubResource("StyleBoxEmpty_h08j0")
PropertyGroup/base_type = &"PanelContainer"
PropertyGroup/icons/collapsed = ExtResource("1_hpca1")
PropertyGroup/icons/expanded = ExtResource("2_0jwgf")
PropertyGroup/styles/panel = SubResource("StyleBoxFlat_idiuy")
PropertyPanel/base_type = &"PanelContainer"
PropertyPanel/styles/panel = SubResource("StyleBoxEmpty_h08j0")
PropertySubGroup/base_type = &"PropertyGroup"
PropertySubGroup/styles/panel = SubResource("StyleBoxFlat_cncyr")
SubPropertyPanel/base_type = &"PropertyPanel"
SubPropertyPanel/styles/panel = SubResource("StyleBoxFlat_cncyr")
10 changes: 5 additions & 5 deletions scripts/inspector.gd
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
class_name Inspector
extends VBoxContainer


const PropertyHandler: GDScript = preload("property_handler.gd")

## Emitted when object changed.
signal object_changed(object: Object)

Expand Down Expand Up @@ -45,9 +48,6 @@ var _subgroup_states: Dictionary[StringName, bool] = {}
func _init() -> void:
self.set_theme_type_variation(&"Inspector")

# INFO: Required for static initialization.
load("res://addons/object-inspector/scripts/inspector_properties.gd")

_search = LineEdit.new()
_search.set_placeholder("Filter Properties")
_search.set_editable(false)
Expand Down Expand Up @@ -214,7 +214,7 @@ func update_inspector() -> void:
assert(is_instance_valid(parent), "Subgroup property does not have `property_container` meta!")

subgroup = control
subgroup.call(&"set_toggled", _subgroup_states.get(property.name, false))
subgroup.emit_signal(&"toggled", _subgroup_states.get(property.name, false))
subgroup.set_meta(&"group", group)

var error: Error = subgroup.connect(&"toggled", _on_subgroup_toggled.bind(property.name))
Expand All @@ -232,7 +232,7 @@ func update_inspector() -> void:
assert(is_instance_valid(parent), "Group property does not have `property_container` meta!")

group = control
group.call(&"set_toggled", _group_states.get(property.name, false))
group.emit_signal(&"toggled", _group_states.get(property.name, false))
group.set_meta(&"category", category)

var error: Error = group.connect(&"toggled", _on_group_toggled.bind(property.name))
Expand Down
37 changes: 0 additions & 37 deletions scripts/inspector_properties.gd

This file was deleted.

1 change: 0 additions & 1 deletion scripts/inspector_properties.gd.uid

This file was deleted.

176 changes: 0 additions & 176 deletions scripts/inspector_property_paginator.gd

This file was deleted.

1 change: 0 additions & 1 deletion scripts/inspector_property_paginator.gd.uid

This file was deleted.

Loading