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 / Text & Sprite

Author
Message
george++
AGK Tool Maker
17
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 23rd Aug 2016 05:52
Hi,
Is there any way to create a sprite from a text object?
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 23rd Aug 2016 06:46
yes, u need
imgid=GetImage( x, y, width, height )

here i have also a nice link to create images from text input
http://cooltext.com/Logos
AGK (Steam) V2.0.20 : Windows 10 Pro 64 Bit : AMD (16.3.2) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
JLMoondog
Moderator
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 23rd Aug 2016 07:01
Text objects can be manipulated like sprites the same way, which is really cool and is a one up from any other language. Curious why you want to convert it to a sprite?
george++
AGK Tool Maker
17
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 23rd Aug 2016 08:39 Edited at: 23rd Aug 2016 08:41
@Markus: Thanks. You are always available for help!
Quote: "Curious why you want to convert it to a sprite?"

I would like to apply the SeSpriteScissor command on strings objects.
I need to create a scrolling list of editable strings
JohnnyMeek
11
Years of Service
User Offline
Joined: 23rd Apr 2013
Location: Slovenia
Posted: 23rd Aug 2016 08:45
You can use SetTextScissor.
george++
AGK Tool Maker
17
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 23rd Aug 2016 11:28
Quote: "You can use SetTextScissor."

Oops! I missed this command. Thanks
JLMoondog
Moderator
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 23rd Aug 2016 11:31
Johnny beat me too it! But I was ALSO going to say that you can actually update the string variable that the text object uses and even setup a collision box that can be edited and updated whenever needed, pretty quickly too. ALSO, if you want to create a scrolling list of constantly updated strings, using a text object is actually easier and extremely faster than having to constantly create a text object / or update a string in a text object / or delete an old text object and than create a new text object with an updated string, and than scroll it accordingly...phewwwwwwww!! I'm winded from saying that in one sentence!



Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 28th Aug 2016 13:07
Can't rotate text objects though.
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 30th Aug 2016 07:26
DrawSprite is also a good command to print text self on the screen. At each Draw you can exchange the Image (Font Char)
AGK (Steam) V2.0.20 : Windows 10 Pro 64 Bit : AMD (16.3.2) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)

Login to post a reply

Server time is: 2024-11-25 03:25:00
Your offset time is: 2024-11-25 03:25:00