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.

Newcomers AppGameKit Corner / [SOLVED] Vertical text alignment?

Author
Message
MadTinkerer
7
Years of Service
User Offline
Joined: 21st Nov 2010
Location:
Posted: 8th Jun 2018 19:02
So you can set the horizontal alignment of a text object. Fantastic. But is there a way to set it's vertical alignment? I know you can set it's position, but I want to be able to set the vertical alignment.

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

Go to answer

smallg
Valued Member
12
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 9th Jun 2018 00:25
no but you can get the text height and then position the text by that to simulate your desired offset (i.e. GetTextTotalHeight(id)*0.5 = centered Y), not as easy as a native command but you can at least then make your own positioning function which would do it for you.
life's one big game
spec= 4ghz, 16gb ram, AMD R9 2700 gpu
MadTinkerer
7
Years of Service
User Offline
Joined: 21st Nov 2010
Location:
Posted: 9th Jun 2018 18:37 Edited at: 9th Jun 2018 18:40
Man, I was hoping that wasn't the answer. Sometimes it seems like for every two or three things that AppGameKit does just as well or way better than GM:S, there's at least one thing that GM:S does really easily that you have to come up with your own hacky solution to do in AGK. Part of the problem here is what happens when I rotate the text object. Going to need to do a bunch of trig to position it correctly, not just + or - y. Wouldn't need to do all that extra math if I could just set the vertical alignment.

On the other hand, I still wouldn't trade the way AppGameKit generally does things for the way GM:S generally does things. That's why I'm here in the first place.
IronManhood
3
Years of Service
Recently Online
Joined: 6th Feb 2015
Location: US
Posted: 9th Jun 2018 23:06
This post has been marked by the post author as the answer.
I have a function for rotating text...

MadTinkerer
7
Years of Service
User Offline
Joined: 21st Nov 2010
Location:
Posted: 11th Jun 2018 16:00
Thanks!

Login to post a reply

Server time is: 2018-08-22 01:05:18
Your offset time is: 2018-08-22 01:05:18