-
... cancel in the right places, and always add up. BTW this example has a lot of UserView tricks. Note, for example, that to do the animation, I had to set a state variable *outside* the scope of the drawFunc, and 'refresh' the UserView to u ...
-
... n = Window( "Switch", Rect( 0, 300, 200, 300 ) ); var switch; var demo_view = UserView(); var demo_string = "Hello World"; var demo_states = [ ["Never", Color.black, Color.white, Color.red ], ["Gonna", Color.black, Color.white, C ...
-
... indow.screenBounds).front.fullScreen; w.view.keyDownAction = { w.close }; u = UserView(w, w.view.bounds); u.background = Color.black; u.animate = true; u.clearOnRefresh = false; u.drawFunc = { |u| var width = u.bounds.width; var h ...
-
... var window = Window( "", Rect(100,100,wi+20,he+20) ).front; var view = UserView( window,Rect(10,10,wi,he) ).canFocus_(false); var c1 = Color.green( 0.2 ).alpha_( 0.1 ),c2 = Color.green, numSteps = 64, c ...
-
... ndBus = Bus. audio(s, 2); var harmo_view; var harmo_text; var amp_slider = UserView( win, Rect( margin, win.bounds.height * 0.78 + ( margin / 2 ), win.bounds.width - (margin*4) / 3, win.bounds.height * 0.1 - margin ) ); var lfo_amou ...
-
... positeView.new(w, Rect(0, 0, width, height)) .background_(col); u=UserView(n, Rect(margin, margin, width-(margin*2), height-(margin*2))); // OK u.background_(col); u.drawFunc={|uview| if(toggle.asBoolean, { ...
-
... ize+20, scrsize),false).front; //win.view.background_(Color.white); scr = UserView.new(win,Rect(scrsize+20, 0, scrsize, scrsize)); scr.background_(Color.white); setColor = {|x, y, val, postVal=false| //x = x/scrsize; //y = y/s ...
-
... [x,(hudRect.top.neg+z),r]]; }).flatten(1); var starY = 0; var board = UserView(win, Rect(0, 0, win.view.bounds.width, hudRect.top)) .animate_(true) .frameRate_(15) .drawFunc_({ starY = (starY+1).wrap(0,hudRect.top); Pe ...
-
... .seconds ; ~allPoints = [] ; ~diffPoints = [] ; w = Window.new.front; q = UserView.new(w,w.view.bounds); q.mouseDownAction_({ | view, x, y, modifiers, buttonNumber, clickCount | ~allPoints = []; }); q.mouseMoveAction_({ | v ...
-
... ize= Size(22, 22); var button; Window().front.view.layout_( StackLayout( UserView().drawFunc_{|usr| Pen.strokeColor= Color.black; Pen.width= 1; Pen.translate(size.width/2, size.height/2); ~drawCogs.value(size.height/2 ...