color pallete picker gamemaker

Information about object: obj_pallete
Sprite: spr_pallete
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask:
No Physics Object
Create Event:
execute code:

my_colour=c_black;
Mouse Event for Left Pressed:
execute code:

if position_meeting(x,y,id)
{
my_colour=draw_getpixel(mouse_x,mouse_y);
}

Draw Event:
execute code:

draw_self();
draw_set_colour(my_colour);
draw_circle(x,y,40,false);

No comments:

Top 3 UX Design Articles of 2024 to Remember

Based on most subscriptions ͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­...

Contact Form

Name

Email *

Message *