Jump to content

Getting screen resolution from script


tomm434

Recommended Posts

Hello everyone!

 

I need to know screen resolution on every game load

 

 

I tried:

GetNumericIniSetting "iSize W:Display"

But it didn't work.

 

I also tried extracting it from XML menu,

 

 

I created menu object (in HUDMainMenu) in which I story screen width and height

<text name="MGSMScreenRes">

<visible> &false; </visible>

<x><copy src="screen()" trait="width"/></x>

<y><copy src="screen()" trait="height"/></y>

</text>
        let MGSMain.fResolutionXOriginal := GetUIFloat "HudMainMenu/MGSM_HUD/MGSM_Sheesh/MGSMScreenRes/x"
        let MGSMain.fResolutionYOriginal := GetUIFloat "HudMainMenu/MGSM_HUD/MGSM_Sheesh/MGSMScreenRes/y"

But on game load I receive different values - My resolution * 1.06 ==(1526x954) (mine is 1440x900). I have no idea how this is going to work in different monitors..

 

Please help?

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...