Opened 13 years ago

Closed 12 years ago

#2704 closed defect (fixed)

BASS: Possible glitch when examining inventory items

Reported by: eriktorbjorn Owned by: eriktorbjorn
Priority: normal Component: Engine: Sky
Keywords: Cc:
Game: Beneath a Steel Sky

Description

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.)

Ticket imported from: #1510038. Ticket imported from: bugs/2704.

Attachments (1)

sky-mouse.diff (10.6 KB) - added by eriktorbjorn 13 years ago.
Patch against current SVN

Download all attachments as: .zip

Change History (5)

Changed 13 years ago by eriktorbjorn

Attachment: sky-mouse.diff added

Patch against current SVN

comment:1 Changed 13 years ago by eriktorbjorn

(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

comment:2 Changed 13 years ago by eriktorbjorn

Owner: set to fingolfin

comment:3 Changed 12 years ago by eriktorbjorn

Owner: changed from fingolfin to eriktorbjorn
Resolution: fixed
Status: newclosed

comment:4 Changed 12 years ago by eriktorbjorn

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

Note: See TracTickets for help on using tickets.