Found an issue in SpiderBasic ? Please report it here !
ricardo_sdl
 
Posts: 12
Joined: Fri Jan 10, 2020 12:30 pm

#PB_Key_All is not working for KeyboardPushed and KeyboardRe

by ricardo_sdl Mon Feb 17, 2020 7:06 pm

Take the code below:
Code: Select all
;
; ------------------------------------------------------------
;
;   SpiderBasic - Keyboard example file
;
;    (c) Fantaisie Software
;
; ------------------------------------------------------------
;

Debug "Use the arrow keys to move the sprite"

OpenScreen(800, 600, 32, "Test")

Procedure RenderFrame()
  Static x, y
 
  ClearScreen(RGB(0, 0, 0))
 
  ExamineKeyboard()
  If KeyboardReleased(#PB_Key_All)
    Debug "released any key"
  EndIf
 
  If KeyboardReleased(#PB_Key_R)
    Debug "released R key"
  EndIf
 
 
  If KeyboardPushed(#PB_Key_All)
    Debug "pushed any key"
  EndIf
 
  If KeyboardPushed(#PB_Key_Q)
    Debug "pushed Q key"
  EndIf
 
  FlipBuffers(); // continue the rendering
EndProcedure

Procedure Loading(Type, Filename$, ObjectId)
  Static NbLoadedElements
 
  NbLoadedElements+1
  If NbLoadedElements = 1 ; The loading of all images and sounds is finished, we can start the rendering
    FlipBuffers()         ; // start the rendering
  EndIf
EndProcedure

Procedure LoadingError(Type, Filename$, ObjectId)
  Debug Filename$ + ": loading error"
EndProcedure

; Register the loading event before calling any resource load command
BindEvent(#PB_Event_Loading, @Loading())
BindEvent(#PB_Event_LoadingError, @LoadingError())
BindEvent(#PB_Event_RenderFrame, @RenderFrame())
FlipBuffers()
;LoadSprite(0, "Data/Spider.png")


I can't get the KeyboardReleased or KeyboardPushed report for pressing any key in the keyboard. The events for the R (KeyboardReleased) and Q (KeyboardPushed) work fine.
Andy
 
Posts: 17
Joined: Sat Feb 15, 2020 5:19 pm

Re: #PB_Key_All is not working for KeyboardPushed and Keyboa

by Andy Mon Mar 16, 2020 2:14 pm

Same problem here
Return to Bugs Reports

Who is online

Users browsing this forum: No registered users and 0 guests