Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
SCR_ChatPanelManager Interface Reference

Singleton object to which SCR_ChatPanels get registered/unregistered. More...

Inheritance diagram for SCR_ChatPanelManager:
[legend]

Public Member Functions

void OpenChatPanel (notnull SCR_ChatPanel panel)
 Opens the chat panel and ensures that all other panels are closed.
 
void CloseChatPanel (notnull SCR_ChatPanel panel)
 Closes the chat panel.
 
void ToggleChatPanel (notnull SCR_ChatPanel panel)
 Toggles the chat panel: opens if it's closed, closes if it's open.
 
void OnMenuClosed ()
 
void ShowAllChatPanels ()
 
void ShowChatPanel (notnull SCR_ChatPanel panel)
 
void HideAllChatPanels ()
 
void CloseAllChatPanels ()
 
array< ref SCR_ChatMessageGetMessages ()
 Returns the array of messages. Array is not a copy, so be careful.
 
array< string > GetAllRegisteredCommands ()
 Returns an array of all commands registered with GetCommandInvoker.
 
void ShowHelpMessage (string msg)
 
ChatCommandInvoker GetCommandInvoker (string name)
 Returns a script invoker for provided chat command, or creates a new one.
 
bool GetAnyPanelFadedIn ()
 Returns true when there is any chat panel faded in.
 
void Register (SCR_ChatPanel panel)
 Registration of chat panels. These are called when a chat panel is created and destroyed.
 
void Unregister (SCR_ChatPanel panel)
 
void OnNewMessagePrivate (string msg, int senderId, int receiverId)
 Handling of new messages. Called by SCR_ChatComponent.
 
void OnNewMessageRadioProtocol (string msg, int frequency)
 
void OnNewMessageGeneral (string msg, int channelId, int senderId)
 
void OnNewMessage (string msg)
 
override void OnGameStart ()
 Initializaiton.
 
override void OnGameEnd ()
 
void Internal_EnableAllChannels ()
 Enables all channels.
 
void Internal_OnChatCommand (SCR_ChatPanel panel, string command, string otherData)
 OTHER.
 

Static Public Member Functions

static SCR_ChatPanelManager GetInstance ()
 Returns SCR_ChatPanelManager instance.
 

Public Attributes

ScriptedChatEntity m_ChatEntity
 

Static Public Attributes

const string CHAT_COMMAND_CHARACTER = "/"
 

Protected Member Functions

void InitDefaultChatCommands ()
 
void OnNewMessage (SCR_ChatMessage msg)
 
void OnMessageFiltered (SCR_ProfanityFilterRequestCallback callback, array< string > filteredTexts, SCR_ChatMessage originalMessage)
 

Protected Attributes

bool m_bInitDone = false
 
ref array< ref SCR_ChatMessagem_aMessages = {}
 
ref array< SCR_ChatPanelm_aChatPanels = {}
 
ref array< ref SCR_ProfanityFilterRequestCallbackm_aProfanityCallbacks = {}
 
ref map< string, ref ChatCommandInvoker > m_mCommands = new map<string, ref ScriptInvokerBase<ChatCommandCallback>>
 

Static Protected Attributes

const int CHAT_HISTORY_SIZE = 256
 

Detailed Description

Singleton object to which SCR_ChatPanels get registered/unregistered.

It stores message history and receives messages from SCR_ChatComponent.

Member Function Documentation

◆ CloseAllChatPanels()

void SCR_ChatPanelManager.CloseAllChatPanels ( )

◆ CloseChatPanel()

void SCR_ChatPanelManager.CloseChatPanel ( notnull SCR_ChatPanel  panel)

Closes the chat panel.

◆ GetAllRegisteredCommands()

array< string > SCR_ChatPanelManager.GetAllRegisteredCommands ( )

Returns an array of all commands registered with GetCommandInvoker.

◆ GetAnyPanelFadedIn()

bool SCR_ChatPanelManager.GetAnyPanelFadedIn ( )

Returns true when there is any chat panel faded in.

◆ GetCommandInvoker()

ChatCommandInvoker SCR_ChatPanelManager.GetCommandInvoker ( string  name)

Returns a script invoker for provided chat command, or creates a new one.

This way other systems can create chat commands and subscribe to them.

◆ GetInstance()

static SCR_ChatPanelManager SCR_ChatPanelManager.GetInstance ( )
static

Returns SCR_ChatPanelManager instance.

◆ GetMessages()

array< ref SCR_ChatMessage > SCR_ChatPanelManager.GetMessages ( )

Returns the array of messages. Array is not a copy, so be careful.

◆ HideAllChatPanels()

void SCR_ChatPanelManager.HideAllChatPanels ( )

◆ InitDefaultChatCommands()

void SCR_ChatPanelManager.InitDefaultChatCommands ( )
protected

◆ Internal_EnableAllChannels()

void SCR_ChatPanelManager.Internal_EnableAllChannels ( )

Enables all channels.

◆ Internal_OnChatCommand()

void SCR_ChatPanelManager.Internal_OnChatCommand ( SCR_ChatPanel  panel,
string  command,
string  otherData 
)

OTHER.

Called from a chat pannel when it detects that user sends a chat command.

◆ OnGameEnd()

override void SCR_ChatPanelManager.OnGameEnd ( )

◆ OnGameStart()

override void SCR_ChatPanelManager.OnGameStart ( )

Initializaiton.

◆ OnMenuClosed()

void SCR_ChatPanelManager.OnMenuClosed ( )

◆ OnMessageFiltered()

void SCR_ChatPanelManager.OnMessageFiltered ( SCR_ProfanityFilterRequestCallback  callback,
array< string >  filteredTexts,
SCR_ChatMessage  originalMessage 
)
protected

Notify all registered chat panels

◆ OnNewMessage() [1/2]

void SCR_ChatPanelManager.OnNewMessage ( SCR_ChatMessage  msg)
protected

◆ OnNewMessage() [2/2]

void SCR_ChatPanelManager.OnNewMessage ( string  msg)

◆ OnNewMessageGeneral()

void SCR_ChatPanelManager.OnNewMessageGeneral ( string  msg,
int  channelId,
int  senderId 
)

◆ OnNewMessagePrivate()

void SCR_ChatPanelManager.OnNewMessagePrivate ( string  msg,
int  senderId,
int  receiverId 
)

Handling of new messages. Called by SCR_ChatComponent.

◆ OnNewMessageRadioProtocol()

void SCR_ChatPanelManager.OnNewMessageRadioProtocol ( string  msg,
int  frequency 
)

◆ OpenChatPanel()

void SCR_ChatPanelManager.OpenChatPanel ( notnull SCR_ChatPanel  panel)

Opens the chat panel and ensures that all other panels are closed.

◆ Register()

void SCR_ChatPanelManager.Register ( SCR_ChatPanel  panel)

Registration of chat panels. These are called when a chat panel is created and destroyed.

◆ ShowAllChatPanels()

void SCR_ChatPanelManager.ShowAllChatPanels ( )

◆ ShowChatPanel()

void SCR_ChatPanelManager.ShowChatPanel ( notnull SCR_ChatPanel  panel)

◆ ShowHelpMessage()

void SCR_ChatPanelManager.ShowHelpMessage ( string  msg)

◆ ToggleChatPanel()

void SCR_ChatPanelManager.ToggleChatPanel ( notnull SCR_ChatPanel  panel)

Toggles the chat panel: opens if it's closed, closes if it's open.

◆ Unregister()

void SCR_ChatPanelManager.Unregister ( SCR_ChatPanel  panel)

Member Data Documentation

◆ CHAT_COMMAND_CHARACTER

const string SCR_ChatPanelManager.CHAT_COMMAND_CHARACTER = "/"
static

◆ CHAT_HISTORY_SIZE

const int SCR_ChatPanelManager.CHAT_HISTORY_SIZE = 256
staticprotected

◆ m_aChatPanels

ref array<SCR_ChatPanel> SCR_ChatPanelManager.m_aChatPanels = {}
protected

◆ m_aMessages

ref array<ref SCR_ChatMessage> SCR_ChatPanelManager.m_aMessages = {}
protected

◆ m_aProfanityCallbacks

ref array<ref SCR_ProfanityFilterRequestCallback> SCR_ChatPanelManager.m_aProfanityCallbacks = {}
protected

◆ m_bInitDone

bool SCR_ChatPanelManager.m_bInitDone = false
protected

◆ m_ChatEntity

ScriptedChatEntity SCR_ChatPanelManager.m_ChatEntity

◆ m_mCommands

ref map<string, ref ChatCommandInvoker> SCR_ChatPanelManager.m_mCommands = new map<string, ref ScriptInvokerBase<ChatCommandCallback>>
protected

The documentation for this interface was generated from the following file: