Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drawing sprites while using a spritefont draws them in a weird location #46

Closed
AvioxArcade opened this issue Apr 11, 2020 · 6 comments
Closed
Labels
bug 😅 Juju did a bad thing

Comments

@AvioxArcade
Copy link

Using sprites in the middle of a scribble string is great.
but if using a spritefont, it seems to draw the image down really far.
example:

scribble_draw_set_box_align(fa_left,fa_middle)
scribble_draw(20,400,
"\n[][sfont][sprite_fire,0,.1][scale,3] this is [c_red][wobble]fire..."+
"\n[][sprite_fire,0,.1][scale,3] this is [c_red][wobble]fire...");

looks like this:
image

The top is using a spritefont, and the bottom a normal font.
Font alignment or sprite origin doesn't seem to make any difference, but scaling the font seems to make things worse. Here, the spritefont isn't scaled up:

image

@JujuAdams
Copy link
Owner

Thank you for the bug report.

Sprite origins won't affect the position of a sprite unless the macro SCRIBBLE_ADD_SPRITE_ORIGINS is set to true, found in __scribble_config().

I'll look into a proper fix for the issue now.

@JujuAdams JujuAdams added bug 😅 Juju did a bad thing in progress labels Apr 12, 2020
@JujuAdams
Copy link
Owner

I'm unable to reproduce this locally. Please could you upload a project that demonstrates the issue?

Additionally, what version of Scribble/GM are you on?

@AvioxArcade
Copy link
Author

AvioxArcade commented Apr 12, 2020 via email

@JujuAdams
Copy link
Owner

Thanks for the project/info, looking into this now.

@JujuAdams
Copy link
Owner

Ah, you're using scribble_draw_set_fade()! Fascinating! Could you give me some feedback on issue #36?

@JujuAdams
Copy link
Owner

Ok! I've found a couple issues with the way spritefonts were being handled and have fixed those. These changes are now live on the dev branch and will be available in v5.4.5 shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 😅 Juju did a bad thing
Projects
None yet
Development

No branches or pull requests

2 participants