The online racing simulator
Button Explanation From insim.txt
From the insim.txt file there is something i don't understand....

I played aroung with it but still can't figure out how that is working.


Quote :
// BStyle byte : style flags for the button

#define ISB_C1 1 // you can choose a standard
#define ISB_C2 2 // interface colour using
#define ISB_C4 4 // these 3 lowest bits - see below
#define ISB_CLICK 8 // click this button to send IS_BTC
#define ISB_LIGHT 16 // light button
#define ISB_DARK 32 // dark button
#define ISB_LEFT 64 // align text to left
#define ISB_RIGHT 128 // align text to right

// colour 0 : light grey (not user editable)
// colour 1 : title colour (default:yellow)
// colour 2 : unselected text (default:black)
// colour 3 : selected text (default:white)
// colour 4 : ok (default:green)
// colour 5 : cancel (default:red)
// colour 6 : text string (defaultale blue)
// colour 7 : unavailable (default:grey)

#define ISB_C1 1 // you can choose a standard
#define ISB_C2 2 // interface colour using
#define ISB_C4 4 // these 3 lowest bits -


Thoses are the 3 line i don't get, with playing with this value, im able to get the Gray color become Black or the Green Color become more Army Green , but that all. I will love if someone can explain me this so i can understand(some example will be great ).

My goal was trying to get the same Blue/Yellow color as LFS show for Time Diff display.
I haven't created coloured buttons myself, but the way I interpret it is that you should use the lowest three bits - C1, C2 and C4 - to create any of the colour values listed below. Just combine them with a bitwise OR like this:

// colour 0 : Nothing
// colour 1 : C1
// colour 2 : C2
// colour 3 : C1 | C2
// colour 4 : C4
// colour 5 : C1 | C4
// colour 6 : C2 | C4
// colour 7 : C1 | C2 | C4

+ of course any of the other bitflags you need.
Nope is not that ... or unable to make it work....

and i do understand Bit wise operation.
Notice the names of these LFS defined button text colours.
Attached images
lfs_00000946.jpg
Ha! , exactly what i was missing thx a lot

FGED GREDG RDFGDR GSFDG