mouse.Show

( Brutus2D 1.7 )

mouse.Show - Make the mouse cursor visible

Description

mouse.Show

  • no parameters or return value

mouse.Show makes the mouse cursor visible after it has been hidden using mouse.Hide.

Examples

In the code below the left mouse button hides the cursor, right mouse button shows it again.

graphics.Initialize
key.Initialize
mouse.Initialize

Do While Not ( key.Pressed( vk_escape ) Or key.Pressed( vk_windowx ) )
    If mouse.LeftButton() Then mouse.Show
    If mouse.RightButton() Then mouse.Hide
    system.ProcessMessages
    graphics.Display
Loop

mouse.Show
mouse.Terminate
key.Terminate
graphics.Terminate

Known Issues

  • In versions prior to Brutus2D 1.7.1, Mouse.Hide and mouse.Show seem to keep count of how many times they are called, also between runs from the IDE. Therefore mouse.Show should be called just as many times as mouse.Hide before exiting your application. This often becomes a problem if your program halts because of an error and does not call mouse.Show again before exiting. Restarting the IDE resets this counter.

Related Pages

page tags: input mouse object
page_revision: 2, last_edited: 1214419272|%e %b %Y, %H:%M %Z (%O ago)