mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-30 23:19:49 +00:00
Add layer type icons to layer buttons in the timeline
Icons made by @Erevoid
This commit is contained in:
parent
fbadf41f82
commit
44fd75fcb9
BIN
assets/graphics/layers/type_icons/layer_3d.png
Normal file
BIN
assets/graphics/layers/type_icons/layer_3d.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 138 B |
34
assets/graphics/layers/type_icons/layer_3d.png.import
Normal file
34
assets/graphics/layers/type_icons/layer_3d.png.import
Normal file
|
@ -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
|
BIN
assets/graphics/layers/type_icons/layer_group.png
Normal file
BIN
assets/graphics/layers/type_icons/layer_group.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 126 B |
34
assets/graphics/layers/type_icons/layer_group.png.import
Normal file
34
assets/graphics/layers/type_icons/layer_group.png.import
Normal file
|
@ -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
|
BIN
assets/graphics/layers/type_icons/layer_pixel.png
Normal file
BIN
assets/graphics/layers/type_icons/layer_pixel.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 106 B |
34
assets/graphics/layers/type_icons/layer_pixel.png.import
Normal file
34
assets/graphics/layers/type_icons/layer_pixel.png.import
Normal file
|
@ -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
|
BIN
assets/graphics/layers/type_icons/layer_sound.png
Normal file
BIN
assets/graphics/layers/type_icons/layer_sound.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 144 B |
34
assets/graphics/layers/type_icons/layer_sound.png.import
Normal file
34
assets/graphics/layers/type_icons/layer_sound.png.import
Normal file
|
@ -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
|
BIN
assets/graphics/layers/type_icons/layer_tilemap.png
Normal file
BIN
assets/graphics/layers/type_icons/layer_tilemap.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 117 B |
34
assets/graphics/layers/type_icons/layer_tilemap.png.import
Normal file
34
assets/graphics/layers/type_icons/layer_tilemap.png.import
Normal file
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue