v8ui strange behaviour

Mattebass's icon

Hi, I'm experiencing a strange behaviour of the v8ui object.

I'm not a super expert, but I'm trying to draw a bunch of points to create an alternative UI object to function

When clicking on the canvas nothing happens, unless when I click outside the object or I click anywhere on the screen, the points are correctly drawn. It seems as a general UI mouse event will be necessarily to invoke the drawing process. Any cues? What I'm missing?

Thanks

Matteo

Max Patch
Copy patch and select New From Clipboard in Max.

ui_prova_01.js
js


TFL's icon

Just calling mgraphics.redraw() at the end of your onclick() event should solve your problem.

Also, in case you're not aware of it, there's MMMSEGUI, a supercharged function-like JSUI alternative.