Results 1 to 10 of 20

Thread: LUA Windows Function. ShowCursor

Threaded View

  1. #20
    Join Date
    Jun 2005


    This thread is very old, but I prefer use it than start a new one about the same.

    I'm using girder 5.0.10 and I have the same problem. I've been doing some testings and I got the following:

    cursor = win.ShowCursor (val)
    val=1 increment cursor value (this is a counter)
    val=0 decrement cursor value

    If cursor is lower than 0 (a negative number) the mouse pointer is hidden, in other case is shown.

    But this only works into Grider window, when I test the script into Girder all work fine while the script is running, but when the script ends the pointer is shown again.

    My script:
    --decrement mouse counter
    cursor = win.ShowCursor (0)
    print (cursor)
    -- aux: display current values
    msg = win.MessageBox ("Pointer : ".. tostring(cursor),"TEST",win.MB_OK)
    print (msg)
    -- end: aux
    --restore mouse counter
    --print (win.ShowCursor (1))
    When cursor=-1, the mouse pointer is hidden in all Girder windows, but only while this script is running, but when the message box is closed, the pointer is shown again. I did this test even with cursor=-9 but the pointer doesn't stay hidden when message box is closed.

    Maybe that is ok and this option doesn't allow to hide the pointer out of internal lua dialogs.
    Last edited by realcool; November 17th, 2012 at 05:48 PM.
    Never give-up

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts