Code: Select all
InitSprite()
InitKeyboard()
InitMouse()
ExamineDesktops()
DWidth = DesktopWidth(0)
DHeight = DesktopHeight(0)
GSize = DHeight
GPos = ( DWidth - DHeight ) / 2
OpenWindow( 0, 0,0, DWidth, DHeight, "test", #PB_Window_BorderLess | #PB_Window_ScreenCentered )
;CreateGadgetList( WindowID(0) )
ContainerGadget( 0, GPos, 0, GSize, GSize )
OpenWindowedScreen(GadgetID(0),0,0,1024,1024,1,0,0)
MouseLocate(640,512)
Repeat
EvID = WaitWindowEvent(10)
ExamineKeyboard()
ExamineMouse()
If EvID = #PB_Event_CloseWindow Or KeyboardPushed(#PB_Key_Escape)
EXIT = 1
EndIf
ClearScreen($100804)
StartDrawing(ScreenOutput())
DrawingMode( #PB_2DDrawing_Transparent )
Circle(MouseX(), MouseY(), 16, $C040FF)
StopDrawing()
FlipBuffers()
Until EXIT
Code: Select all
InitSprite()
InitKeyboard()
InitMouse()
ExamineDesktops()
DWidth = DesktopWidth(0)
DHeight = DesktopHeight(0)
OpenWindow( 0, 0,0, DWidth, DHeight, "test", #PB_Window_BorderLess | #PB_Window_ScreenCentered )
OpenWindowedScreen(WindowID(0),0,0,1024,1024,1,0,0)
MouseLocate(640,512)
Repeat
EvID = WaitWindowEvent(10)
ExamineKeyboard()
ExamineMouse()
If EvID = #PB_Event_CloseWindow Or KeyboardPushed(#PB_Key_Escape)
EXIT = 1
EndIf
ClearScreen($100804)
StartDrawing(ScreenOutput())
DrawingMode( #PB_2DDrawing_Transparent )
Circle(MouseX(), MouseY(), 16, $C040FF)
StopDrawing()
FlipBuffers()
Until EXIT
... else I have to go the Event-Way, I think...
or leave the container...