Jump to content


Photo

What happened to draw_text_sprite()?


  • Please log in to reply
4 replies to this topic

#1 CGPM

CGPM

    GMC Member

  • GMC Member
  • 51 posts
  • Version:GM8

Posted 21 June 2012 - 09:19 PM

There used to be a function called draw_text_sprite(). Why isn't it used any more?
  • 0

#2 Davve

Davve

    Procrastinator

  • GMC Member
  • 3665 posts
  • Version:GM8.1

Posted 21 June 2012 - 09:23 PM

No idea, but use font_add_sprite to create custom fonts.
  • 0

#3 dannyjenn

dannyjenn

    GMC Member

  • GMC Member
  • 2067 posts
  • Version:Mac

Posted 21 June 2012 - 10:36 PM

I really don't like it that draw_text_sprite() was removed. Maybe they were trying to simplify things or something but draw_text_sprite() worked just fine and din't need to be changed. If anything they could have added font_add_sprite() in addition but left the old draw_text_sprite() there. I suppose you could always write your own script called draw_text_sprite() which does the exact same thing as the old funcion did...
  • 0

#4 CGPM

CGPM

    GMC Member

  • GMC Member
  • 51 posts
  • Version:GM8

Posted 21 June 2012 - 11:04 PM

I suppose you could always write your own script called draw_text_sprite() which does the exact same thing as the old funcion did...

Maybe I could, but it wouldn't be easy. Besides, I was just curious.
  • 0

#5 Davve

Davve

    Procrastinator

  • GMC Member
  • 3665 posts
  • Version:GM8.1

Posted 21 June 2012 - 11:30 PM

Maybe I could, but it wouldn't be easy. Besides, I was just curious.

Actually, it would be very simple:

//draw_text_sprite(x, y, str, sprite)
var p;
for (p = 0 p < string_length(argument2) p += 1)
    draw_sprite(argument3, ord(string_char_at(argument2, p + 1)), argument0 + sprite_get_width(argument3) * p, argument1)

  • 3




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users