SFML community forums
Help => Window => Topic started by: thoniel on July 14, 2009, 04:54:41 pm
-
hi
im using sfml 1.5 with c# and trying to wrap parts of sfml so have it easy to modifiy things.
right now, im wrapping Input in my own input class. and by that i recognized that KeyEventArgs.Alt etc. do not seem to work.
i have a method that listens to KeyPressed for example. but when i press Alt and A,first Alt and then A events are fired (in the keycodes, the booleans are never true).
is that right?
cheers
-
You're talking about KeyEventArgs and Input, but they are unrelated. Can you show some code?
-
yeah sorry, they are unrelated in sfml but in my Input class i put your input functions and in addition the events from Window
window.KeyPressed += new EventHandler<SFML.Window.KeyEventArgs>(OnKeyPressedSFML);
private void OnKeyPressedSFML(object sender, SFML.Window.KeyEventArgs args)
{
String ret = "SFML:";
if (args.Alt)
ret += " Alt";
if (args.Control)
ret += " Ctrl";
if (args.Shift)
ret += " Shift";
ret += " " + args.Code;
write(ret);
}
-
so, is that a bug or am i getting the meaning of the booleans wrong?
-
It's a bug, I'll try to fix it as soon as possible.
Until I solve it, a simple workaround is to use the Input class to know if Control/Alt/Shift are pressed.
-
yeah thanks. the biggest reason to use this library is your support ;)
-
It's fixed.