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.


Messages - 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, 09:36:05 pm »
Hi Laurant,

Quote from: Laurent
Quote
SFML is made for real-time applications that are refreshed contiuously, I can't find how this kind of event would be used in this context. But I'm sure you have a good example to tell me :)


I agree that it does not make sense for applications that refresh continuously. I concede that I kind of "abused" that event in SDL anyway: I mainly used it to handle initialization on window realization (which would trigger an expose event in SDL). I can live without it:-) (and I guess now I have a motivation clean up the code there).

Quote

Resetting the mouse position every frame is a good solution, it's not a hack or workaround.


'Kay, thanks. I'll handle that in my code then.

Quote
I should implement it, but honestly I can't find any reason for the title to change after the window is created so I'm a little lazy to do it :)


Hmm.. I guess one such reason could be that you want an application to display the filename of the data you are currently viewing - you know, like the webbrowser shows the title of the page? That is the best example I can come up with.

Anyway, I can live without the things, so it's no big deal. I was just curious if I was missing something - you know, migrating from SDL and all.

Thanks for the quick reply!

Matthias

3
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

4
Window / That was easy!:-)
« on: February 09, 2010, 10:06:10 pm »
Thanks!

5
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