Bitmap in hfl files

Scripting questions, discussions, etc
9 posts Page 1 of 1
Hodo33
Posts: 86
Joined: Fri Dec 29, 2017 4:34 pm
by Hodo33 » Thu Jan 03, 2019 1:53 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 ?
Hodo33
Posts: 86
Joined: Fri Dec 29, 2017 4:34 pm
by Hodo33 » Mon Feb 04, 2019 1:38 pm
any update on this ?
Duion
Posts: 1377
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Mon Feb 04, 2019 3:11 pm
I tested this and it did not work, do you know when was the latest version where it did work?
Bloodknight
Posts: 235
Joined: Tue Feb 03, 2015 8:58 pm
by Bloodknight » Mon Feb 04, 2019 10:56 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 :/
Hodo33
Posts: 86
Joined: Fri Dec 29, 2017 4:34 pm
by Hodo33 » Tue Feb 05, 2019 7:30 pm
It works in 3.6 did a DIFF on guiMLTextCtrl.cpp and little or no changes
Duion
Posts: 1377
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Tue Feb 05, 2019 8:58 pm
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.
NeonTiger
Posts: 9
Joined: Sun Aug 02, 2015 4:50 am
by NeonTiger » Wed Feb 06, 2019 12:29 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.
Happenstance
Posts: 88
Joined: Sat Apr 11, 2015 9:08 pm
by Happenstance » Wed Feb 06, 2019 2:43 am
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.
Hodo33
Posts: 86
Joined: Fri Dec 29, 2017 4:34 pm
by Hodo33 » Wed Feb 06, 2019 4:19 pm
@Neon that was the trick, resized it and it works, thanks
9 posts Page 1 of 1

Who is online

Users browsing this forum: No registered users and 4 guests