Removed the cursor icons.

This commit is contained in:
Relintai 2020-11-29 22:21:29 +01:00
parent c88a0bb306
commit a3e4f1c035
5 changed files with 1 additions and 71 deletions

View File

@ -32,8 +32,6 @@ var layers_changed_skip := false
var can_draw := false
var has_focus := false
var cursor_image = preload("res://addons/draw_gd/assets/graphics/cursor_icons/cursor.png")
var left_cursor_tool_texture := ImageTexture.new()
var right_cursor_tool_texture := ImageTexture.new()
var image_clipboard : Image
var play_only_tags := true
@ -82,8 +80,6 @@ var palettes := {}
# Nodes
var control : Node
var top_menu_container : Panel
var left_cursor : Sprite
var right_cursor : Sprite
var canvas : Canvas
var tabs : Tabs
var main_viewport : ViewportContainer
@ -185,8 +181,6 @@ func refresh_nodes():
# control = find_node_by_name(root, "DrawGDControl")
control = get_node("DrawGDControl")
top_menu_container = find_node_by_name(control, "TopMenuContainer")
left_cursor = find_node_by_name(control, "LeftCursor")
right_cursor = find_node_by_name(control, "RightCursor")
canvas = find_node_by_name(control, "Canvas")
tabs = find_node_by_name(control, "Tabs")

View File

@ -89,7 +89,6 @@ func _enter_tree():
assign_color(value, BUTTON_RIGHT)
update_tool_buttons()
update_tool_cursors()
func set_tool(name : String, button : int) -> void:
@ -115,7 +114,6 @@ func assign_tool(name : String, button : int) -> void:
set_tool(name, button)
update_tool_buttons()
update_tool_cursors()
DrawGD.config_cache.set_value(slot.kname, "tool", name)
@ -157,13 +155,6 @@ func update_tool_buttons() -> void:
DrawGD.change_button_texturerect(texture, filename)
func update_tool_cursors() -> void:
var image = "res://addons/draw_gd/assets/graphics/cursor_icons/%s_cursor.png" % _slots[BUTTON_LEFT].tool_node.name.to_lower()
DrawGD.left_cursor_tool_texture.create_from_image(load(image), 0)
image = "res://addons/draw_gd/assets/graphics/cursor_icons/%s_cursor.png" % _slots[BUTTON_RIGHT].tool_node.name.to_lower()
DrawGD.right_cursor_tool_texture.create_from_image(load(image), 0)
func draw_indicator() -> void:
if DrawGD.left_square_indicator_visible:
_slots[BUTTON_LEFT].tool_node.draw_indicator()

View File

@ -141,8 +141,6 @@ func change_project() -> void:
var layer_button = DrawGD.layers_container.get_child(DrawGD.layers_container.get_child_count() - 1 - current_layer)
layer_button.pressed = true
DrawGD.current_frame_mark_label.text = "%s/%s" % [str(current_frame + 1), frames.size()]
toggle_layer_buttons_layers()
toggle_layer_buttons_current_layer()

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=19 format=2]
[gd_scene load_steps=15 format=2]
[ext_resource path="res://addons/draw_gd/src/Main.gd" type="Script" id=1]
[ext_resource path="res://addons/draw_gd/src/UI/Dialogs/ImageEffects/ImageEffects.tscn" type="PackedScene" id=2]
@ -15,36 +15,6 @@
[ext_resource path="res://addons/draw_gd/src/Autoload/DrawGD.gd" type="Script" id=13]
[ext_resource path="res://addons/draw_gd/src/XDGDataPaths.gd" type="Script" id=14]
[sub_resource type="Image" id=5]
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, 255, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 132, 255, 132, 255, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 132, 255, 132, 255, 132, 255, 132, 255, 0, 255, 0, 0, 0, 0, 0, 0, 0, 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, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 0, 255, 0, 0, 0, 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, 175, 255, 175, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 0, 255, 0, 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, 175, 255, 0, 255, 175, 255, 175, 255, 132, 255, 132, 255, 132, 255, 0, 255, 0, 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, 175, 255, 175, 255, 132, 255, 0, 255, 175, 255, 175, 255, 132, 255, 0, 255, 0, 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, 175, 255, 175, 255, 132, 255, 132, 255, 132, 255, 0, 255, 175, 255, 0, 255, 0, 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, 175, 255, 175, 255, 132, 255, 132, 255, 132, 255, 175, 255, 175, 255, 0, 255, 0, 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, 175, 255, 175, 255, 132, 255, 132, 255, 132, 255, 175, 255, 175, 255, 0, 255, 0, 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, 175, 255, 175, 255, 132, 255, 132, 255, 132, 255, 175, 255, 175, 255, 0, 255, 0, 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, 175, 255, 175, 255, 132, 255, 132, 255, 132, 255, 175, 255, 175, 255, 0, 255, 0, 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, 175, 255, 175, 255, 132, 255, 132, 255, 132, 255, 175, 255, 175, 255, 0, 255, 0, 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, 175, 255, 175, 255, 132, 255, 132, 255, 132, 255, 175, 255, 175, 255, 0, 255, 0, 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, 175, 255, 0, 255, 132, 255, 132, 255, 132, 255, 175, 255, 175, 255, 0, 255, 0, 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, 175, 255, 175, 255, 175, 255, 0, 255, 132, 255, 175, 255, 175, 255, 0, 255, 0, 0, 0, 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, 175, 255, 175, 255, 175, 255, 175, 255, 0, 255, 175, 255, 0, 255, 0, 0, 0, 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, 175, 255, 175, 255, 175, 255, 175, 255, 175, 255, 175, 255, 0, 255, 0, 0, 0, 0, 0, 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, 48, 255, 175, 255, 175, 255, 175, 255, 175, 255, 0, 255, 0, 0, 0, 0, 0, 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, 48, 255, 48, 255, 48, 255, 175, 255, 0, 255, 0, 255, 0, 0, 0, 0, 0, 0, 0, 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, 48, 255, 48, 255, 0, 255, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 255, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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": "LumAlpha8",
"height": 22,
"mipmaps": false,
"width": 22
}
[sub_resource type="ImageTexture" id=2]
flags = 0
flags = 0
image = SubResource( 5 )
size = Vector2( 22, 22 )
[sub_resource type="Image" id=6]
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, 255, 0, 255, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 175, 255, 132, 255, 132, 255, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 175, 255, 132, 255, 132, 255, 132, 255, 132, 255, 0, 255, 0, 0, 0, 0, 0, 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, 175, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 0, 255, 0, 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, 175, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 175, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 175, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 175, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 175, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 175, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 175, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 175, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 175, 255, 0, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 175, 255, 175, 255, 175, 255, 0, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 175, 255, 175, 255, 175, 255, 175, 255, 175, 255, 0, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 175, 255, 175, 255, 175, 255, 175, 255, 175, 255, 175, 255, 0, 255, 132, 255, 132, 255, 132, 255, 132, 255, 132, 255, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 175, 255, 175, 255, 175, 255, 175, 255, 175, 255, 175, 255, 175, 255, 0, 255, 132, 255, 132, 255, 132, 255, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 175, 255, 175, 255, 175, 255, 175, 255, 175, 255, 175, 255, 175, 255, 175, 255, 0, 255, 132, 255, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 175, 255, 175, 255, 175, 255, 175, 255, 175, 255, 175, 255, 175, 255, 175, 255, 0, 255, 0, 0, 0, 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, 175, 255, 175, 255, 175, 255, 175, 255, 175, 255, 175, 255, 0, 255, 0, 0, 0, 0, 0, 0, 0, 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, 175, 255, 175, 255, 175, 255, 175, 255, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 255, 0, 255, 0, 255, 0, 0, 0, 0, 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": "LumAlpha8",
"height": 22,
"mipmaps": false,
"width": 22
}
[sub_resource type="ImageTexture" id=4]
flags = 0
flags = 0
image = SubResource( 6 )
size = Vector2( 22, 22 )
[node name="DrawGDSingleton" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
@ -151,16 +121,6 @@ rect_min_size = Vector2( 250, 87.5 )
popup_exclusive = true
dialog_text = "Autosaved backup was found. Do you want to reload it?"
[node name="LeftCursor" type="Sprite" parent="DrawGDControl"]
visible = false
position = Vector2( 795, 667 )
texture = SubResource( 2 )
[node name="RightCursor" type="Sprite" parent="DrawGDControl"]
visible = false
position = Vector2( 859, 667 )
texture = SubResource( 4 )
[node name="ModulateTween" type="Tween" parent="DrawGDControl"]
[node name="XDGDataPaths" type="Node" parent="."]

View File

@ -67,19 +67,6 @@ func _input(event : InputEvent) -> void:
var current_project : Project = DrawGD.current_project
if DrawGD.has_focus:
if !cursor_image_has_changed:
cursor_image_has_changed = true
if DrawGD.show_left_tool_icon:
DrawGD.left_cursor.visible = true
if DrawGD.show_right_tool_icon:
DrawGD.right_cursor.visible = true
else:
if cursor_image_has_changed:
cursor_image_has_changed = false
DrawGD.left_cursor.visible = false
DrawGD.right_cursor.visible = false
DrawGD.tools.handle_draw(current_pixel.floor(), event)
if sprite_changed_this_frame: