Search found 3 matches

by dandersson
Mon Nov 07, 2022 9:13 am
Forum: Mac OSX
Topic: KeyboardPushed not working
Replies: 6
Views: 945

Re: KeyboardPushed not working

mk-soft wrote: Sat Nov 05, 2022 12:50 pm No bug! But it is often forgotten.

When using OpenWindowedSrceen, the Windows events must always be queried as well.
Thank you!

So the "only" thing I was missing was:

Code: Select all

While WindowEvent() : Wend
correct?

Wish the documentation would have mentioned it! :)
by dandersson
Sat Nov 05, 2022 11:24 am
Forum: Mac OSX
Topic: KeyboardPushed not working
Replies: 6
Views: 945

Re: KeyboardPushed not working

I added

Code: Select all

Debug(KeyboardReleased(#PB_Key_All))
and during the whole loop, it always returns 0 no matter which key I press.
by dandersson
Sat Nov 05, 2022 9:52 am
Forum: Mac OSX
Topic: KeyboardPushed not working
Replies: 6
Views: 945

KeyboardPushed not working

Just starting out with PureBasic and my first attempt is a simple space invaders-clone. I'd like to be able to exit with escape, but it doesn't seem to work as advertised.

My code:

InitSprite()
OpenWindow(0, 300, 300, 800, 600, "Spel", #PB_Window_SystemMenu | #PB_Window_ScreenCentered ...