windowGetWidth & windowGetXRes
Displaying 1-5 of 5 total.
1
RageCage
|
whats the difference?
I'd assume that it would be the difference between literal width and local width for when a window is resized but I dont think that I've seen that behavior.
Posted on 2004-07-19 00:21:13
|
zenogais
|
WindowGetWidth returns the width of the window.
WindowGetXRes returns the horizontal resoluation of the video surface.
So you can have a window that is 320x240 with a resolution of 640x480, and WindowGetWidth would return 320 while WindowGetXRes would return 640.
I haven't actually looked up the functions, but I would assume this is true.
Posted on 2004-07-19 01:08:39
|
Overkill
|
I always ImageWidth(screen) instead of those two. Even though it would seem WindowGetXres(screen) would give you the same thing.
I had a problem playing Snowscape, because you used WindowGetWidth() in your code. This caused the mouse to not let me move the camera in certain directions due to my 800x600 screen res.
You should use ImageWidth(), because it doesn't force you to go outside the window boundaries for certain things to happen. Only the screen boundaries.
Hope that made sense.
Posted on 2004-07-19 15:53:10
|
Omni
|
That only works if the window is at the exact size as the Image resolution, with no scaling.
WindowGetWidth() sounds like it should be able to tell a resized window. Get a ratio between it and the normal resolution to use as a multiplier maybe, and multiply that by mouse coordinates?
Unless Verge's mouse variables tell you the position of the mouse inside the screen destination. I assume they tell you the global position of the mouse on the monitor.
Posted on 2004-07-19 16:00:08
|
vecna
|
the mouse.x values return coordinates relative to the screen image. you should not have to do any transformation of the coordinates.
Note that mouse values may return coordinates outside of the screen image in windowed mode.
Posted on 2004-07-19 19:10:09
|