D
djrain
Guest
So I added a sprite font in the created event of the first object created in the room like so:
And then in the draw event of my score display object I have this:
I have s_font added as a sprite with 94 frames each having one character (starting with space, and ordered according to the font table). However, no text is displayed. But if I set the draw font to one created through the GUI, it appears as expected. What am I doing wrong?
It may be relevant that I just purchased the mobile export (was using trial before). I thought it would work after upgrading since adding fonts through code is supposedly not supported in trial version, but now I'm just confused.
Code:
global.myFont = font_add_sprite(s_font, ord(" "), false, 2);
Code:
draw_set_font(global.myFont);
draw_set_color(c_white);
draw_set_halign(fa_center);
draw_text(x, y, "abc");
I have s_font added as a sprite with 94 frames each having one character (starting with space, and ordered according to the font table). However, no text is displayed. But if I set the draw font to one created through the GUI, it appears as expected. What am I doing wrong?
It may be relevant that I just purchased the mobile export (was using trial before). I thought it would work after upgrading since adding fonts through code is supposedly not supported in trial version, but now I'm just confused.
Last edited by a moderator: