Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - sparklehorse

Pages: [1]
1
Window / Key event issue on Linux?
« on: February 14, 2010, 06:51:24 pm »
Hi,

I was wondering if there is a known issue with certain key events (or rather key codes) on Linux.

I'm using SFML 1.5 on Ubuntu (9.10),  and while SFML reports all key pressed/releases correctly, the Code member is sometimes unset (i.e. 0) for keys that I would expect to work (for example the tilde key, or the caps lock key).

Interestingly enough, the text event that follows the key event always generates the correct unicode symbol for the pressed key.

Best regards,

  Matthias

2
Window / Expose events, grabbing input and window captions
« on: February 10, 2010, 08:23:59 pm »
Hi (again:-)),

I'm a "converting SDL user", and currently migrating my project to SFML (1.5). Moving my code to SFML has been fairly painless for me because SFML and SDL are very similar in many parts (at least in the way that I use them). Still, there are some features that I used in SDL which I cannot find a counterpart for in SFML... these are not necessarily "must have" features, but I just don't know if I overlooked them, hence the following questions:

In SDL, there is an event specificly for video expose (for example, when a part of the window that was previously obscured becomes visible). I cannot find an expose event in the documentation or source of SFML, so I'm assuming this does not exist. Is there some other way for to determine an expose event through SFML (i.e. a portable approach)?

Grabbing input is another thing that SDL provides that I found no SFML counterpart for. Essentially, SDL handles the "grabbed input" state in such a way that the mouse cursor is restricted to the application window. When it hits the window boundary, the mouse move events that are generated still return the relative mouse motion, but the absolute x/y position of the cursor (and the cursor itself) remains within the window. I can probably "hack" around this by simply resetting the mouse position (in fact, I read somewhere in the forum that this was a suggested workaround), but I was curious if this is really the best approach.

Finally, one other thing that I was curious about is changing the window caption. In SDL, it is possible to change the window caption of a stand alone application at any time (SDL_WM_SetCaption). I didn't see any similar means in the SFML documentation, and I read on the forum that it is required to recreate the window if you want to change the caption. Is this correct?

I would really like to get the window expose events, though I could live with (or hack around) the other 2. Any help is greatly appreciated.

Best regards,

  Matthias

3
Window / TextEvent howto
« on: February 09, 2010, 08:54:02 pm »
Hi all,

I would like to be able to get text input from the window created by SFML... but I don't know how:-) I expect that I have to explicitly set SFML to interpret all key events that follow as text events, as it is done in SDL 2. However, I have found nothing in the class documentation or the wiki/examples which points out how to do this.

So... when and how are text events generated?

Thanks for the help & best regards,

  Matthias

Pages: [1]
anything