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.

AppGameKit Classic Chat / [SOLVED] BUG - gettexttotalheight

Author
Message
Santman
13
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 25th Feb 2019 00:39
So not sure if this is new or not, but this no longer seems to take account of text wrapping.

So if you set a maxwidth of text, and it wraps to two lines, then place another text using it's Y+TOTALHEIGHT parameters, the sedonc text string will appear on top of teh second line of the first one.

Also, swapping between windowed and fullscreen affects the max length, so if it's on the cusp it appears to flip - i.e. windowed it's overlapping, fullscreen it's not.

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

Go to answer

puzzler2018
User Banned
Posted: 25th Feb 2019 00:44 Edited at: 25th Feb 2019 00:45
Probably not a bug - but mis use on knowing how to use


Explain further by a simple snippet or two showing the fault - once we see the fault in action, its better to resolve sure - but your not for showing your stuff are you

We still waiting for your 3D world editor that you keep promising us
Tier 1 Developer
puzzler2018
User Banned
Posted: 25th Feb 2019 00:50
GetTextTotalHeight worked perfectly for me every single time.

Ok whats really wrong and what you trying to do with it
Tier 1 Developer
puzzler2018
User Banned
Posted: 25th Feb 2019 00:52
So you want a multi line text - like Notepad or word editor?

Tier 1 Developer
puzzler2018
User Banned
Posted: 25th Feb 2019 00:56
This post has been marked by the post author as the answer.
Yeah - ill log out too seems like everyone does after a quick post. hope you work things out... im sure you will
-
Tier 1 Developer
Santman
13
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 25th Feb 2019 01:20
Puzzler,

It may well be a misuse of the command, but I can't just lift little bits out of my code in 5 minutes. I'll see if I can show the issue in a seperate file, but can you calm the attitude?
Santman
13
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 25th Feb 2019 02:50 Edited at: 25th Feb 2019 22:04
Ok, so I did a little more testing after you said it worked, and it does, you're quite correct. The problem I had was the text was setting from a string which also contained a float calculation - which meant the length changed and I wasn't recalulating the positions every frame. My bad.

Login to post a reply

Server time is: 2024-11-05 23:30:08
Your offset time is: 2024-11-05 23:30:08