Menu

#2704 BASS: Possible glitch when examining inventory items

Beneath a Steel Sky
closed-fixed
5
2007-03-17
2006-06-21
No

Current SVN
All versions

When examining an inventory item, the descriptive text
is supposed to be displayed until the mouse button is
released (but no less than 800 ms).

If you click on the item really quickly, it's quite
possible that the mouse button release event will be
processed before fnLookAt() is called, so it will never
receive the button up event it's waiting for. (Not as
serious as it sounds -- you can always click again, or
press escape.)

Discussion

  • Torbjörn Andersson

    Patch against current SVN

     
  • Torbjörn Andersson

    Logged In: YES
    user_id=577918
    Originator: YES

    (Assigning to Fingolfin, since this may concern the backends.)

    As I already pointed out, the problem is that waiting for a mouse button release event isn't reliable, because it may already have happened by the time this function is called. We either need to make sure the event hasn't been processed already - which may be tricky - or we need a way to query the up/down status of the mouse buttons.

    In this particular case, it would be awfully convenient if there was a function for this in the backend. Failing that, the Sky engine could define its own "poll event" function and have that one keep track of mouse button events. I'm attaching a quick-and-possibly-dirty proof-of-concept patch.
    File Added: sky-mouse.diff

     
  • Torbjörn Andersson

    • assigned_to: nobody --> fingolfin
     
  • Torbjörn Andersson

    Logged In: YES
    user_id=577918
    Originator: YES

    Fixed, using the new event manager's getButtonState().

     
  • Torbjörn Andersson

    • assigned_to: fingolfin --> eriktorbjorn
    • status: open --> closed-fixed