It is currently Thu Aug 06, 2020 1:59 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Shouldn't OpenWindowedScreen() open inside a given window?
PostPosted: Thu Mar 04, 2004 9:04 pm 
Offline
User
User
User avatar

Joined: Fri Feb 27, 2004 9:19 pm
Posts: 77
Location: SP - Brazil
Yeepy...

Shouldn't OpenWindowedScreen() open inside a given window?
The piece of code that follows shows strange behavior when compiled under Linux OS. The Screen appears windowed, but outside the main window (stated at the OpenWindowedScreen() function). As usual, I tested the code under WinXP and it behaves OK (Screen opens inside the given window).

Code:
If InitSprite() = 0
  MessageRequester("Error", "Can't initialize Sprites...", 0)
  End
EndIf

OpenWindow(0, 10, 10, 640, 480, #PB_Window_SystemMenu, "Test")
OpenWindowedScreen(WindowID(0), 0, 0, 320, 240, 0,0,0)

LoadSprite(0, "Whatever.bmp", 0)

Repeat

  E = WindowEvent()

  If E = #PB_Event_CloseWindow: Break: EndIf

  FlipBuffers()                        ; Flip for DoubleBuffering
  ClearScreen(0,0,0)                   ; CleanScreen, black

  x = WindowMouseX()                   ; Returns actual x pos of our mouse
  y = WindowMouseY()                   ; Returns actual y pos of our mouse

  DisplaySprite(0, x-SpriteWidth(0)/2, y-SpriteHeight(0)/2)

ForEver

CloseScreen()

End

_________________
Derlidio Siqueira


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Mar 05, 2004 4:04 pm 
Offline
Enthusiast
Enthusiast

Joined: Mon Dec 08, 2003 7:50 pm
Posts: 154
Location: Germany
Same problem in my case ...

regards,
christian


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Mar 06, 2004 6:32 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 14065
Location: France
Yes, this is an SDL limitation and I don't know yet how workaround it. It should of course be precised in the docs (I will add it).


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye