Bitmap in hfl files

Scripting questions, discussions, etc

Bitmap in hfl files

Hodo33
Posts: 86
Joined: Fri Dec 29, 2017 4:34 pm
Building a help system for game. Used to be able to do this

<bitmap:scripts/gui/Images/Ribbon2.png> <sbreak>

Can't get the bitmap to show up. Does this not work any more ?

Re: Bitmap in hfl files

Hodo33
Posts: 86
Joined: Fri Dec 29, 2017 4:34 pm
any update on this ?

Re: Bitmap in hfl files

Duion
Posts: 1277
Joined: Sun Feb 08, 2015 1:51 am

I tested this and it did not work, do you know when was the latest version where it did work?

Re: Bitmap in hfl files

Bloodknight
Posts: 226
Joined: Tue Feb 03, 2015 8:58 pm
this is typical of the examples I could find in an old TGE copy.

I should note that not a single instance of bitmap tag had an extension, perhaps it relied on searching the original torque extensions list and is looking for ribbons.png.jpg or .png.png and failing.

Code: Select all

<just:center><lmargin%:5><rmargin%:95><font:Arial Bold:20>ArcaneFX Credits <bitmap:demo/client/ui/seperator><font:Arial:16>
hopefully that helps, sorry if not :/

Re: Bitmap in hfl files

Hodo33
Posts: 86
Joined: Fri Dec 29, 2017 4:34 pm
It works in 3.6 did a DIFF on guiMLTextCtrl.cpp and little or no changes

Re: Bitmap in hfl files

Duion
Posts: 1277
Joined: Sun Feb 08, 2015 1:51 am

At some point there was a change to use SDL2 maybe that broke some GUI related stuff, it did break something for me. I'm not an expert on that, but maybe worth a check.

Re: Bitmap in hfl files

NeonTiger
Posts: 8
Joined: Sun Aug 02, 2015 4:50 am
I messed around with this in 3.10.1 and at first i though it was broken. Then i found out the the gui control needs to be larger in width then the image width to display. Other then that everything that i threw at it seem to display everything just fine.

Re: Bitmap in hfl files

Happenstance
Posts: 83
Joined: Sat Apr 11, 2015 9:08 pm
Just tested this using the latest development branch and it seems to be working. I added a GuiMLTextCtrl (named MLTEXTCTRL) to the main menu screen and called:
MLTEXTCTRL.addText("<bitmap:data/splash>");
Result was the Torque3D splash image rendering inside the control. That was without changing the default control size - it just resized itself to fit the splash image.

Only 'catch' I did find is you need to be sure you're sending it the correct, relative file path (where the 'root' is the same location as the Torque3D executable) otherwise it will trip up when it tries to find the bitmap. If you trace the code starting at GuiMLTextCtrl::allocBitmap() you'll see it jumps through a ton of hoops to create and tweak a Torque filepath object (Torque::Path) that's used by the texture loading code.

Re: Bitmap in hfl files

Hodo33
Posts: 86
Joined: Fri Dec 29, 2017 4:34 pm
@Neon that was the trick, resized it and it works, thanks

Who is online

Users browsing this forum: No registered users and 1 guest