Hi Guys, First off, I love this library! Really it's great stuff. I do have a couple questions though. Using AgateLib.InputLib's keyboard event the left and right shift and controls are not being differentiated.
The debugger reads the e.KeyCode as just "Shift" and not "ShiftRight" (or ShiftLeft for that matter). This is a feature I need. Is there anything I can do to fix this? Also, I'm not sure if this is me not being able to find it, or if it's simply not implemented, is there a way to flip a surface? I could always just create a flipped version of every image need, but if there was a built in way to do it that would be great! Thanks, |
|||
|
|

Jon, You can flip a sprite
Jon,
You can flip a sprite horizontally or vertically by using a negative value with ScaleWidth or ScaleHeight, respectively.
Tom
Thanks Tom, The surfaces are
Thanks Tom,
The surfaces are drawing flipped!
A little thing I did notice to keep in mind is that if ScaleWidth is -1, the DisplayWidth becomes negative as well. I'm not certain that should be the case. It works, but it feels a bit odd.
Jon
The leftshift/rightshift
The leftshift/rightshift issue is a limitation of Windows Forms. I think there is a way around it but I will have to do a little research.
Hey Kanato, I was thinking
Hey Kanato,
I was thinking that it's pretty important for a gaming library to be able to differentiate left and right keys, so I did a little research on my own.
Anyways, I implemented it in your code. It's a pretty big hack because you're right, .net doesn't support left and right keys, but here is the hacked/rewritten OnKeyDown method. Also, this should only work in a win32 environment. :(
Hopefully you can take it somewhere, but this does "work". I also added AltLeft and AltRight to your enumeration.
-Jon Leah
Yeah, this is pretty
Yeah, this is pretty important. I remember struggling with this a while back, which is why the ShiftLeft and ShiftRight enumerations were already there, but I eventually moved on with the intention of revisiting it later. I will try to look into this over the weekend and see if I can't find a more cross-platform solution.