Forums > Jitter

Hide cursor over jit.window

May 4, 2007 | 7:20 pm

Hello

Trying to hide a cursor using

;
jitter cursor 1

I’m guessing this requires some use of mousestate and the @idlemouse on jit.window where I compare the position of the mouse to the position of the window. Is this the solution or am I overlooking an easier solution? Thanks in advance.

a+
gar


May 5, 2007 | 10:36 am

something like that ?

max v2;
#N vpatcher 317 75 905 619;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 384 221 21 196617 t 1;
#P message 198 54 63 196617 idlemouse 1;
#P newex 148 263 173 196617 if $i1 < = 160 && $i2 <= 120 then 0;
#P message 125 54 70 196617 size 160 120;
#P number 311 244 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 275 244 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 275 223 40 196617 unpack;
#P newex 275 197 142 196617 route mouseidle mouseidleout;
#P window setfont "Sans Serif" 12.;
#P number 425 238 35 12 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 425 265 72 196620 sel 27 99;
#P newex 425 208 40 196620 key;
#P window linecount 2;
#P message 384 334 103 196620 ; jitter cursor $1;
#P toggle 384 307 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 401 307 100 196617 "c" pointer invisible;
#P user jit.pwindow 124 72 162 122 0 1 1 0 1 0;
#P fasten 13 0 0 0 203 71 130 71;
#P connect 11 0 0 0;
#P fasten 9 0 12 0 280 261 153 261;
#P connect 0 1 7 0;
#P connect 7 0 8 0;
#P connect 8 0 9 0;
#P connect 8 1 10 0;
#P connect 10 0 12 1;
#P fasten 7 1 14 0 346 217 389 217;
#P connect 12 0 2 0;
#P connect 14 0 2 0;
#P connect 5 1 2 0;
#P fasten 2 0 3 0 389 330 389 330;
#P connect 4 0 6 0;
#P connect 6 0 5 0;
#P pop;


May 5, 2007 | 2:32 pm

Hi

Yes that does it, thank you. I did come up with this:

max v2;
#N vpatcher 421 188 1325 843;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 311 546 27 196617 !- 1;
#P window linecount 2;
#P message 309 577 83 196617 ; jitter cursor $1;
#P number 312 515 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 310 490 27 196617 &&;
#P number 398 459 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 396 434 27 196617 &&;
#P number 215 460 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 213 435 27 196617 &&;
#P number 374 393 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 373 366 27 196617 >=;
#P number 198 394 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 197 367 27 196617 >=;
#P number 412 393 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 411 366 27 196617 < =;
#P number 235 394 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 234 367 27 196617 < =;
#P toggle 273 59 15 0;
#P number 488 272 42 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 444 272 42 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 400 272 42 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 356 272 42 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 312 248 188 196617 unpack 0 1 2 3 4;
#P message 313 158 43 196617 getrect;
#P window linecount 2;
#P comment 219 274 42 196617 Ver. Position;
#P comment 126 275 45 196617 Hor. Position;
#P number 262 274 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 172 275 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 206 208 66 196617 mousestate;
#P newex 273 83 46 196617 metro 2;
#P newex 313 206 378 196617 jit.window @rect 10 50 330 290 @border 0 @fsmenubar 0 @floating 1 @interp 1;
#P connect 2 1 3 0;
#P connect 3 0 18 0;
#P connect 18 0 19 0;
#P connect 1 0 2 0;
#P connect 19 0 22 0;
#P connect 9 0 18 1;
#P connect 22 0 23 0;
#P connect 15 0 22 1;
#P connect 3 0 14 0;
#P connect 14 0 15 0;
#P connect 11 0 14 1;
#P connect 2 2 4 0;
#P connect 13 0 1 0;
#P connect 29 0 28 0;
#P connect 23 0 26 0;
#P connect 27 0 29 0;
#P connect 0 1 8 0;
#P connect 26 0 27 0;
#P connect 1 0 7 0;
#P connect 7 0 0 0;
#P connect 25 0 26 1;
#P connect 8 1 9 0;
#P connect 4 0 20 0;
#P connect 20 0 21 0;
#P connect 10 0 20 1;
#P connect 21 0 24 0;
#P connect 24 0 25 0;
#P connect 8 2 10 0;
#P connect 4 0 16 0;
#P connect 16 0 17 0;
#P connect 17 0 24 1;
#P connect 12 0 16 1;
#P connect 8 3 11 0;
#P connect 8 4 12 0;
#P pop;

but its pretty nasty, the metro slows my app down and I’m sure there is a much more compact way to test all those conditional scenarios. Thanks for your help.

a+
gar


May 5, 2007 | 7:32 pm

even problem even solution :

max v2;
#N vpatcher 335 44 817 424;
#P window setfont "Sans Serif" 9.;
#P window linecount 2;
#P message 184 247 83 196617 ; jitter cursor $1;
#P toggle 184 224 15 0;
#P window linecount 1;
#P newex 21 153 173 196617 if $i1 < = 320 && $i2 <= 240 then 0;
#P number 184 134 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 148 134 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 148 113 40 196617 unpack;
#P comment 349 115 100 196617 "c" pointer visible;
#P newex 265 145 21 196617 t 1;
#P newex 311 153 21 196617 t 1;
#P newex 311 133 38 196617 sel 99;
#P number 311 116 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 311 96 40 196617 key;
#P newex 148 93 145 196617 route mouseidle mouseidleout;
#P newex 92 52 164 196617 jit.window 320 240 @idlemouse 1;
#P fasten 9 0 11 0 153 151 26 151;
#P fasten 0 1 1 0 251 87 153 87;
#P connect 1 0 8 0;
#P connect 8 0 9 0;
#P connect 8 1 10 0;
#P connect 10 0 11 1;
#P connect 11 0 12 0;
#P connect 6 0 12 0;
#P connect 5 0 12 0;
#P connect 12 0 13 0;
#P connect 1 1 6 0;
#P connect 2 0 3 0;
#P connect 3 0 4 0;
#P connect 4 0 5 0;
#P pop;


Viewing 4 posts - 1 through 4 (of 4 total)