OpenScreen() for multiple monitors
Posted: Tue Dec 13, 2016 5:58 am
It would be good for building games such as simulations etc.
http://www.purebasic.com
https://www.purebasic.fr/english/
Code: Select all
EnableExplicit
Define.i CountDesktops, Width, Height, n, x
CountDesktops = ExamineDesktops()
For n=0 To CountDesktops-1
Width + DesktopWidth(n)
Height + DesktopHeight(n)
Next
InitSprite()
InitKeyboard()
InitMouse()
OpenWindow(0, 0, 0, Width, Height, "Windowed FullScreen", #PB_Window_BorderLess)
OpenWindowedScreen(WindowID(0), 0, 0, WindowWidth(0), WindowHeight(0))
LoadSprite(0, #PB_Compiler_Home + "examples/sources/Data/PureBasicLogo.bmp")
Repeat
Repeat : Until WindowEvent() = 0
ClearScreen(RGB(75, 0, 130))
DisplaySprite(0, x, 200)
RotateSprite(0, 2, #PB_Relative)
x+3
If x > Width : x = 0 : EndIf
ExamineKeyboard()
FlipBuffers()
Until KeyboardReleased(#PB_Key_Escape)