I don't know why my screen is all black, when I use the fullscreen mode (#fullscreen = 1)
Does someone know why and how I can have a good result ?
Thanks
Code: Select all
#MainWindow =0
#fullscreen = 1
InitSprite()
InitKeyboard()
If OpenWindow(#MainWindow,0,0,800,600,"3Arks",#PB_Window_ScreenCentered|#PB_Window_SystemMenu|#PB_Window_MinimizeGadget)
If OpenWindowedScreen(WindowID(#MainWindow),0,0,800,800,0,0,0,#PB_Screen_SmartSynchronization)
EndIf
EndIf
Repeat
delay +1
Delay(10)
ClearScreen(RGB(125,125,125))
StartDrawing(ScreenOutput())
DrawText(100,100,"1er écran : "+Str(delay))
StopDrawing()
FlipBuffers()
ExamineKeyboard()
Until KeyboardPushed(#PB_Key_Escape) Or e =#PB_Event_CloseWindow Or delay >=150
CloseWindow(#MainWindow)
Delay(1000)
If #fullscreen = 0
flag = #PB_Window_SystemMenu|#PB_Window_ScreenCentered|#PB_Window_MinimizeGadget|#PB_Window_MaximizeGadget
If OpenWindow(#MainWindow,150,150,800,600,"3arks",flag);
If OpenWindowedScreen(WindowID(#MainWindow),0,0,800,600,0,0,0,#PB_Screen_SmartSynchronization)
EndIf
EndIf
Else
If OpenScreen(800,600,32,"3arks",#PB_Screen_SmartSynchronization)
EndIf
EndIf
Repeat
If #fullscreen = 0
e=WaitWindowEvent()
EndIf
Delay(2)
ClearScreen(RGB(125,125,125))
StartDrawing(ScreenOutput())
DrawText(100,100,"Ecran jeu")
StopDrawing()
FlipBuffers()
ExamineKeyboard()
delay+1
Until KeyboardPushed(#PB_Key_Escape) Or e =#PB_Event_CloseWindow Or delay >= 1200
End