WE_KEYRELEASED event required?

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
User avatar
dominik81
OpenTTD Developer
OpenTTD Developer
Posts: 768
Joined: 16 Aug 2003 12:55
Location: Bonn, Germany

WE_KEYRELEASED event required?

Post by dominik81 »

I'm struggling with getting the fast forward button to behave correctly. And I think we might need another window event for releasing a pressed key. Here's the problem:

The fast forward button is activated when you click on it. But when you press and hold the tab key, it remains as it is. The state of the button can only be changed upon an event. But only changing it when tab is being pressed isn't sufficent. Because it has to switch back to "unpressed" once a user releases the tab key.

Does anyone have a clever idea how to do this or do we really have to add another event?
"There's a readme that comes with the source. I suggest you read it."
- Korenn
User avatar
dominik81
OpenTTD Developer
OpenTTD Developer
Posts: 768
Joined: 16 Aug 2003 12:55
Location: Bonn, Germany

Post by dominik81 »

I was able to solve this by checking during each mouse loop, thanks to ludde's advice.
"There's a readme that comes with the source. I suggest you read it."
- Korenn
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 37 guests