mirror of
https://github.com/dyne/FreeJ.git
synced 2026-06-16 12:59:33 +02:00
fixed mouse controller
fixed JSCall in controller cleanup of various controllers
This commit is contained in:
@@ -1,13 +1,23 @@
|
||||
m = new MouseController();
|
||||
register_controller(m);
|
||||
|
||||
geo = new GeometryLayer();
|
||||
geo.activate(true);
|
||||
geo.color(255,255,255,255);
|
||||
add_layer(geo);
|
||||
|
||||
|
||||
m = new MouseController();
|
||||
m.activate(true);
|
||||
// MouseController.button(button, state, x, y)
|
||||
m.button = function(b, s, x, y) {
|
||||
echo("b"+b+" s"+s+" x"+x+" y"+y);
|
||||
// echo("b"+b+" s"+s+" x"+x+" y"+y);
|
||||
this.grab(s);
|
||||
}
|
||||
|
||||
// MouseController.motion(buttonmask, x, y, xrel, yrel)
|
||||
m.motion = function(b, x, y, dx, dy) {
|
||||
echo("b"+b+" x"+x+" y"+y+" dx"+dx+" dy"+dy);
|
||||
geo.pixel(x,y);
|
||||
// geo.ellipse_fill(x,y,dx,dy);
|
||||
// echo("b"+b+" x"+x+" y"+y+" dx"+dx+" dy"+dy);
|
||||
}
|
||||
|
||||
register_controller(m);
|
||||
|
||||
Reference in New Issue
Block a user