[Sugar-devel] [Karma] how to attach an event listener to an image drawn on the canvas?
Felipe López Toledo
zer.subzero at gmail.com
Mon Aug 24 15:52:23 EDT 2009
context.drawImage() just draws the image (native js canvas)something.draw()
draws an image, a shape or a button (karma js)
b = k.button(x,y, width, height);
b.onClick = function() {
alert("clicked");
}
:)
2009/8/24 Bryan Berry <bryan at olenepal.org>
> Hey subzero,
>
> I am trying to add a reset button to adding_up_to_10. So far i have used
> context.drawImage()
>
> I can't figure out how to add an event listener for the 'click' event to
> the Reset button. I saw that you added events to the buttons in
> quadrilaterals lesson. I have looked at your code but I can't make head
> or tails of it. Can you advise?
>
> tks
>
> --
> Bryan W. Berry
> Technology Director
> OLE Nepal, http://www.olenepal.org
>
>
--
Felipe López Toledo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sugarlabs.org/archive/sugar-devel/attachments/20090824/85febd5b/attachment.htm
More information about the Sugar-devel
mailing list