Angular directive
sra-chat source template
The Chat Widget sends predefined messages with a click of a button.
You can also send private messages directly to a specific car.
You can also select LEADER, AHEAD, BEHIND, or REPLY to let the system determine the car to send to.
Just click the button or car first, then click the text.
Here is a list of the predefined messages.
- ALL ME
- [#[CARNUMBER]] All Me
- GOOD LUCK
- [#[CARNUMBER]] Good Luck from SIMRacingApps.com
- GOOD RACE
- [#[CARNUMBER]] Good Race from SIMRacingApps.com
- GOOD WIN - Sends to Leader by default.
- /LEADER [#[CARNUMBER]] Good Win
- HELLO
- [#[CARNUMBER]] Hello
- LOL
- [#[CARNUMBER]] LoL
- NO PROBLEM
- [#[CARNUMBER]] No Problem
- OK
- [#[CARNUMBER]] Ok
- PASS LEFT - Sends to Car BEHIND by default.
- /RL-1 [#[CARNUMBER]] Pass Left
- PASS RIGHT - Sends to Car BEHIND by default.
- /RL-1 [#[CARNUMBER]] Pass Right
- PITTING IN
- [#[CARNUMBER]] Pitting In
- PITTING OUT
- [#[CARNUMBER]] Pitting Out
- RACING DEAL
- [#[CARNUMBER]] Racing Deal
- SORRY
- [#[CARNUMBER]] Sorry
- SWITCH IN 1
- [#[CARNUMBER]] Switch In 1
- SWITCH IN 3
- [#[CARNUMBER]] Switch In 3
- THANKS - Sends to Car BEHIND by default.
- /RL-1 [#[CARNUMBER]] Thanks
- YOU'RE WELCOME - Sends to the Car AHEAD by default.
- /RL1 [#[CARNUMBER]] You're Welcome
- @ALLTEAMS
- @transmit ALLTEAMS
- @DRIVERS
- @transmit DRIVERS
- @TEAM
- @transmit TEAM
- @CLUB
- @transmit CLUB
- @RACE CONTROL
- @transmit RACECONTROL
- @PRIVATE
- @transmit PRIVATE
- @ADD CH - adds a radio channel using the selected car number. CHxxx
- @add CH[CARORME]
- JOIN ME @CH - Invite others to join your channel
- [#[CARNUMBER]] Join Me @ADD CH[CARNUMBER]
- @CH
- @transmit CH[CARORME]
- ?
- [#[CARNUMBER]] ?
chat-row1-col1-name = Button Name chat-row1-col1-text = Text To SendYou can have multiple instances of chat with a different name. See the parameter data-sra-args-chat-instance. Just replace the word "chat" in the variable to your instance name, in this example, "chat2".
chat2-row1-col1-name = Button Name chat2-row1-col1-text = Text To SendThe text can also have variables embedded with it. The following variables are allowed.
- [CAR] - The car number that the message will be sent to.
- [CARORME] - The car number selected or ME if no car selected
- [CARNUMBER] - Your Car Number
- [DRIVERNAME] - Your Name
chat-row1-col1-name = /[CAR]
PASS LEFT chat-row1-col1-text = /RL-1 [#[CARNUMBER]] Pass Left
Example:
<sra-chat></sra-chat>
Dependencies:
Name | Type | Description |
---|---|---|
data-sra-args-chat-instance | string | The name of this instance for the settings.txt variable prefix. Defaults to "chat". |
data-sra-args-interval | integer | The interval, in milliseconds, that this widget will update from the server. Default is 500. |