Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FUNCky - <b>name:</b> <b>m_trapget() - get key value assigned by mousetrap()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Name:     m_trapget() - get key value assigned by mousetrap()
  Usage:    <integer> = m_trapget(<event>)
  Params:   integer <event> - where:

                 0 = left button press
                 1 = right button press
                 2 = middle button press
                 3 = cursor up
                 4 = cursor down
                 5 = cursor left
                 6 = cursor right

  Returns:  an integer equal to the key value you assigned to the event via
            the mousetrap() function. If no mouse is present in the
            system, a 0 is returned. If you set mouse to .F. with the
            mouse() function, m_trapget() still returns any keys you
            assigned. Any event value out of ranges causes a 0 to be
            returned.

 ---------------------------------- Example ---------------------------------

                 mousetrap(0,28)
                 ? m_trapget(0)
                 * prints "28"

                 mousetrap(3,5,25,0,0)
                 ? m_trapget(3)
                 ?? m_trapget(5)
                 * prints 5, 0

  Note:     Useful for saving individual event settings so that you can
            change the key value before the wait state, and then
            restore it afterwards.


See Also: m_trapsave() m_traprest() mousetrap() m_trapnew()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson