With this function you can change the sprite and position of a clickable icon previously created with clickable_add. Please note that the position is based on the window, not the canvas, (0,0) position and that the sprite must be referenced directly from the texture page (see: sprite_get_tpe).


clickable_change(index, tpe, x, y)

Argument Description
index The index of the clickable icon to change.
tpe The texture page entry for the sprite to be used (use sprite_get_tpe).
x The new x position within the window.
y The new y position within the window.




switch (room)
    case rm_Menu: clickable_change(global.Help_Icon, sprite_get_tpe(spr_MS_Help, 1), 32, 32); break;
    case rm_Game: clickable_change(global.Help_Icon, sprite_get_tpe(spr_MS_Help, 0), 200, 32); break;

The above code will change the image index and position of the clickable icon indexed in the variable "global.Help" depending on the current room.