diff --git a/assets/graphics/layers/type_icons/layer_3d.png b/assets/graphics/layers/type_icons/layer_3d.png new file mode 100644 index 000000000..1b262d7a3 Binary files /dev/null and b/assets/graphics/layers/type_icons/layer_3d.png differ diff --git a/assets/graphics/layers/type_icons/layer_3d.png.import b/assets/graphics/layers/type_icons/layer_3d.png.import new file mode 100644 index 000000000..4c2cbc44d --- /dev/null +++ b/assets/graphics/layers/type_icons/layer_3d.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c0h02b3g41jn4" +path="res://.godot/imported/layer_3d.png-d1d129c484dc412c7f65f43e3ab214de.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/graphics/layers/type_icons/layer_3d.png" +dest_files=["res://.godot/imported/layer_3d.png-d1d129c484dc412c7f65f43e3ab214de.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/graphics/layers/type_icons/layer_group.png b/assets/graphics/layers/type_icons/layer_group.png new file mode 100644 index 000000000..4b07f55ea Binary files /dev/null and b/assets/graphics/layers/type_icons/layer_group.png differ diff --git a/assets/graphics/layers/type_icons/layer_group.png.import b/assets/graphics/layers/type_icons/layer_group.png.import new file mode 100644 index 000000000..a4adf218f --- /dev/null +++ b/assets/graphics/layers/type_icons/layer_group.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bvg3wqi6p6s14" +path="res://.godot/imported/layer_group.png-7073d09db245e0abdadd33a0d4a32e4d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/graphics/layers/type_icons/layer_group.png" +dest_files=["res://.godot/imported/layer_group.png-7073d09db245e0abdadd33a0d4a32e4d.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/graphics/layers/type_icons/layer_pixel.png b/assets/graphics/layers/type_icons/layer_pixel.png new file mode 100644 index 000000000..ccfb8a48f Binary files /dev/null and b/assets/graphics/layers/type_icons/layer_pixel.png differ diff --git a/assets/graphics/layers/type_icons/layer_pixel.png.import b/assets/graphics/layers/type_icons/layer_pixel.png.import new file mode 100644 index 000000000..78c79251c --- /dev/null +++ b/assets/graphics/layers/type_icons/layer_pixel.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cjvk47bd56156" +path="res://.godot/imported/layer_pixel.png-5cb5e362528cc5d24159d624e17c1760.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/graphics/layers/type_icons/layer_pixel.png" +dest_files=["res://.godot/imported/layer_pixel.png-5cb5e362528cc5d24159d624e17c1760.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/graphics/layers/type_icons/layer_sound.png b/assets/graphics/layers/type_icons/layer_sound.png new file mode 100644 index 000000000..6049edb19 Binary files /dev/null and b/assets/graphics/layers/type_icons/layer_sound.png differ diff --git a/assets/graphics/layers/type_icons/layer_sound.png.import b/assets/graphics/layers/type_icons/layer_sound.png.import new file mode 100644 index 000000000..03fed4059 --- /dev/null +++ b/assets/graphics/layers/type_icons/layer_sound.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ctkhyfr6idb3u" +path="res://.godot/imported/layer_sound.png-6a1e2becb20b310be6eb52c40325fe0a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/graphics/layers/type_icons/layer_sound.png" +dest_files=["res://.godot/imported/layer_sound.png-6a1e2becb20b310be6eb52c40325fe0a.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/graphics/layers/type_icons/layer_tilemap.png b/assets/graphics/layers/type_icons/layer_tilemap.png new file mode 100644 index 000000000..7fe318d4e Binary files /dev/null and b/assets/graphics/layers/type_icons/layer_tilemap.png differ diff --git a/assets/graphics/layers/type_icons/layer_tilemap.png.import b/assets/graphics/layers/type_icons/layer_tilemap.png.import new file mode 100644 index 000000000..f04d9ad1c --- /dev/null +++ b/assets/graphics/layers/type_icons/layer_tilemap.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cik62s8awxnlw" +path="res://.godot/imported/layer_tilemap.png-958a69d0e26ff564c8d8c53e0e5a15c6.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/graphics/layers/type_icons/layer_tilemap.png" +dest_files=["res://.godot/imported/layer_tilemap.png-958a69d0e26ff564c8d8c53e0e5a15c6.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/src/UI/Timeline/AnimationTimeline.tscn b/src/UI/Timeline/AnimationTimeline.tscn index 0f18b4309..6cc7eb072 100644 --- a/src/UI/Timeline/AnimationTimeline.tscn +++ b/src/UI/Timeline/AnimationTimeline.tscn @@ -930,7 +930,6 @@ theme_override_constants/separation = 0 [node name="TimelineScroll" type="ScrollContainer" parent="TimelineContainer/MainBodyPanel/MainBodyVBoxContainer"] layout_mode = 2 size_flags_vertical = 3 -vertical_scroll_mode = 2 [node name="MarginContainer" type="MarginContainer" parent="TimelineContainer/MainBodyPanel/MainBodyVBoxContainer/TimelineScroll"] layout_mode = 2 diff --git a/src/UI/Timeline/LayerButton.gd b/src/UI/Timeline/LayerButton.gd index 71a5819f7..b76699efa 100644 --- a/src/UI/Timeline/LayerButton.gd +++ b/src/UI/Timeline/LayerButton.gd @@ -2,6 +2,13 @@ class_name LayerButton extends HBoxContainer const HIERARCHY_DEPTH_PIXEL_SHIFT := 16 +const ARRAY_TEXTURE_TYPES: Array[Texture2D] = [ + preload("res://assets/graphics/layers/type_icons/layer_pixel.png"), + preload("res://assets/graphics/layers/type_icons/layer_group.png"), + preload("res://assets/graphics/layers/type_icons/layer_3d.png"), + preload("res://assets/graphics/layers/type_icons/layer_tilemap.png"), + preload("res://assets/graphics/layers/type_icons/layer_sound.png") +] var layer_index := 0: set(value): @@ -26,6 +33,7 @@ var audio_player: AudioStreamPlayer @onready var label := %LayerNameLabel as Label @onready var line_edit := %LayerNameLineEdit as LineEdit @onready var hierarchy_spacer := %HierarchySpacer as Control +@onready var layer_type_texture_rect := %LayerTypeTextureRect as TextureRect @onready var linked_button := %LinkButton as BaseButton @onready var clipping_mask_icon := %ClippingMask as TextureRect @onready var popup_menu := $PopupMenu as PopupMenu @@ -53,6 +61,7 @@ func _ready() -> void: custom_minimum_size.y = Global.animation_timeline.cel_size label.text = layer.name line_edit.text = layer.name + layer_type_texture_rect.texture = ARRAY_TEXTURE_TYPES[layer.get_layer_type()] for child in $HBoxContainer.get_children(): if not child is Button: continue diff --git a/src/UI/Timeline/LayerButton.tscn b/src/UI/Timeline/LayerButton.tscn index 02267e664..edefd1a3d 100644 --- a/src/UI/Timeline/LayerButton.tscn +++ b/src/UI/Timeline/LayerButton.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=8 format=3 uid="uid://bai814sqvk68f"] +[gd_scene load_steps=9 format=3 uid="uid://bai814sqvk68f"] [ext_resource type="Script" path="res://src/UI/Timeline/LayerButton.gd" id="1_6hlpe"] [ext_resource type="Texture2D" uid="uid://c2b3htff5yox8" path="res://assets/graphics/layers/layer_visible.png" id="2_ef6fb"] @@ -7,6 +7,7 @@ [ext_resource type="Texture2D" uid="uid://cofw1x6chh4i" path="res://assets/graphics/layers/unlinked_layer.png" id="4_058qm"] [ext_resource type="Texture2D" uid="uid://ieo8fsapcgsy" path="res://assets/graphics/layers/clipping_mask.png" id="6_73j5q"] [ext_resource type="Script" path="res://src/UI/Timeline/LayerMainButton.gd" id="6_n8q6b"] +[ext_resource type="Texture2D" uid="uid://cjvk47bd56156" path="res://assets/graphics/layers/type_icons/layer_pixel.png" id="8_ce16y"] [node name="LayerButton" type="HBoxContainer"] anchors_preset = 15 @@ -165,6 +166,17 @@ editable = false caret_blink = true caret_blink_interval = 0.5 +[node name="LayerTypeTextureRect" type="TextureRect" parent="LayerMainButton/LayerName" groups=["UIButtons"]] +unique_name_in_owner = true +modulate = Color(1, 1, 1, 0.498039) +layout_mode = 2 +texture = ExtResource("8_ce16y") +stretch_mode = 3 + +[node name="MarginSpacer" type="Control" parent="LayerMainButton/LayerName"] +custom_minimum_size = Vector2(4, 0) +layout_mode = 2 + [node name="PopupMenu" type="PopupMenu" parent="."] disable_3d = true item_count = 2