Optional
data: IS_BTN_DataAll string properties in a raw format as it was received from LFS
Button style flags
Button ID (0 to 239)
This value is returned in IS_BTC and IS_BTT packets.
Host buttons and local buttons are stored separately, so there is no chance of a conflict between a host control system and a local system (although the buttons could overlap on screen).
Programmers of local InSim programs may wish to consider using a configurable button range and possibly screen position, in case their users will use more than one local InSim program at once.
Height (0 to 200)
Mainly used internally by InSim but also provides some extra user flags
NOTE: You should not use INST_ALWAYS_ON for most buttons. This is a special flag for buttons that really must be on in all screens (including the garage and options screens). You will probably need to confine these buttons to the top or bottom edge of the screen, to avoid overwriting LFS buttons. Most buttons should be defined without this flag, and positioned in the recommended area so LFS can keep a space clear in the main screens.
Left offset (0 to 200)
12 + text size (a multiple of 4)
Top offset (0 to 200)
0 to 240 characters of text
Readonly
TypeIf set, the user can click this button to type in text.
Lowest 7 bits are the maximum number of characters to type in (0 to 95) The highest bit (128) can be set to initialise dialog with the button's text
On clicking the button, a text entry dialog will be opened, allowing the specified number of characters to be typed in. The caption on the text entry dialog is optionally customisable using Text in the IS_BTN packet. If the first character of IS_BTN's Text field is zero, LFS will read the caption up to the second zero. The visible button text then follows that second zero.
Text: 65-66-67-0 would display button text "ABC" and no caption
Text: 0-65-66-67-0-68-69-70-71-0-0-0 would display button text "DEFG" and caption "ABC"
Connection to display the button (0 = local / 255 = all)
Width (0 to 200)
Static
Readonly
INST_Static
Readonly
IS_Static
Readonly
IS_Static
Readonly
IS_Static
Readonly
IS_Static
Readonly
MAX_
BuTtoN - button header - followed by 0 to 240 characters
You can make up to 240 buttons appear on the host or guests (ID = 0 to 239). You should set the InSimFlags.ISF_LOCAL flag (in IS_ISI) if your program is not a host control system, to make sure your buttons do not conflict with any buttons sent by the host.
LFS can display normal buttons in these four screens:
The recommended area for most buttons is defined by:
If you draw buttons in this area, the area will be kept clear to avoid overlapping LFS buttons with your InSim program's buttons. Buttons outside that area will not have a space kept clear. You can also make buttons visible in all screens by setting the Inst property to INST_ALWAYS_ON.