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 Studio Chat / How to wrap a line that is too long to the next line?

Author
Message
Mark Garrett
Reviewed AGK on Steam
18
Years of Service
User Offline
Joined: 10th Jul 2005
Location: California, US
Posted: 10th Feb 2023 05:17
I'm making a new function, and I'm not done with it yet.
But ,
It is a real long line, and wondered if I can 'wrap' it around to the next line with a concuntation or whatever it's called.
Or is there a way I could split the code in half and put half of it on another line below the first line?

Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 10th Feb 2023 07:25 Edited at: 10th Feb 2023 07:30
no Line Wrap or Concatenation in studio

meanwhile, if there's no potential duplicate names, this:


can be:
PSY
Developer
7
Years of Service
User Offline
Joined: 3rd Jul 2016
Location: Laniakea Supercluster
Posted: 14th Feb 2023 02:01 Edited at: 14th Feb 2023 02:02
Or you could store tp, tr, ri, br, bo, bl, le and tl in a type and just pass the type into the function

PSY


PSY LABS Games
Coders don't die, they just gosub without return
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 15th Feb 2023 16:30 Edited at: 15th Feb 2023 16:31
I made "clever" function that fills the text with spaces to fit a certain size.
I had to find the text size and did that using temporary text and the GetTextTotalWidth() command.
So this might help if you need to find the place where to wrap around:

Login to post a reply

Server time is: 2024-04-18 19:09:10
Your offset time is: 2024-04-18 19:09:10