This is an old revision of the document!
Available in version 2.3.2 and later.
SetMSGButton(<-slot <-enabled <-text <-color <-msgChannel <-msgText)
Sets the state of a MSG Button. MSG Buttons appear on the left of the display and to the right of the unit build pane. Up to 12 MSG buttons are supported. Each MSG button will send a 4rpl message (same as SendMSG) when clicked if the msgChannel and msgText are set.
MSG buttons persist across save/load. So you can set the MSG buttons once from script and they will be present for the rest of a game, even across saves.
:once RegisterForMSG("TestChannel" "MessageCallback") SetMSGButton(0 true "Thingy 0" V4(1 1 1 1) "TestChannel" "Hello From Thingy0") SetMSGButton(5 true LF "<size=125%><color=green>Thingy 5" LF " " concat concat concat V4(1 1 0 1) "TestChannel" "Hello From Thingy5") :MessageCallback traceallsp("Message Received: " <-_DATA)
⇐ Index