Home   Help Search Login Register  

Author Topic: Dialogs : Detecting players screen resolution.  (Read 1198 times)

0 Members and 1 Guest are viewing this topic.

Offline SniperUK

  • Members
  • *
  • I'm a llama!
Dialogs : Detecting players screen resolution.
« on: 27 Jul 2007, 15:30:22 »
Is it possible to detect what video ratio a player is using so you can make use of that in your code?
The reason why i ask, is because i have developed a dialog with many functions which takes up a full screen when using 5:4 ratio on a monitor. This is all fine and i have no issues there. The problem occurs when i use different monitors or some players try using the map and they are on widescreen monitors that use 16:10 ratio. This usually results that they have more space to the left and right of the dialog and lose alittle space at the top and bottom, which of course means they lose some of the facilities that other players can use such as buttons, reports etc.

So my question is, is there anyway around this? or someway of detecting which ratio they are using so when the script is activated it loads up a different version of the dialog that fits their screen?

Offline Igor Drukov

  • Contributing Member
  • **
  • Conscientious Subjector
Re: Dialogs : Detecting players screen resolution.
« Reply #1 on: 27 Jul 2007, 16:03:35 »
Not that I know of but I hope I'm wrong  :)


I guess you'll have to cram the controls in your dialog so that people can see them regardless of their screen resolution. Or use collapsable controls :confused:

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re: Dialogs : Detecting players screen resolution.
« Reply #2 on: 28 Jul 2007, 07:42:31 »
According to the COMREF at least, there are no commands to dectect screen resolution.

There are ways to get it though. You could, at the start of your mission, have a dialog that reqests the player select his monitor ratio/resolution from a drop down list. Then, depending on which resolution they selected and which options you offered, you could have "_x" number of dialogs, one for each of the resolutions you support. Note that some people, myself not included, don't know generally what "ratio" they have, or what resolution, so you will probably want to walk them through it, and explain that a CRT is commonly 5:4 and that widescreen displays are 16:10 etc.

That is probably the most stable way of doing it. Unfortuately, it will require more work on your part.
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

Offline SniperUK

  • Members
  • *
  • I'm a llama!
Re: Dialogs : Detecting players screen resolution.
« Reply #3 on: 28 Jul 2007, 10:34:07 »
yeah this is fair enough and thanks for the input, i dont mind the extra work, its more of a case if i could have programmed it in so the player didnt even have to think, it would have been more beneficial :D If this can not be avoided then i will do as you say and let them select the ratio at the start, or upon the first launch of the dialog.