Kousou Games Forum Home
Back to main site


  [Reply] [New Topic] [New Poll]

 Drawing sprites inside text example
Killswitch
Posted: Mar 18 2009, 11:00 PM


Superior Member


Group: Members
Posts: 25
Member No.: 15,190
Joined: 23-February 09



Can you draw sprites inside the text example on Kou? I am using it for speaking, but also for reading signs and have a sprite that contains frames of a pointer arrow in left, right,up and down and wanted to have ...

Kakariko Village Pointer Right
Hyrule Field East Pointer Left
Hyrule Castle Pointer Up

Is this possible? I was thinking if so, I would be using the "This is text" + draw_sprite etc etc ??

Edit - The more I think about this, it wouldnt work due to setting the X and Y in draw sprite...

This post has been edited by Killswitch on Mar 18 2009, 11:03 PM
mit
Posted: Mar 18 2009, 11:47 PM


KoUsOu_GaMeR


Group: Administrators
Posts: 1,189
Member No.: 43
Joined: 6-February 05



There's no reason why not.

A really simple way of doing it, if it's just little arrows you want, would be to add them as characters to the font. You could replace some obscure characters that you're not using.


Otherwise, you'd have to work out the current x and y value of the character it's drawing using string_width() and so on, which might get quite confusing, but not impossible. I might have a go later.


--------------------

..................__..__..____..____.._.._..____..__......__...
.................(..\/..)(_.._)(_.._)(.\/.)(.___)(..)..../__\..
..................)....(.._)(_...)(...)..(..)__)..)(__../(__)\.
.................(_/\/\_)(____).(__).(_/\_)(____)(____)(__)(__)
Killswitch
Posted: Mar 19 2009, 12:46 AM


Superior Member


Group: Members
Posts: 25
Member No.: 15,190
Joined: 23-February 09



The more I looked at it I figured it could weed it in there, but trying to sort through that code and figure out exactly where I could get the dimensions from will prob. be kinda diffecult.

I was gonna have it set to replace -sprPointerL with the image and so on, but it might be better to add the character as a sprite. I don't know how to work with it at that point, if it has to be set to a current position, so time to go check the manual ( if its even in there ). Wish the GML manual was more like PHPs manual...

EDIT - I replaced in my font sprite the #$%& signs with the actual arrows and it works now biggrin.gif

This post has been edited by Killswitch on Mar 19 2009, 12:57 AM
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:

[Topic Options] [Reply] [New Topic] [New Poll]



Hosted for free by InvisionFree (Terms of Use: Updated 2/10/2010) | Powered by Invision Power Board v1.3 Final © 2003 IPS, Inc.
Archive