It is currently Thu Oct 22, 2020 7:13 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: PB 5.11 - WindowedScreen larger then Window
PostPosted: Wed Mar 27, 2013 4:39 am 
Offline
Addict
Addict
User avatar

Joined: Sun Apr 27, 2003 8:12 am
Posts: 2075
Location: USA
If the windowed screen is larger then the window, sprite coords are off. This was fine in PB 4.61 but not anything after that.

Code:
#WinWidth = 640
#WinHeight = 480

InitSprite()
InitKeyboard()
InitMouse()

UsePNGImageDecoder()

OpenWindow(0, 0, 0,#WinWidth, #WinHeight, "Screen Size", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0), 0, 0, #WinWidth * 2, #WinHeight * 2, 0, 0, 0)
     
  LoadSprite(1, #PB_Compiler_Home + "Examples/Sources/Data/PureBasic.bmp", 0)
  LoadSprite(2, #PB_Compiler_Home + "Examples/Sources/Data/world.png", #PB_Sprite_Texture | #PB_Sprite_AlphaBlending)
       
    Quit = #False
   
Repeat
 
      Event = WaitWindowEvent()
      If Event = #PB_Event_CloseWindow
        Quit = #True
      EndIf
 
    FlipBuffers()
     
    ClearScreen(0)
   
    ;ExamineMouse() 
 
    ExamineKeyboard()
   
    DisplaySprite(1, 10, 10)
   
    DisplayTransparentSprite(2, 200, 10)
       
Until Quit Or KeyboardPushed(#PB_Key_Escape)

End

_________________
www.posemotion.com

PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef

Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT


Even the vine knows it surroundings but the man with eyes does not.


Top
 Profile  
Reply with quote  
 Post subject: Re: PB 5.11 - WindowedScreen larger then Window
PostPosted: Sun Feb 09, 2020 1:47 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 14116
Location: France
Seems to work as expected here, can anybody else confirm ?


Top
 Profile  
Reply with quote  
 Post subject: Re: PB 5.11 - WindowedScreen larger then Window
PostPosted: Fri Feb 14, 2020 3:43 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Jan 12, 2011 3:48 pm
Posts: 217
Location: Serbia
Doesn't work as expected for me, i altered original code a little to be 100% sure:
Code:
OpenWindowedScreen(WindowID(0), 0, 0, 400, 300, 0, 0, 0)
...
LoadSprite(1, #PB_Compiler_Home + "Examples/Sources/Data/PureBasic.bmp", 0)
...
DisplaySprite(1, 0, 0)

This shows the sprite at completely wrong coordinates. It works fine with OpenScreen() though.

_________________
PB examples collection
pb-osx-globalhotkeys
pb-osx-notifications


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 1 guest


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