Full screen

Everything else that doesn't fall into one of the other PB categories.
cederavic
User
User
Posts: 24
Joined: Sun Apr 27, 2003 10:09 pm
Contact:

Full screen

Post by cederavic »

How to make to avoid the bug when one wants to turn over in his game full screen? You know the bug where all the sprites are deformed in all the directions!

Thanks a lot!
cederavic
User
User
Posts: 24
Joined: Sun Apr 27, 2003 10:09 pm
Contact:

Post by cederavic »

it's ok but Fred, where is the command ReleaseKeyboard() because I am to oblige to use windows api : SetFocus_(ScreenID()) for enable and SetFocus_(ScreenID()) for disable!
Look this code

Code: Select all

InitSprite()
InitMouse()
InitKeyboard()
OpenScreen(320, 200, 16, "")
CreateSprite(0, 20, 20)
StartDrawing(SpriteOutput(0))
Box(0, 0, 20, 20,  #Black)
Circle(10, 10, 10, #White)
Circle(10, 10, 5, #Blue)
Circle(10, 10, 3, #Green)
StopDrawing()
TransparentSpriteColor(0, 0, 0, 0)
Repeat
  FlipBuffers()
  Select IsScreenActive()
    Case 0
      ReleaseMouse(1)
      If t = 0
        SetFocus_(#NULL)
        t = 1
      EndIf
      h = 0
    Default
      ReleaseMouse(0)
      If h = 0
        SetFocus_(ScreenID())
        h = 1
      EndIf
      t = 0
      ExamineMouse()
      ExamineKeyboard()
      If MouseButton(1) Or KeyboardPushed(#PB_Key_Space) : quit = 1 : EndIf
      ClearScreen(255, 0, 0)
      DisplayTransparentSprite(0, MouseX(), MouseY())
  EndSelect
Until quit

Post Reply