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_aregion() - check if mouse cursor is in specified regions</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Name:     m_aregion() - check if mouse cursor is in specified regions
  Usage:    <integer> = m_aregion(<rows>,<cols>,<rows2>,<cols2>)
  Params:   array <rows>   - array of top row numbers to check
            array <cols>   - array of left column numbers to check
            array <rows2>  - array of bottom row numbers to check
            array <cols2>  - array of right column numbers to check

  Returns:  integer equal to the element number of the first instance
            where the mouse cursor is contained within the defined
            coordinates. If no match is found, then 0 is returned.

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

                 declare arows[3], acols[3], arows2[3], acols2[3]
                 declare aprompts[3]

                 aprompts[1] = "Edit Records"
                 aprompts[2] = "Add Records"
                 aprompts[3] = "Delete Records"

                 arows[1]  = 10
                 arows[2]  = 11
                 arows[3]  = 12

                 acols[1]  = 35
                 acols[2]  = 35
                 acols[3]  = 35

                 arows2[1] = 10
                 arows2[2] = 11
                 arows2[3] = 12

                 acols2[1] = 55
                 acols2[2] = 55
                 acols2[3] = 55

                 tempvar = m_aregion(arows,acols,arows2,acols2)
                 if tempvar = 0
                      @ 0,0 say "Make a selection"
                 else
                      @ 0,0 say aprompts[tempvar]
                 endif


See Also: m_region() m_row() m_col()

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