Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / WindowWidth

Author
Message
Isocadia
15
Years of Service
User Offline
Joined: 24th Jul 2009
Location:
Posted: 18th Jan 2010 09:37
Is there a command that gets the size of the window, and not the resolution?

Isocadia

Aldur
17
Years of Service
User Offline
Joined: 8th Oct 2007
Location: Melbourne, Australia
Posted: 18th Jan 2010 10:13
dbScreenWidth()

Isocadia
15
Years of Service
User Offline
Joined: 24th Jul 2009
Location:
Posted: 18th Jan 2010 16:25
No, that returns the displayed width ( don't know how to call it ). Lets say my screen is running on a 1280x1024x32 resolution but the screen size is 1152x864x32 ( windowed ). dbScreenWidth () will return 1280 instead of 1152, I need a way to get the 1152.

Isocadia

Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 18th Jan 2010 16:31 Edited at: 18th Jan 2010 16:39
dbScreenWidth() will return the width of the window
dbDesktopWidth() will return the width of the screen
in your case, i dont think dbScreenWidth() would return 1280, it should return 1152

Isocadia
15
Years of Service
User Offline
Joined: 24th Jul 2009
Location:
Posted: 18th Jan 2010 16:48
dbScreenWidth returns 1280, or atleast this returns 1280:



Isocadia

Aldur
17
Years of Service
User Offline
Joined: 8th Oct 2007
Location: Melbourne, Australia
Posted: 18th Jan 2010 17:09
I don't know why that is.

What Hassan said is how it should be.

Isocadia
15
Years of Service
User Offline
Joined: 24th Jul 2009
Location:
Posted: 18th Jan 2010 17:17
A well, then I will just drop windowed support atm. Will find a way to fix that eventialy.

Isocadia

Aldur
17
Years of Service
User Offline
Joined: 8th Oct 2007
Location: Melbourne, Australia
Posted: 18th Jan 2010 17:46
Are you trying to get the window width after it has been resized?

dbScreenWidth() will return the resolution that the application has been told to run at.

Isocadia
15
Years of Service
User Offline
Joined: 24th Jul 2009
Location:
Posted: 19th Jan 2010 08:43
Yeah, I first set dbDisplayMode to 1280x1024x32, then I resize the screen to 1152x864x32, here's my code:



Maybe I should put the display mode at the size of the screen, but then I would only be able to size the screen to supported resolutions by the video card. I think....

Isocadia

Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 19th Jan 2010 12:29




dont use that code for display mode, try this:


Isocadia
15
Years of Service
User Offline
Joined: 24th Jul 2009
Location:
Posted: 19th Jan 2010 17:15
The point is, I'm loading my resolution preferences from a .Set file, so in the end I will only allow users to change to the resolutions that they support, but that is in the options menu, so what I think I should to is manualy check if a resolution is supported, and then instead of resizing the screen just set the display mode to the size I want the screen to be ( if I'm correct ).

Isocadia

Login to post a reply

Server time is: 2024-11-20 05:22:32
Your offset time is: 2024-11-20 05:22:32