I think i'm finding a bug with this function :
OpenWindowedScreen(WindowID(0), 0, 0, 1, 1, 1, 0, 0) : Auto resizing
Code: Select all
If InitSprite() = 0 Or InitKeyboard() = 0
MessageRequester("Error", "Sprite system can't be initialized", 0)
End
EndIf
If InitMouse() = 0
MessageRequester("Error", "Mouse system can't be initialized correctly", 0)
End
EndIf
If InitSprite3D() = 0
MessageRequester("Error", "Sprite3D system can't be initialized correctly", 0)
End
EndIf
ExamineDesktops()
If OpenWindow(0, 0, 0, DesktopWidth(0), DesktopHeight(0), "test", #PB_Window_Maximize | #PB_Window_SizeGadget | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget )
If OpenWindowedScreen(WindowID(0), 0, 0, 1, 1, 1, 0, 0) ; automatiquement étiré.
Else
MessageRequester("Erreur", "Impossible d'initialiser la graphique 2d", 0)
End
EndIf
EndIf
Repeat
Repeat
Event = WindowEvent()
If Event = #PB_Event_CloseWindow
End
EndIf
Until Event = 0
ClearScreen(RGB(0, 0, 0))
If StartDrawing(ScreenOutput())
DrawText(20, 20,"TEST 2D")
DrawText(500, 500,"TEST 2D",RGB(255,0,0))
StopDrawing()
EndIf
FlipBuffers()
ForEver
If i want see my text :
Code: Select all
If InitSprite() = 0 Or InitKeyboard() = 0
MessageRequester("Error", "Sprite system can't be initialized", 0)
End
EndIf
If InitMouse() = 0
MessageRequester("Error", "Mouse system can't be initialized correctly", 0)
End
EndIf
If InitSprite3D() = 0
MessageRequester("Error", "Sprite3D system can't be initialized correctly", 0)
End
EndIf
ExamineDesktops()
If OpenWindow(0, 0, 0, DesktopWidth(0), DesktopHeight(0), "test", #PB_Window_Maximize | #PB_Window_SizeGadget | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget )
If OpenWindowedScreen(WindowID(0), 0, 0, DesktopWidth(0), DesktopHeight(0), 1, 0, 0) ; automatiquement étiré.
Else
MessageRequester("Erreur", "Impossible d'initialiser la graphique 2d", 0)
End
EndIf
EndIf
Repeat
Repeat
Event = WindowEvent()
If Event = #PB_Event_CloseWindow
End
EndIf
Until Event = 0
ClearScreen(RGB(0, 0, 0))
If StartDrawing(ScreenOutput())
DrawText(20, 20,"TEST 2D")
DrawText(500, 500,"TEST 2D",RGB(255,0,0))
StopDrawing()
EndIf
FlipBuffers()
ForEver