1. NodeBox 1
    1. Homepage
    2. NodeBox 3Node-based app for generative design and data visualization
    3. NodeBox OpenGLHardware-accelerated cross-platform graphics library
    4. NodeBox 1Generate 2D visuals using Python code (Mac OS X only)
  2. Gallery
  3. Documentation
  4. Forum
  5. Blog

interactive full screen quirks

Posted by anonymous on May 29, 2007

okay, when i enter full screen with an interactive script, the y mouse position,

MOUSEY
inverts (meaning 0 is at the bottom). I would show u my code that is causing the problem, but i want to keep it copyrighted, so here is some sample code.
size(640, 480)
speed(30)
def draw():
    background(0.2)
    fill(1)
    fontsize(72)
    text(str(MOUSEX)+', '+str(MOUSEY), 10, 400)
i have the most recent stable version of NodeBox on 10.4.8


 
Posted by Frederik on May 29, 2007

As described in the reference manual, the zero-point is at the upper-right corner.

http://nodebox.net/code/index.php/Environment

If you want to invert the Y position, just subtract the height:

inverted_mouse_y = HEIGHT-MOUSEY
Kind regards,

Frederik



Posted by anonymous on May 29, 2007

i know that 0, 0 is the upper *left* corner, i'm experienced w/ nodebox. i guess i'll have to wait until the developers squash this bug. in the meantime, is there some fullscreen state variable? can i do something like this?

if fullscreen: inverted_mouse_y = HEIGHT-MOUSEY
thanks.