Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ChatComponent.c
Go to the documentation of this file.
2{
3}
4
5class SCR_ChatComponent : BaseChatComponent
6{
7 //------------------------------------------------------------------------------------------------
10 bool GetChannelState(BaseChatChannel channelId)
11 {
12 ScriptedChatEntity ent = ScriptedChatEntity.Cast(GetGame().GetChat());
13 if (!ent)
14 return false;
15
16 return GetChannelState(ent.GetChannelId(channelId));
17 }
18
19 private ScriptedChatEntity m_ChatEntity;
20 private int m_iRadioProtocolChannel;
21
22 //-----------------------------------------------------------------------------
23 override void OnNewMessage(string msg, int channelId, int senderId)
24 {
26 if (!mgr)
27 return;
28
29 mgr.OnNewMessageGeneral(msg, channelId, senderId);
30 }
31
32 //-----------------------------------------------------------------------------
33 override void OnNewPrivateMessage(string msg, int senderId, int receiverId)
34 {
36 if (!mgr)
37 return;
38
39 mgr.OnNewMessagePrivate(msg, senderId, receiverId);
40 }
41
42 //-----------------------------------------------------------------------------
43 override void ShowMessage(string msg)
44 {
46 if (!mgr)
47 return;
48
49 mgr.OnNewMessage(msg);
50 }
51
52 //------------------------------------------------------------------------------------------------
58 static void RadioProtocolMessage(string msg, int freq = -1)
59 {
60 SCR_ChatPanelManager mgr = SCR_ChatPanelManager.GetInstance();
61 if (!mgr)
62 return;
63
64 mgr.OnNewMessageRadioProtocol(msg, freq);
65 }
66}
ScriptedChatEntity m_ChatEntity
Definition game.c:40
ArmaReforgerScripted GetGame()
Definition game.c:1398
void OnNewMessagePrivate(string msg, int senderId, int receiverId)
Handling of new messages. Called by SCR_ChatComponent.
void OnNewMessage(string msg)
static SCR_ChatPanelManager GetInstance()
Returns SCR_ChatPanelManager instance.
void OnNewMessageGeneral(string msg, int channelId, int senderId)
void OnNewMessageRadioProtocol(string msg, int frequency)
void OnNewMessage(string msg, int channelId, int senderId)
void OnNewPrivateMessage(string msg, int senderId, int receiverId)
proto external bool GetChannelState(int channelId)
void ShowMessage(string msg)