Page 1 of 1
Automatic redraw of Windowed Screen
Posted: Fri Jun 18, 2004 9:55 pm
by GPI
Code: Select all
InitSprite()
If OpenWindow(1,0,0,800,600,#PB_Window_ScreenCentered|#PB_Window_SystemMenu,"Test")
If OpenWindowedScreen(WindowID(),0,0,800,600,#False,0,0)
ClearScreen(255,255,255)
FlipBuffers()
MessageRequester("Test","test")
EndIf
EndIf
Move the Message-Requester-Window: You will earse the WindowedScreen with the default window background color.
It would be nice, when PB automatic redraw the windowed-Screen (it exist in one of the two buffers, so it should be no problem).
Maybe optional with (for possible Speed-Problems)
WindowedScreenRedraw(Flag)
Re: Automatic redraw of Windowed Screen
Posted: Sat Jun 19, 2004 11:10 am
by tinman
You can add a section of code in your event handler like this (it is what I currently do):
Code: Select all
ev.l = WaitWindowEvent()
Select ev
Case #PB_Event_Repaint
FlipBuffers() : FlipBuffers()
EndSelect
Re: Automatic redraw of Windowed Screen
Posted: Sat Jun 19, 2004 12:03 pm
by GPI
tinman wrote:You can add a section of code in your event handler like this (it is what I currently do):
Code: Select all
ev.l = WaitWindowEvent()
Select ev
Case #PB_Event_Repaint
FlipBuffers() : FlipBuffers()
EndSelect
First: A very bad workaround, because the wrong Buffer can flash for milliseconds on screen. and second: Don't work, because the main-program is "catched" by the messageRequester().