1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 09:09:47 +00:00

Use Texture resources instead of Image for tool cursor icons

This commit is contained in:
Manolis Papadeas 2021-05-31 21:39:33 +03:00
parent ed229565ad
commit 64e9d14a0e
21 changed files with 433 additions and 76 deletions

View file

@ -1,13 +1,34 @@
[remap]
importer="image"
type="Image"
path="res://.import/bucket_cursor.png-51202d25d14f421234b0d8a2cf72d4ab.image"
importer="texture"
type="StreamTexture"
path="res://.import/bucket_cursor.png-51202d25d14f421234b0d8a2cf72d4ab.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/cursor_icons/bucket_cursor.png"
dest_files=[ "res://.import/bucket_cursor.png-51202d25d14f421234b0d8a2cf72d4ab.image" ]
dest_files=[ "res://.import/bucket_cursor.png-51202d25d14f421234b0d8a2cf72d4ab.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

View file

@ -1,13 +1,34 @@
[remap]
importer="image"
type="Image"
path="res://.import/colorpicker_cursor.png-f12c7ef1c2c640cae515d4a8fac6235f.image"
importer="texture"
type="StreamTexture"
path="res://.import/colorpicker_cursor.png-f12c7ef1c2c640cae515d4a8fac6235f.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/cursor_icons/colorpicker_cursor.png"
dest_files=[ "res://.import/colorpicker_cursor.png-f12c7ef1c2c640cae515d4a8fac6235f.image" ]
dest_files=[ "res://.import/colorpicker_cursor.png-f12c7ef1c2c640cae515d4a8fac6235f.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

View file

@ -1,13 +1,34 @@
[remap]
importer="image"
type="Image"
path="res://.import/colorselect_cursor.png-4ef918151476710e2b5b5727913a4294.image"
importer="texture"
type="StreamTexture"
path="res://.import/colorselect_cursor.png-4ef918151476710e2b5b5727913a4294.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/cursor_icons/colorselect_cursor.png"
dest_files=[ "res://.import/colorselect_cursor.png-4ef918151476710e2b5b5727913a4294.image" ]
dest_files=[ "res://.import/colorselect_cursor.png-4ef918151476710e2b5b5727913a4294.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

View file

@ -30,5 +30,5 @@ process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
detect_3d=false
svg/scale=1.0

View file

@ -1,13 +1,34 @@
[remap]
importer="image"
type="Image"
path="res://.import/ellipseselect_cursor.png-3fa011c4b6f46ebf291d56f2dc801e19.image"
importer="texture"
type="StreamTexture"
path="res://.import/ellipseselect_cursor.png-3fa011c4b6f46ebf291d56f2dc801e19.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/cursor_icons/ellipseselect_cursor.png"
dest_files=[ "res://.import/ellipseselect_cursor.png-3fa011c4b6f46ebf291d56f2dc801e19.image" ]
dest_files=[ "res://.import/ellipseselect_cursor.png-3fa011c4b6f46ebf291d56f2dc801e19.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

View file

@ -1,13 +1,34 @@
[remap]
importer="image"
type="Image"
path="res://.import/ellipsetool_cursor.png-6ec52a212382915d04dbdd69eb1637a5.image"
importer="texture"
type="StreamTexture"
path="res://.import/ellipsetool_cursor.png-6ec52a212382915d04dbdd69eb1637a5.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/cursor_icons/ellipsetool_cursor.png"
dest_files=[ "res://.import/ellipsetool_cursor.png-6ec52a212382915d04dbdd69eb1637a5.image" ]
dest_files=[ "res://.import/ellipsetool_cursor.png-6ec52a212382915d04dbdd69eb1637a5.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

View file

@ -1,13 +1,34 @@
[remap]
importer="image"
type="Image"
path="res://.import/eraser_cursor.png-64324de4478bbaf2ffb2fd7139988f1a.image"
importer="texture"
type="StreamTexture"
path="res://.import/eraser_cursor.png-64324de4478bbaf2ffb2fd7139988f1a.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/cursor_icons/eraser_cursor.png"
dest_files=[ "res://.import/eraser_cursor.png-64324de4478bbaf2ffb2fd7139988f1a.image" ]
dest_files=[ "res://.import/eraser_cursor.png-64324de4478bbaf2ffb2fd7139988f1a.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

View file

@ -1,13 +1,34 @@
[remap]
importer="image"
type="Image"
path="res://.import/lasso_cursor.png-f521b7296434da45c8ee9811a0a897a8.image"
importer="texture"
type="StreamTexture"
path="res://.import/lasso_cursor.png-f521b7296434da45c8ee9811a0a897a8.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/cursor_icons/lasso_cursor.png"
dest_files=[ "res://.import/lasso_cursor.png-f521b7296434da45c8ee9811a0a897a8.image" ]
dest_files=[ "res://.import/lasso_cursor.png-f521b7296434da45c8ee9811a0a897a8.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

View file

@ -1,13 +1,34 @@
[remap]
importer="image"
type="Image"
path="res://.import/linetool_cursor.png-38c59a143cf71cc8a7903919aba16145.image"
importer="texture"
type="StreamTexture"
path="res://.import/linetool_cursor.png-38c59a143cf71cc8a7903919aba16145.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/cursor_icons/linetool_cursor.png"
dest_files=[ "res://.import/linetool_cursor.png-38c59a143cf71cc8a7903919aba16145.image" ]
dest_files=[ "res://.import/linetool_cursor.png-38c59a143cf71cc8a7903919aba16145.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

View file

@ -1,13 +1,34 @@
[remap]
importer="image"
type="Image"
path="res://.import/magicwand_cursor.png-101895aac3a0f59e7ab4bec0b6974cb2.image"
importer="texture"
type="StreamTexture"
path="res://.import/magicwand_cursor.png-101895aac3a0f59e7ab4bec0b6974cb2.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/cursor_icons/magicwand_cursor.png"
dest_files=[ "res://.import/magicwand_cursor.png-101895aac3a0f59e7ab4bec0b6974cb2.image" ]
dest_files=[ "res://.import/magicwand_cursor.png-101895aac3a0f59e7ab4bec0b6974cb2.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

View file

@ -1,13 +1,34 @@
[remap]
importer="image"
type="Image"
path="res://.import/move_cursor.png-3dc930b9b00649f7a3b5cb7fdd48b8e5.image"
importer="texture"
type="StreamTexture"
path="res://.import/move_cursor.png-3dc930b9b00649f7a3b5cb7fdd48b8e5.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/cursor_icons/move_cursor.png"
dest_files=[ "res://.import/move_cursor.png-3dc930b9b00649f7a3b5cb7fdd48b8e5.image" ]
dest_files=[ "res://.import/move_cursor.png-3dc930b9b00649f7a3b5cb7fdd48b8e5.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

View file

@ -1,13 +1,34 @@
[remap]
importer="image"
type="Image"
path="res://.import/pan_cursor.png-d26b4ee611af84aa6cee0ba9a3bf0b20.image"
importer="texture"
type="StreamTexture"
path="res://.import/pan_cursor.png-d26b4ee611af84aa6cee0ba9a3bf0b20.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/cursor_icons/pan_cursor.png"
dest_files=[ "res://.import/pan_cursor.png-d26b4ee611af84aa6cee0ba9a3bf0b20.image" ]
dest_files=[ "res://.import/pan_cursor.png-d26b4ee611af84aa6cee0ba9a3bf0b20.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

View file

@ -1,13 +1,34 @@
[remap]
importer="image"
type="Image"
path="res://.import/pencil_cursor.png-581cd21ffc0969d6643274cac6dd6185.image"
importer="texture"
type="StreamTexture"
path="res://.import/pencil_cursor.png-581cd21ffc0969d6643274cac6dd6185.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/cursor_icons/pencil_cursor.png"
dest_files=[ "res://.import/pencil_cursor.png-581cd21ffc0969d6643274cac6dd6185.image" ]
dest_files=[ "res://.import/pencil_cursor.png-581cd21ffc0969d6643274cac6dd6185.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

View file

@ -1,13 +1,34 @@
[remap]
importer="image"
type="Image"
path="res://.import/polygonselect_cursor.png-75834308db46d270a4fc7c38d5d978ac.image"
importer="texture"
type="StreamTexture"
path="res://.import/polygonselect_cursor.png-75834308db46d270a4fc7c38d5d978ac.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/cursor_icons/polygonselect_cursor.png"
dest_files=[ "res://.import/polygonselect_cursor.png-75834308db46d270a4fc7c38d5d978ac.image" ]
dest_files=[ "res://.import/polygonselect_cursor.png-75834308db46d270a4fc7c38d5d978ac.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

View file

@ -1,13 +1,34 @@
[remap]
importer="image"
type="Image"
path="res://.import/rectangletool_cursor.png-d193807b8b3306722800e39d525f344e.image"
importer="texture"
type="StreamTexture"
path="res://.import/rectangletool_cursor.png-d193807b8b3306722800e39d525f344e.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/cursor_icons/rectangletool_cursor.png"
dest_files=[ "res://.import/rectangletool_cursor.png-d193807b8b3306722800e39d525f344e.image" ]
dest_files=[ "res://.import/rectangletool_cursor.png-d193807b8b3306722800e39d525f344e.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

View file

@ -1,13 +1,34 @@
[remap]
importer="image"
type="Image"
path="res://.import/rectselect_cursor.png-685d9e15b54393035127295bf550b91c.image"
importer="texture"
type="StreamTexture"
path="res://.import/rectselect_cursor.png-685d9e15b54393035127295bf550b91c.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/cursor_icons/rectselect_cursor.png"
dest_files=[ "res://.import/rectselect_cursor.png-685d9e15b54393035127295bf550b91c.image" ]
dest_files=[ "res://.import/rectselect_cursor.png-685d9e15b54393035127295bf550b91c.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

View file

@ -1,13 +1,34 @@
[remap]
importer="image"
type="Image"
path="res://.import/shading_cursor.png-4bcf9d942739aeda75b6ade1e6510ac0.image"
importer="texture"
type="StreamTexture"
path="res://.import/shading_cursor.png-4bcf9d942739aeda75b6ade1e6510ac0.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/cursor_icons/shading_cursor.png"
dest_files=[ "res://.import/shading_cursor.png-4bcf9d942739aeda75b6ade1e6510ac0.image" ]
dest_files=[ "res://.import/shading_cursor.png-4bcf9d942739aeda75b6ade1e6510ac0.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

View file

@ -1,13 +1,34 @@
[remap]
importer="image"
type="Image"
path="res://.import/zoom_cursor.png-de89dc3566b16c9e99aed014166b3686.image"
importer="texture"
type="StreamTexture"
path="res://.import/zoom_cursor.png-de89dc3566b16c9e99aed014166b3686.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/cursor_icons/zoom_cursor.png"
dest_files=[ "res://.import/zoom_cursor.png-de89dc3566b16c9e99aed014166b3686.image" ]
dest_files=[ "res://.import/zoom_cursor.png-de89dc3566b16c9e99aed014166b3686.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

View file

@ -188,7 +188,7 @@ texture={
"compress/lossy_quality": 0.7,
"compress/mode": 0,
"compress/normal_map": 0,
"detect_3d": true,
"detect_3d": false,
"flags/anisotropic": false,
"flags/filter": false,
"flags/mipmaps": false,

View file

@ -35,8 +35,8 @@ var layers_changed_skip := false
var can_draw := false
var has_focus := false
var cursor_image = preload("res://assets/graphics/cursor_icons/cursor.png")
var left_cursor_tool_texture := ImageTexture.new()
var right_cursor_tool_texture := ImageTexture.new()
var left_cursor_tool_texture := StreamTexture.new()
var right_cursor_tool_texture := StreamTexture.new()
var image_clipboard : Image
var play_only_tags := true

View file

@ -166,10 +166,10 @@ func update_tool_buttons() -> void:
func update_tool_cursors() -> void:
var image = "res://assets/graphics/cursor_icons/%s_cursor.png" % _slots[BUTTON_LEFT].tool_node.name.to_lower()
Global.left_cursor_tool_texture.create_from_image(load(image), 0)
image = "res://assets/graphics/cursor_icons/%s_cursor.png" % _slots[BUTTON_RIGHT].tool_node.name.to_lower()
Global.right_cursor_tool_texture.create_from_image(load(image), 0)
var left_image = load("res://assets/graphics/cursor_icons/%s_cursor.png" % _slots[BUTTON_LEFT].tool_node.name.to_lower())
Global.left_cursor_tool_texture = left_image
var right_image = load("res://assets/graphics/cursor_icons/%s_cursor.png" % _slots[BUTTON_RIGHT].tool_node.name.to_lower())
Global.right_cursor_tool_texture = right_image
func draw_indicator() -> void: