diff --git a/README.md b/README.md index ec36a1b..2fa9318 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ If you want to report a bug or request a feature, you should do so on GitHub usi You're welcome to support me on: -- **[ Patreon](https://www.patreon.com/dreadpon?fan_landing=true)** +- **[ Patreon](https://www.patreon.com/dreadpon)** - **[ Boosty](https://boosty.to/dreadpon)** This will help make updates for this plugin and embark on any new projects I set my eyes on. diff --git a/addons/dreadpon.spatial_gardener/controls/input_fields/action_thumbnail/ui_action_thumbnail.gd b/addons/dreadpon.spatial_gardener/controls/input_fields/action_thumbnail/ui_action_thumbnail.gd index 4d9a3d0..9924181 100644 --- a/addons/dreadpon.spatial_gardener/controls/input_fields/action_thumbnail/ui_action_thumbnail.gd +++ b/addons/dreadpon.spatial_gardener/controls/input_fields/action_thumbnail/ui_action_thumbnail.gd @@ -129,8 +129,10 @@ func update_size(): func update_size_step2(): var thumb_rect = Vector2(thumb_size, thumb_size) var button_rect = Vector2(button_size, button_size) - var toMargin = thumb_size - button_size - 4 + var to_margin = thumb_size - button_size - 4 + var scale = float(button_size) / 32.0 + print("%s %s" % [str(thumb_rect), str(button_rect)]) root_button_nd.set_size(thumb_rect) texture_rect_nd.set_size(thumb_rect) @@ -141,20 +143,26 @@ func update_size_step2(): check_box_nd.get_icon("checked").set_size_override(button_rect) check_box_nd.get_icon("unchecked").set_size_override(button_rect) check_box_nd.set_size(button_rect) - check_box_nd.set_position(Vector2(4, toMargin)) + check_box_nd.set_position(Vector2(4, to_margin)) if is_instance_valid(clear_button_nd): clear_button_nd.set_size(button_rect) clear_button_nd.set_position(Vector2(4, 4)) if is_instance_valid(delete_button_nd): delete_button_nd.set_size(button_rect) - delete_button_nd.set_position(Vector2(toMargin, 4)) + delete_button_nd.set_position(Vector2(to_margin, 4)) if is_instance_valid(counter_container_nd): counter_container_nd.set_size(button_rect) - counter_container_nd.set_position(Vector2(toMargin, toMargin)) + counter_container_nd.set_position(Vector2(to_margin, to_margin)) - counter_label_nd.rect_pivot_offset = counter_label_nd.rect_size - var scale = float(button_size) / 32.0 - counter_label_nd.rect_scale = Vector2(scale, scale) + var label = counter_container_nd.get_child(0) + var font = label.get_font("font", "").duplicate() + font.size *= scale + label.add_font_override("font", font) + if is_instance_valid(alt_text_margin_nd): + var label = alt_text_margin_nd.get_child(0) + var font = label.get_font("font", "").duplicate() + font.size *= scale + label.add_font_override("font", font) rect_size = thumb_rect rect_min_size = thumb_rect diff --git a/addons/dreadpon.spatial_gardener/controls/input_fields/action_thumbnail/ui_action_thumbnail.tscn b/addons/dreadpon.spatial_gardener/controls/input_fields/action_thumbnail/ui_action_thumbnail.tscn index 036fb29..5e66206 100644 --- a/addons/dreadpon.spatial_gardener/controls/input_fields/action_thumbnail/ui_action_thumbnail.tscn +++ b/addons/dreadpon.spatial_gardener/controls/input_fields/action_thumbnail/ui_action_thumbnail.tscn @@ -1,8 +1,10 @@ -[gd_scene load_steps=15 format=2] +[gd_scene load_steps=17 format=2] [ext_resource path="res://addons/dreadpon.spatial_gardener/controls/extensions/ui_drop_button.gd" type="Script" id=1] [ext_resource path="res://addons/dreadpon.spatial_gardener/controls/input_fields/action_thumbnail/ui_action_thumbnail.gd" type="Script" id=2] +[sub_resource type="BitmapFont" id=13] + [sub_resource type="StyleBoxFlat" id=1] content_margin_left = 4.0 content_margin_right = 4.0 @@ -15,7 +17,9 @@ border_width_right = 1 border_width_bottom = 1 border_color = Color( 1, 1, 1, 0.501961 ) -[sub_resource type="Image" id=13] +[sub_resource type="ImageTexture" id=14] + +[sub_resource type="Image" id=15] data = { "data": PoolByteArray( 0, 0, 0, 0, 212, 212, 212, 0, 221, 221, 221, 0, 221, 221, 221, 0, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 0, 221, 221, 221, 0, 221, 221, 221, 0, 212, 212, 212, 0, 0, 0, 0, 0, 212, 212, 212, 0, 212, 212, 212, 6, 221, 221, 221, 30, 221, 221, 221, 46, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 221, 221, 221, 46, 221, 221, 221, 30, 212, 212, 212, 6, 212, 212, 212, 0, 221, 221, 221, 0, 221, 221, 221, 30, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 221, 221, 221, 30, 221, 221, 221, 0, 221, 221, 221, 0, 221, 221, 221, 45, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 221, 221, 221, 60, 222, 222, 222, 47, 222, 222, 222, 47, 221, 221, 221, 45, 221, 221, 221, 0, 222, 222, 222, 0, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 223, 223, 223, 105, 223, 223, 223, 243, 223, 223, 223, 105, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 223, 223, 223, 105, 223, 223, 223, 248, 224, 224, 224, 255, 223, 223, 223, 186, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 220, 220, 220, 104, 223, 223, 223, 248, 224, 224, 224, 255, 223, 223, 223, 193, 225, 225, 225, 51, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 47, 222, 222, 222, 47, 217, 217, 217, 48, 224, 224, 224, 66, 222, 222, 222, 47, 222, 222, 222, 47, 220, 220, 220, 103, 223, 223, 223, 248, 224, 224, 224, 255, 223, 223, 223, 193, 220, 220, 220, 52, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 47, 217, 217, 217, 48, 223, 223, 223, 178, 222, 222, 222, 231, 220, 220, 220, 74, 222, 222, 222, 102, 223, 223, 223, 248, 224, 224, 224, 255, 222, 222, 222, 194, 220, 220, 220, 52, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 47, 219, 219, 219, 64, 223, 223, 223, 225, 224, 224, 224, 255, 224, 224, 224, 233, 223, 223, 223, 248, 224, 224, 224, 255, 222, 222, 222, 195, 220, 220, 220, 52, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 47, 222, 222, 222, 47, 218, 218, 218, 69, 223, 223, 223, 224, 224, 224, 224, 255, 224, 224, 224, 255, 222, 222, 222, 196, 220, 220, 220, 52, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 217, 217, 217, 68, 223, 223, 223, 224, 222, 222, 222, 196, 220, 220, 220, 52, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 0, 221, 221, 221, 0, 221, 221, 221, 45, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 224, 224, 224, 66, 221, 221, 221, 53, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 221, 221, 221, 45, 221, 221, 221, 0, 221, 221, 221, 0, 221, 221, 221, 30, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 221, 221, 221, 30, 221, 221, 221, 0, 212, 212, 212, 0, 212, 212, 212, 6, 221, 221, 221, 30, 221, 221, 221, 46, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 221, 221, 221, 46, 221, 221, 221, 30, 212, 212, 212, 6, 212, 212, 212, 0, 0, 0, 0, 0, 212, 212, 212, 0, 221, 221, 221, 0, 221, 221, 221, 0, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 0, 221, 221, 221, 0, 221, 221, 221, 0, 212, 212, 212, 0, 0, 0, 0, 0 ), "format": "RGBA8", @@ -28,10 +32,10 @@ data = { resource_local_to_scene = true flags = 4 flags = 4 -image = SubResource( 13 ) +image = SubResource( 15 ) size = Vector2( 32, 32 ) -[sub_resource type="Image" id=14] +[sub_resource type="Image" id=16] data = { "data": PoolByteArray( 0, 0, 0, 0, 212, 212, 212, 0, 221, 221, 221, 0, 221, 221, 221, 0, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 0, 221, 221, 221, 0, 221, 221, 221, 0, 212, 212, 212, 0, 0, 0, 0, 0, 212, 212, 212, 0, 212, 212, 212, 6, 221, 221, 221, 30, 221, 221, 221, 46, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 221, 221, 221, 46, 221, 221, 221, 30, 212, 212, 212, 6, 212, 212, 212, 0, 221, 221, 221, 0, 221, 221, 221, 30, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 221, 221, 221, 30, 221, 221, 221, 0, 221, 221, 221, 0, 221, 221, 221, 45, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 221, 221, 221, 45, 221, 221, 221, 0, 222, 222, 222, 0, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 0, 221, 221, 221, 0, 221, 221, 221, 45, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 221, 221, 221, 45, 221, 221, 221, 0, 221, 221, 221, 0, 221, 221, 221, 30, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 221, 221, 221, 30, 221, 221, 221, 0, 212, 212, 212, 0, 212, 212, 212, 6, 221, 221, 221, 30, 221, 221, 221, 46, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 222, 222, 222, 47, 221, 221, 221, 46, 221, 221, 221, 30, 212, 212, 212, 6, 212, 212, 212, 0, 0, 0, 0, 0, 212, 212, 212, 0, 221, 221, 221, 0, 221, 221, 221, 0, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 0, 222, 222, 222, 0, 221, 221, 221, 0, 221, 221, 221, 0, 212, 212, 212, 0, 0, 0, 0, 0 ), "format": "RGBA8", @@ -44,7 +48,7 @@ data = { resource_local_to_scene = true flags = 4 flags = 4 -image = SubResource( 14 ) +image = SubResource( 16 ) size = Vector2( 32, 32 ) [sub_resource type="StyleBoxFlat" id=6] @@ -68,7 +72,7 @@ corner_radius_top_right = 5 corner_radius_bottom_right = 5 corner_radius_bottom_left = 5 -[sub_resource type="Image" id=15] +[sub_resource type="Image" id=17] data = { "data": PoolByteArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 223, 223, 223, 0, 223, 223, 223, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 223, 223, 223, 0, 223, 223, 223, 179, 223, 223, 223, 179, 223, 223, 223, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 223, 223, 223, 0, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 223, 223, 223, 0, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 223, 223, 223, 0, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 223, 223, 223, 0, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, 220, 220, 0, 223, 223, 223, 0, 223, 223, 223, 0, 223, 223, 223, 0, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 0, 223, 223, 223, 0, 223, 223, 223, 0, 220, 220, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, 220, 220, 0, 220, 220, 220, 59, 223, 223, 223, 201, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 200, 220, 220, 220, 59, 220, 220, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 222, 222, 222, 0, 222, 222, 222, 199, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 222, 222, 222, 198, 222, 222, 222, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 223, 223, 223, 0, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 223, 223, 223, 0, 223, 223, 223, 0, 223, 223, 223, 0, 223, 223, 223, 0, 223, 223, 223, 0, 223, 223, 223, 0, 223, 223, 223, 0, 223, 223, 223, 0, 223, 223, 223, 0, 223, 223, 223, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 223, 223, 223, 0, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 223, 223, 223, 0, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 223, 223, 223, 0, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 254, 223, 223, 223, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 223, 223, 223, 0, 223, 223, 223, 254, 223, 223, 223, 203, 223, 223, 223, 203, 223, 223, 223, 152, 223, 223, 223, 152, 222, 222, 222, 101, 222, 222, 222, 101, 219, 219, 219, 50, 219, 219, 219, 50, 221, 221, 221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 223, 223, 223, 0, 223, 223, 223, 0, 223, 223, 223, 0, 223, 223, 223, 0, 223, 223, 223, 0, 222, 222, 222, 0, 222, 222, 222, 0, 219, 219, 219, 0, 219, 219, 219, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ), "format": "RGBA8", @@ -81,10 +85,10 @@ data = { resource_local_to_scene = true flags = 0 flags = 0 -image = SubResource( 15 ) +image = SubResource( 17 ) size = Vector2( 10, 10 ) -[sub_resource type="Image" id=16] +[sub_resource type="Image" id=18] data = { "data": PoolByteArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 91, 91, 0, 255, 92, 92, 0, 255, 89, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 89, 89, 0, 255, 91, 91, 0, 255, 91, 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 91, 91, 0, 255, 91, 91, 161, 255, 92, 92, 196, 255, 89, 89, 20, 255, 89, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 89, 89, 0, 255, 89, 89, 20, 255, 91, 91, 197, 255, 91, 91, 159, 255, 91, 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 92, 92, 0, 255, 92, 92, 182, 255, 93, 93, 255, 255, 92, 92, 210, 255, 89, 89, 20, 255, 89, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 89, 89, 0, 255, 89, 89, 20, 255, 92, 92, 210, 255, 93, 93, 255, 255, 92, 92, 182, 255, 92, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 85, 85, 0, 255, 85, 85, 21, 255, 92, 92, 210, 255, 93, 93, 255, 255, 92, 92, 209, 255, 89, 89, 20, 255, 89, 89, 0, 255, 89, 89, 0, 255, 89, 89, 20, 255, 92, 92, 209, 255, 93, 93, 255, 255, 92, 92, 210, 255, 85, 85, 21, 255, 85, 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 88, 88, 0, 255, 92, 92, 22, 255, 92, 92, 210, 255, 93, 93, 255, 255, 92, 92, 207, 255, 89, 89, 20, 255, 89, 89, 20, 255, 91, 91, 208, 255, 93, 93, 255, 255, 92, 92, 210, 255, 92, 92, 22, 255, 88, 88, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 92, 92, 0, 255, 92, 92, 22, 255, 92, 92, 212, 255, 93, 93, 255, 255, 92, 92, 207, 255, 92, 92, 207, 255, 93, 93, 255, 255, 91, 91, 211, 255, 92, 92, 22, 255, 92, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 92, 92, 0, 255, 92, 92, 22, 255, 92, 92, 213, 255, 93, 93, 255, 255, 93, 93, 255, 255, 92, 92, 212, 255, 92, 92, 22, 255, 92, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 89, 89, 0, 255, 89, 89, 20, 255, 92, 92, 210, 255, 93, 93, 255, 255, 93, 93, 255, 255, 92, 92, 210, 255, 89, 89, 20, 255, 89, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 89, 89, 0, 255, 89, 89, 20, 255, 92, 92, 210, 255, 93, 93, 255, 255, 92, 92, 210, 255, 92, 92, 210, 255, 93, 93, 255, 255, 92, 92, 209, 255, 89, 89, 20, 255, 89, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 89, 89, 0, 255, 89, 89, 20, 255, 92, 92, 209, 255, 93, 93, 255, 255, 92, 92, 210, 255, 85, 85, 21, 255, 92, 92, 22, 255, 92, 92, 210, 255, 93, 93, 255, 255, 91, 91, 208, 255, 89, 89, 20, 255, 89, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 89, 89, 0, 255, 89, 89, 20, 255, 92, 92, 207, 255, 93, 93, 255, 255, 91, 91, 211, 255, 92, 92, 22, 255, 88, 88, 0, 255, 92, 92, 0, 255, 92, 92, 22, 255, 91, 91, 211, 255, 93, 93, 255, 255, 92, 92, 207, 255, 89, 89, 20, 255, 89, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 92, 92, 0, 255, 92, 92, 185, 255, 93, 93, 255, 255, 92, 92, 212, 255, 92, 92, 22, 255, 92, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 92, 92, 0, 255, 92, 92, 22, 255, 92, 92, 212, 255, 93, 93, 255, 255, 92, 92, 184, 255, 92, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 91, 91, 0, 255, 91, 91, 178, 255, 92, 92, 187, 255, 92, 92, 22, 255, 92, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 92, 92, 0, 255, 92, 92, 22, 255, 92, 92, 187, 255, 92, 92, 177, 255, 92, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 91, 91, 0, 255, 92, 92, 0, 255, 92, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 92, 92, 0, 255, 92, 92, 0, 255, 92, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ), "format": "RGBA8", @@ -97,7 +101,7 @@ data = { resource_local_to_scene = true flags = 0 flags = 0 -image = SubResource( 16 ) +image = SubResource( 18 ) size = Vector2( 16, 16 ) [node name="ActionThumbnail" type="Control"] @@ -113,6 +117,7 @@ __meta__ = { [node name="RootButton" type="Button" parent="."] anchor_right = 1.0 anchor_bottom = 1.0 +custom_fonts/font = SubResource( 13 ) script = ExtResource( 1 ) __meta__ = { "_edit_use_anchors_": false @@ -166,7 +171,14 @@ margin_left = 4.0 margin_top = -36.0 margin_right = 36.0 margin_bottom = -4.0 +custom_fonts/font = SubResource( 13 ) +custom_icons/radio_checked_disabled = SubResource( 14 ) +custom_icons/radio_checked = SubResource( 14 ) +custom_icons/checked_disabled = SubResource( 14 ) +custom_icons/radio_unchecked_disabled = SubResource( 14 ) custom_icons/checked = SubResource( 3 ) +custom_icons/radio_unchecked = SubResource( 14 ) +custom_icons/unchecked_disabled = SubResource( 14 ) custom_icons/unchecked = SubResource( 5 ) custom_styles/hover = SubResource( 6 ) custom_styles/pressed = SubResource( 7 ) @@ -184,6 +196,7 @@ margin_left = 4.0 margin_top = 4.0 margin_right = 36.0 margin_bottom = 36.0 +custom_fonts/font = SubResource( 13 ) custom_styles/hover = SubResource( 6 ) custom_styles/pressed = SubResource( 7 ) custom_styles/focus = SubResource( 6 ) @@ -211,6 +224,7 @@ margin_left = -36.0 margin_top = 4.0 margin_right = -4.0 margin_bottom = 36.0 +custom_fonts/font = SubResource( 13 ) custom_styles/hover = SubResource( 6 ) custom_styles/pressed = SubResource( 7 ) custom_styles/focus = SubResource( 6 ) @@ -241,6 +255,9 @@ margin_top = -36.0 margin_right = -4.0 margin_bottom = -4.0 mouse_filter = 2 +__meta__ = { +"_edit_use_anchors_": false +} [node name="CounterLabel" type="Label" parent="CounterContainer"] anchor_left = 1.0 diff --git a/addons/dreadpon.spatial_gardener/controls/input_fields/action_thumbnail/ui_action_thumbnail_create_inst.gd b/addons/dreadpon.spatial_gardener/controls/input_fields/action_thumbnail/ui_action_thumbnail_create_inst.gd index ee265e1..0bd6015 100644 --- a/addons/dreadpon.spatial_gardener/controls/input_fields/action_thumbnail/ui_action_thumbnail_create_inst.gd +++ b/addons/dreadpon.spatial_gardener/controls/input_fields/action_thumbnail/ui_action_thumbnail_create_inst.gd @@ -18,12 +18,12 @@ func _init(): func update_size_step2(): var button_rect = Vector2(button_size, button_size) - var toMargin = float(thumb_size - button_size) * 0.5 + var to_margin = float(thumb_size - button_size) * 0.5 .update_size_step2() texture_rect_nd.set_size(button_rect) - texture_rect_nd.set_position(Vector2(toMargin, toMargin)) + texture_rect_nd.set_position(Vector2(to_margin, to_margin)) diff --git a/addons/dreadpon.spatial_gardener/controls/ui_side_panel.gd b/addons/dreadpon.spatial_gardener/controls/ui_side_panel.gd index e6d3000..e347525 100644 --- a/addons/dreadpon.spatial_gardener/controls/ui_side_panel.gd +++ b/addons/dreadpon.spatial_gardener/controls/ui_side_panel.gd @@ -29,7 +29,8 @@ func _ready(): size_flags_horizontal = Control.SIZE_EXPAND_FILL size_flags_stretch_ratio = 0.3 - rect_min_size.x = 275.0 + rect_min_size.x = 100.0 + rect_size.x = 300.0 gardener_ui_tools.name = "gardener_ui_tools" gardener_ui_tools.split_offset = 80 diff --git a/addons/dreadpon.spatial_gardener/greenhouse/greenhouse.gd b/addons/dreadpon.spatial_gardener/greenhouse/greenhouse.gd index 335ece3..21d1b69 100644 --- a/addons/dreadpon.spatial_gardener/greenhouse/greenhouse.gd +++ b/addons/dreadpon.spatial_gardener/greenhouse/greenhouse.gd @@ -111,7 +111,7 @@ func _create_input_field(_base_control:Control, _resource_previewer, prop:String "add_create_inst_button": true, "_base_control": _base_control, "accepted_classes": ["Greenhouse_PlantState"], - "element_display_size": 100, + "element_display_size": 100 * FunLib.get_setting_safe("dreadpons_spatial_gardener/input_and_ui/greenhouse_thumbnail_scale", 1.0), "element_interaction_flags": UI_IF_ThumbnailArray.PRESET_PLANT_STATE, "_resource_previewer": _resource_previewer, } diff --git a/addons/dreadpon.spatial_gardener/greenhouse/greenhouse_LOD_variant.gd b/addons/dreadpon.spatial_gardener/greenhouse/greenhouse_LOD_variant.gd index 019d616..a15d77e 100644 --- a/addons/dreadpon.spatial_gardener/greenhouse/greenhouse_LOD_variant.gd +++ b/addons/dreadpon.spatial_gardener/greenhouse/greenhouse_LOD_variant.gd @@ -38,7 +38,7 @@ func _create_input_field(_base_control:Control, _resource_previewer, prop:String "_base_control": _base_control, # Godot really needs a proper class check "accepted_classes": Globals.MESH_CLASSES, - "element_display_size": 75, + "element_display_size": 75 * FunLib.get_setting_safe("dreadpons_spatial_gardener/input_and_ui/greenhouse_thumbnail_scale", 1.0), "element_interaction_flags": UI_IF_ThumbnailArray.PRESET_RESOURCE, "_resource_previewer": _resource_previewer, } @@ -47,7 +47,7 @@ func _create_input_field(_base_control:Control, _resource_previewer, prop:String var settings := { "_base_control": _base_control, "accepted_classes": ["PackedScene"], - "element_display_size": 75, + "element_display_size": 75 * FunLib.get_setting_safe("dreadpons_spatial_gardener/input_and_ui/greenhouse_thumbnail_scale", 1.0), "element_interaction_flags": UI_IF_ThumbnailArray.PRESET_RESOURCE, "_resource_previewer": _resource_previewer, } diff --git a/addons/dreadpon.spatial_gardener/greenhouse/greenhouse_plant.gd b/addons/dreadpon.spatial_gardener/greenhouse/greenhouse_plant.gd index d2d9016..0e89bf2 100644 --- a/addons/dreadpon.spatial_gardener/greenhouse/greenhouse_plant.gd +++ b/addons/dreadpon.spatial_gardener/greenhouse/greenhouse_plant.gd @@ -28,7 +28,7 @@ var mesh_LOD_max_distance:float = 10.0 var mesh_LOD_kill_distance:float = -1.0 # How many members fit into an octree node before it's subdivided -var mesh_LOD_max_capacity:int = 50 +var mesh_LOD_max_capacity:int = 75 # Minimum size of an octree node. Will not subdivide after this treshold # Chunks of minimum size might contain members beyond the capacity limit var mesh_LOD_min_size:float = 1.0 @@ -128,7 +128,7 @@ func _create_input_field(__base_control:Control, __resource_previewer, prop:Stri "add_create_inst_button": true, "_base_control": _base_control, "accepted_classes": accepted_classes, - "element_display_size": 75, + "element_display_size": 75 * FunLib.get_setting_safe("dreadpons_spatial_gardener/input_and_ui/greenhouse_thumbnail_scale", 1.0), "element_interaction_flags": UI_IF_ThumbnailArray.PRESET_LOD_VARIANT, "_resource_previewer": _resource_previewer, } diff --git a/addons/dreadpon.spatial_gardener/utility/project_settings_manager.gd b/addons/dreadpon.spatial_gardener/utility/project_settings_manager.gd index cc336d0..bee510a 100644 --- a/addons/dreadpon.spatial_gardener/utility/project_settings_manager.gd +++ b/addons/dreadpon.spatial_gardener/utility/project_settings_manager.gd @@ -20,6 +20,10 @@ static func add_plugin_project_settings(): "dreadpons_spatial_gardener/input_and_ui/greenhouse_ui_enable_undo_redo", true, TYPE_BOOL) + add_project_setting( + "dreadpons_spatial_gardener/input_and_ui/greenhouse_thumbnail_scale", + 1.0, + TYPE_REAL) add_project_setting_globals_enum( "dreadpons_spatial_gardener/input_and_ui/brush_property_edit_modifier_key", Globals.KeyList.KEY_SHIFT, Globals.KeyList) diff --git a/project.godot b/project.godot index c14482c..08e3a70 100644 --- a/project.godot +++ b/project.godot @@ -13,6 +13,10 @@ config_version=4 config/name="Dreadpon's Spatial Gardener" config/icon="res://icon.png" +[editor_plugins] + +enabled=PoolStringArray( "res://addons/dreadpon.spatial_gardener/plugin.cfg" ) + [physics] common/enable_pause_aware_picking=true diff --git a/reference/TUTORIAL_QUICK_START.md b/reference/TUTORIAL_QUICK_START.md index 73729b8..1da1252 100644 --- a/reference/TUTORIAL_QUICK_START.md +++ b/reference/TUTORIAL_QUICK_START.md @@ -19,11 +19,11 @@ ## Plugin Setup You should have Godot engine installed; if not, you can download it from the [official website.](https://godotengine.org/download) -Recommended version is [3.4.2 and can be easily found on Godot's GitHub](https://github.com/godotengine/godot/releases), however, most 3.x versions should be supported. Godot 4 is not supported at the moment. +Minimum and most compatible version is [3.4.2 and can be easily found on Godot's GitHub](https://github.com/godotengine/godot/releases/tag/3.4.2-stable). ![t_pt1_001_godot_older_download](https://i.postimg.cc/sgjxVHJn/t-pt1-001-godot-older-download.jpg) -Grab a copy of the showcase project from [GitHub](https://github.com/dreadpon/godot_spatial_gardener). Open the page, go to `Releases`, find the latest version and download the `godot_spatial_gardener_demo.zip`. +Grab a copy of the demo project from [GitHub](https://github.com/dreadpon/godot_spatial_gardener). Open the page, go to `Releases`, find the latest version and download the `godot_spatial_gardener_demo.zip`. ![t_pt1_002_plugin_demo_download](https://i.postimg.cc/DwxZmQj7/t-pt1-002-plugin-demo-download.jpg) @@ -149,7 +149,7 @@ Last thing: collision. If you click on `LOD Variants`, you'll see two properties ![t_pt1_025_inside_lod_variant](https://i.postimg.cc/bJCdMxn6/t-pt1-025-inside-lod-variant.jpg) -Find `body_plants_tree_pine.tscn` and drag it over `Spawned Spatial`. +Find `body_plants_tree_pine.tscn` and drag it over `Spawned Spatial` for each of the variants. ![t_pt1_026_assigning_collision](https://i.postimg.cc/kXtD1tgc/t-pt1-026-assigning-collision.jpg) @@ -191,7 +191,7 @@ In terms of environment design, this means our bushes will mostly point upwards, ## Final steps -In Spatial Gardener you can paint with several plant types simultaneously. Deselect trees, select bushes with grass and paint them. +In Spatial Gardener you can paint with several plant types simultaneously. Deselect trees, select bushes with grass and paint them. If you can't see your grass, temporarily disable `LOD Kill Distance` by setting it to -1. ![t_pt1_034_select_bush_grass_painting](https://i.postimg.cc/sXNDKVFq/t-pt1-034-select-bush-grass-painting.jpg)