Font Cursor Replacement / Fake cursor for menus

Font Cursor Replacement / Fake cursor for menus

O Ilusionista

Captain 100K
This is a trick I am using since long time on my Avengers game but I swear I already made a tutorial about it, but at least I can't find it so I will make a new topic.
 
Very nice O Ilusionista! I've used fonts for a lot of in game graphics (alert icons, signs, and other assorted things), but I never thought of a menu cursor.

Thumbs up!

DC
 
O Ilusionista
Wow, nice trick! I'm using fonts as graphics too, but for a long time I'm trying to learn about how modders include cursors in native engine menus. Mystery solved hahaha.
I can add cursors in my custom menus with "drawstring" function, but I never thought about to use it in the translation.txt
 
Thanks guys. Kratus yeah it works like a charm.
Right now I am even using a custom font for all Brand/Hawkeye weapons, so instead of loading and drawing a sprite, it uses a simple textobject with the custom font :)
 
O Ilusionista said:
Thanks guys. Kratus yeah it works like a charm.
Right now I am even using a custom font for all Brand/Hawkeye weapons, so instead of loading and drawing a sprite, it uses a simple textobject with the custom font :)
Yeah, is too much better to use fonts for simple purposes instead to load an entire sprite separately. Usually, I let the entire "font10" table reserved only for graphics.
Another question I need to ask is about "textobject" functions, you talked about it before. What this function does? Is same as "settextobject" function? I never used it before
 
I can confirm that for you guys. Text objects will NOT work outside of a level. They are run as part of the level loop cycle. It follows that if a level isn't running, text objects are not running either. If you want custom text outside of game play, you must use the drawstring functions.

DC
 
Yeah, drawstrings will work anywhere. Incidentally, text objects are really just drawstrings with a wrapper. When you set a text object, you're actually populating a set of reserved variables. When the engine's internal level loop runs, it checks those variables and if they have valid data, it sends them to the internal drawstring() function.

IOW, text objects and the drawstring function both work the same way. Text objects just add the fire and forget convenience and don't need an update script since the engine does it for you.

DC
 
cool so it works like a custom tileset,.
I guess you can do a lot of stuff with this to represent icons ingame on menus instead of using entities
16*16 font would work nicely and ypu can use ebtire font image for icons only

DC is it possible to make textobject stay in place where entity is, so it doesnt scroll with screen when you move? Thats one thing im missing in textobjects, i thino it needs updatescript ? textobject doesnt reqyire updatescriot but it only scrolls with screen, doeant stay whwn it was spawned like normal entity.
 
nedflandeurse, indeed. Fonts can do amazing things if you leverage them right. This isn't just true in OpenBOR. Using fonts for still graphics (because that's exactly what they are) is one of the oldest tricks in the book. Websites make heavy use of it (including this forum and the one I run at UK). All the small graphics you see are just a font.

DC
 
Damon Caskey said:
nedflandeurse, indeed. Fonts can do amazing things if you leverage them right. This isn't just true in OpenBOR. Using fonts for still graphics (because that's exactly what they are) is one of the oldest tricks in the book. Websites make heavy use of it (including this forum and the one I run at UK). All the small graphics you see are just a font.

DC

Damon Caskey
Yes, I think so.
I remember seeing stage/level preview in mugen as well using special fonts.
Like
A = picture of stage 1
B = picture of stage 2
C = picture of stage 3
...
 
dantedevil thanks buddy ;)

Yes, I think so.
I remember seeing stage/level preview in mugen as well using special fonts.
Like
A = picture of stage 1
B = picture of stage 2
C = picture of stage 3
nedflandeurse yeah, and screenpacks too. This is how I get a full screen graphic on both mode selections and animated select screen - waaaaay before other people doing it :)
 
Back
Top Bottom