Would someone help me rewrite it to gdscript? There's still some bugs popping up and I can't quite do it.
I use these variables at the start
var oldcolor = Color(1,1,1,1)
var newcolor = Color( 0.6, 0.7, 0.8, 0.8 )
var ccolor = Color(0, 0, 0, 1)
var edgecolour = Color(0,0,0,1)
var seed =get_global_mouse_position()
var myimage = preload("res://Untitled2.jpg").get_data()
var obrazek = ImageTexture.new()
func _ready():
myimage = preload("res://Untitled2.jpg").get_data()
obrazek.create_from_image(myimage)
myimage.lock()
$Sprite.set_texture(obrazek)
func _input(event):
if Input.is_action_just_pressed("lpm"):
seed=get_global_mouse_position()
x = seed.x
y = seed.y
obrazek.create_from_image(myimage)
