Scripts / [SOLVED] Text Location On Screen For Different Screen Resolutions

Author
Message
Nevin
8
Years of Service
User Offline
Joined: 19th May 2015
Location: U.S.A
Posted: 5th Feb 2021 15:21
Hello,

I was wondering if I will need to adjust the text on screen for each screen resolution.

If I use 1980x1080 as my screen resolution and I use TextCenterOnXColor(30,20,7,"Test",255,255,255)

Will it show up in a different location depending on the player's screen resolution?

In my experience it does show up at a different location. But I want to make sure if anyone knows a solution to this problem before I code in checks for this and set all my text to different locations.



The author of this post has marked a post as an answer.

Go to answer
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 5th Feb 2021 16:41
This post has been marked by the post author as the answer.
It will show up, centred, in the same location but the size will be different on different resolutions so the left/right hand edge of the text will be in a different place.
Been there, done that, got all the T-Shirts!
PM
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 6th Feb 2021 03:13

I still wonder if a useful idea would be text boxes get turned into images that could be scaled any amount **automagically-- I wish** by the engine and placed right where they need to go. So WYSIWYG in GG!
PM
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 6th Feb 2021 11:31
Maybe GG should have different font sizes for different res, I recall some issue about the indented text when automagically resize the font to fit the screen res.
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
Nevin
8
Years of Service
User Offline
Joined: 19th May 2015
Location: U.S.A
Posted: 7th Feb 2021 19:08
@AmenMoses

Thank you.

Login to post a reply

Server time is: 2024-04-26 15:34:06
Your offset time is: 2024-04-26 15:34:06