Author Topic: Gui Control Profiles [Solved]  (Read 667 times)

How exactly do you define a new profile? Yes, I've searched the forums, and through RTB files. What I'm looking to do is create a scroll profile that uses my own images.
So, I've looked at this in RTB:
Code: [Select]
// RTB Scroll
if(!isObject(RTB_ScrollProfile)) new GuiControlProfile(RTB_ScrollProfile)
{
   fontType = "Book Antiqua";
   fontSize = 22;
   justify = center;
   fontColor = "0 0 0";
   fontColorHL = "130 130 130";
   fontColorNA = "255 0 0";
   fontColors[0] = "0 0 0";
   fontColors[1] = "0 255 0";  
   fontColors[2] = "0 0 255";
   fontColors[3] = "255 255 0";
   hasBitmapArray = true;
  
   bitmap = $RTB::Path@"images/ui/scrollArray";
};
All fine and dandy, it creates a scroll profile, uses the image that RTB has for it. My question is, how does the profile know what parts to use from the image? I've looked at the RTB scrollArray image, and the default BL one, and they don't use the same sizes for parts of the image, and they aren't necessarily the same layout. How does Blockland know that the top left box with the up arrow is actually the up arrow to use? Do you define this somewhere else? Does it do it all automatically? If so, what layout do I need to follow for it to work?
« Last Edit: July 06, 2012, 01:40:47 AM by lilboarder32 »

Each section is separated by red lines. Torque automatically figures out which one is which from the grid.

Each section is separated by red lines. Torque automatically figures out which one is which from the grid.
that's pretty interesting but how does it know which one to use for the elements

Each section is separated by red lines. Torque automatically figures out which one is which from the grid.
Cool, so I should just follow the general order and layout that RTB and the default profile provide?

Also, it doesn't seem that Torque is doing such a great job at figuring it out:

Also, it doesn't seem that Torque is doing such a great job at figuring it out:
It looks like you tried to use a WindowCtrl image for a scrollCtrl.

It looks like you tried to use a WindowCtrl image for a scrollCtrl.
Got it, I made the scroll control use the profile "GuiDefaultProfile" instead of "GuiScrollProfile". Whoops.