Buttons

There's buttons on each NHeat screen, and most of those are "animated": Depending on it's status, a button looks different. This makes you see a pressed or highlighted button, while it's actually only a single image (IMG) that NHeat uses for all these actions.

These type of buttons are called "layered" even though actually the image isn't really layered. It's the game engine that displays different parts of the image for different actions. There's "layered" buttons that have 2 layers, most have 3 layers, some have 4, some even 5. They work all the same way; you'll get the idea

Let's use Options button from SCGTS mod for example to show how it works

Options button is a 3-layer button. Default status is inactive, that's how the button shows up if untouched.

If you move the mouse pointer over the button, the button's status changes: it becomes highlighted. Status: attention

If you press the button, it's status changes again. It actually looks like being "pressed". It's status now is active

 

The button's image file looks like this:

The image has 3 parts that all have same height.

  • The topmost part is displayed on inactive
  • The center part is displayed on active
  • The bottom part is displayed on attention

That image would have to be saved as uncompressed 24-bit TGA file (lets name it B_OPT.TGA), then compiled with mkimage tool or winrestoolswizard like this

  • mkimage B_OPT.TGA B_OPT.IMG 3
If the button image would have transparency, like for example this B_BACK.TGA button, it would have to be compiled like this
  • mkimage B_BACK.TGA B_BACK.IMG /a 3

Having transparency on a button image can be used to "move" the button on the screen, as only the nontransparent parts of the image will show up. But take care that on a 3-layer button it must still be 3 parts of equivalent height - transparent areas included.

Here's an example of SCGTS mod's LOGIN button. This button's position on the screen will show up as if the button has been moved to the right and down (in relationship to it's position's definition)

Buttons can have as many layers as they can have different status.

Stamps

Stamp files (STP) are images as well - and they work pretty much the same way as buttons do. They are used for slightly different purposes, and they are not compiled with mkimage, but with mkstamp The mouse curser for example is a single layer STP file in NHeat UI; the multiplayer status display light is a 5-layer STP. STP files are multi-purpose images

Most STP files are not in UI.RES, but in COMMON.RES. So if you are looking for a specific STP file's location, check COMMON.RES or RACE.RES as well

One of the most important STP files is DRIVERS.STP. It has all the driver images that are called in drivers.txt by "race_image #". # is the position of the file (from top) on the multi-layered DRIVERS.STP.

First position on DRIVERS.STP is always the one that is displayed for the player, all the others are for AI cars. So if for example the mod has 26 car paints/drivers, DRIVERS.STP is 27-layered, as you'd have to put a "placeholder" image to first layer. Each driver image in DRIVERS.STP should be no higher than 96 pixel.

On the left you can see a fraction of SCGTS mod's DRIVERS.STP's base image, which is a 24-bit uncompressed TGA, that has to be compiled to STP like this

  • mkstamp DRIVERS.TGA DRIVERS.IMG 27
You may have noticed that - opposite to compiling with mkimage - there's no /a option though there's transparency on the image. Reason is that mkstamp handles transparency by default

Another interesting STP is MULTI_S.STP

It's a 5-layer image, that is used on displaying various player status on multiplayer chat screen.

  • Connected
  • Accepted
  • Qualify
  • In
  • Race
Each status' image has size 21x22; the TGA image would have to be compiled
  • mkstamp MULTI_S.TGA MULTI_S.IMG 5

Almost all images that Heat uses for inrace displays are STP files too; some of those are even multiplayered. The images that are used for pit control display actually are all the same STP; the different images are layers on this STP.

Which STP is used for what display is listed on Item Listing page

[ UI: Buttons ]