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

Component which must be attached to chat layout. More...

Inheritance diagram for SCR_ChatPanel:
[legend]

Public Member Functions

void OnUpdateChat (float timeSlice)
 This must be called for chat to work. Typically it should be called from HUD Manager or from Menu.
 
void OnHUDResize (int newMessageLineCount)
 Adjust the amount of messages shown when the size of the HUD changes.
 
bool IsOpen ()
 
bool GetFadeOut ()
 True when fading in or when has faded in already.
 
bool GetFadeIn ()
 True when fading out or has faded out already.
 
void Internal_Open ()
 Don't call it yourself, use SCR_ChatPanelManager instead.
 
void Internal_Close ()
 Don't call it yourself, use SCR_ChatPanelManager instead.
 
void Internal_OnNewMessage (SCR_ChatMessage msg)
 
notnull Widget GetWidget ()
 
override void HandlerAttached (Widget w)
 
override void HandlerDeattached (Widget w)
 
string Internal_GetChannelListHelpMessage ()
 Returns string with help message about available channels.
 
ScriptInvoker GetOnChatOpen ()
 
ScriptInvoker GetOnChatClosed ()
 
SCR_FadeInOutAnimator GetFadeInOutAnimator ()
 

Public Attributes

ref SCR_ChatMessageStyle m_SystemChannelStyle
 
ref SCR_ChatMessageStyle m_RadioProtocolStyle
 
ref SCR_ChatMessageStyle m_GlobalChannelStyle
 
ref SCR_ChatMessageStyle m_GroupChannelStyle
 
ref SCR_ChatMessageStyle m_FactionChannelStyle
 
ref SCR_ChatMessageStyle m_VehicleChannelStyle
 
ref SCR_ChatMessageStyle m_LocalChannelStyle
 
ref SCR_ChatMessageStyle m_DirectChannelStyle
 
ref SCR_FadeInOutAnimator m_MessageHistoryAnimator
 
EditBoxFilterComponent m_MessageEditBoxComponent
 

Protected Member Functions

void UpdateChatMessages ()
 
void SendMessage ()
 
void CycleChannels (bool next)
 next: true - cycle up, false - cycle down
 
void ShowChannelWarning (BaseChatChannel Chatchannel=null, string message="")
 
string GetCommand (string s)
 Returns command from this message string, if it has a command.
 
BaseChatChannel FindChannelByPrefix (string prefix)
 
int GetPlayerIdByName (string name)
 
void SetActiveChannel (notnull BaseChatChannel channel, string ReceiverName=string.Empty)
 Switches channels and replaces the channel tag.
 
void VerifyChannelStyles ()
 
SCR_ChatMessageStyle GetChannelStyle (BaseChatChannel channel)
 Returns style of this channel. If not resolved, returns system style.
 
SCR_ChatMessageStyle GetMessageStyle (notnull SCR_ChatMessage msg)
 
SCR_ChatComponent GetChatComponent ()
 
int GetChannelId (notnull BaseChatChannel channel)
 
void Callback_OnPressSpaceAfterCommand ()
 Called by space bar when we change channel by tag.
 
void Callback_OnCloseAction ()
 Called when Esc is pressed.
 
void Callback_OnSendMessageAction ()
 Called when chat toggle key is pressed.
 
void Callback_OnGamepadConfirmAction ()
 When chat is opened while using gamepad, we don't set focus on edit box, so that player can change channel.
 
void Callback_OnHistoryAction (float value)
 History scrolling.
 
void Callback_OnSwitchChannelAction (float value, EActionTrigger reason)
 Channel switching.
 
void Callback_OnEditBoxChange ()
 Called when text in the edit box changes.
 

Protected Attributes

ref ScriptInvoker m_OnChatOpen
 
ref ScriptInvoker m_OnChatClosed
 
int m_iMessageLineCount
 
float m_fFadeOutThreshold_s
 
bool m_bAlwaysVisible
 
ResourceName m_sChatMessageLineLayout
 
int m_iHistoryId = 0
 
int m_iHistoryIdLowestMessage = 0
 
bool m_bHistoryMode = false
 
ref array< SCR_ChatMessageLineComponentm_aMessageLines = {}
 
bool m_bOpen = false
 
ScriptedChatEntity m_ChatEntity
 
BaseChatChannel m_ActiveChannel
 
Widget m_wRoot
 
ref SCR_ChatPanelWidgets m_Widgets = new SCR_ChatPanelWidgets()
 

Static Protected Attributes

const string STR_AVAILABLE_CHANNELS = "#AR-Chat_AvailableChannels"
 
const string STR_CHANNEL_DISABLED = "#AR-Chat_ChannelDisabled"
 
const string STR_CHANNEL_UNKNOWN = "#AR-Chat_ChannelUnknown"
 
const string STR_MESSAGE_LIMIT_REACHED = "#AR-Chat_LimitReached"
 

Detailed Description

Component which must be attached to chat layout.

Use public API to open the chat. It will not open itself. However it will close itself automatically when a message is sent.

Member Function Documentation

◆ Callback_OnCloseAction()

void SCR_ChatPanel.Callback_OnCloseAction ( )
protected

Called when Esc is pressed.

◆ Callback_OnEditBoxChange()

void SCR_ChatPanel.Callback_OnEditBoxChange ( )
protected

Called when text in the edit box changes.

◆ Callback_OnGamepadConfirmAction()

void SCR_ChatPanel.Callback_OnGamepadConfirmAction ( )
protected

When chat is opened while using gamepad, we don't set focus on edit box, so that player can change channel.

Instead focus is set when player uses the ChatConfirm action. Should be mapped only to gamepad.

◆ Callback_OnHistoryAction()

void SCR_ChatPanel.Callback_OnHistoryAction ( float  value)
protected

History scrolling.

◆ Callback_OnPressSpaceAfterCommand()

void SCR_ChatPanel.Callback_OnPressSpaceAfterCommand ( )
protected

Called by space bar when we change channel by tag.

◆ Callback_OnSendMessageAction()

void SCR_ChatPanel.Callback_OnSendMessageAction ( )
protected

Called when chat toggle key is pressed.

◆ Callback_OnSwitchChannelAction()

void SCR_ChatPanel.Callback_OnSwitchChannelAction ( float  value,
EActionTrigger  reason 
)
protected

Channel switching.

◆ CycleChannels()

void SCR_ChatPanel.CycleChannels ( bool  next)
protected

next: true - cycle up, false - cycle down

◆ FindChannelByPrefix()

BaseChatChannel SCR_ChatPanel.FindChannelByPrefix ( string  prefix)
protected

◆ GetChannelId()

int SCR_ChatPanel.GetChannelId ( notnull BaseChatChannel  channel)
protected

◆ GetChannelStyle()

SCR_ChatMessageStyle SCR_ChatPanel.GetChannelStyle ( BaseChatChannel  channel)
protected

Returns style of this channel. If not resolved, returns system style.

◆ GetChatComponent()

SCR_ChatComponent SCR_ChatPanel.GetChatComponent ( )
protected

◆ GetCommand()

string SCR_ChatPanel.GetCommand ( string  s)
protected

Returns command from this message string, if it has a command.

Otherwise returns empty string. Returned string is always lowercase

◆ GetFadeIn()

bool SCR_ChatPanel.GetFadeIn ( )

True when fading out or has faded out already.

◆ GetFadeInOutAnimator()

SCR_FadeInOutAnimator SCR_ChatPanel.GetFadeInOutAnimator ( )

◆ GetFadeOut()

bool SCR_ChatPanel.GetFadeOut ( )

True when fading in or when has faded in already.

◆ GetMessageStyle()

SCR_ChatMessageStyle SCR_ChatPanel.GetMessageStyle ( notnull SCR_ChatMessage  msg)
protected

◆ GetOnChatClosed()

ScriptInvoker SCR_ChatPanel.GetOnChatClosed ( )

◆ GetOnChatOpen()

ScriptInvoker SCR_ChatPanel.GetOnChatOpen ( )

◆ GetPlayerIdByName()

int SCR_ChatPanel.GetPlayerIdByName ( string  name)
protected

◆ GetWidget()

notnull Widget SCR_ChatPanel.GetWidget ( )

◆ HandlerAttached()

override void SCR_ChatPanel.HandlerAttached ( Widget  w)

◆ HandlerDeattached()

override void SCR_ChatPanel.HandlerDeattached ( Widget  w)

◆ Internal_Close()

void SCR_ChatPanel.Internal_Close ( )

Don't call it yourself, use SCR_ChatPanelManager instead.

◆ Internal_GetChannelListHelpMessage()

string SCR_ChatPanel.Internal_GetChannelListHelpMessage ( )

Returns string with help message about available channels.

◆ Internal_OnNewMessage()

void SCR_ChatPanel.Internal_OnNewMessage ( SCR_ChatMessage  msg)

◆ Internal_Open()

void SCR_ChatPanel.Internal_Open ( )

Don't call it yourself, use SCR_ChatPanelManager instead.

◆ IsOpen()

bool SCR_ChatPanel.IsOpen ( )

◆ OnHUDResize()

void SCR_ChatPanel.OnHUDResize ( int  newMessageLineCount)

Adjust the amount of messages shown when the size of the HUD changes.

◆ OnUpdateChat()

void SCR_ChatPanel.OnUpdateChat ( float  timeSlice)

This must be called for chat to work. Typically it should be called from HUD Manager or from Menu.

◆ SendMessage()

void SCR_ChatPanel.SendMessage ( )
protected

◆ SetActiveChannel()

void SCR_ChatPanel.SetActiveChannel ( notnull BaseChatChannel  channel,
string  ReceiverName = string::Empty 
)
protected

Switches channels and replaces the channel tag.

◆ ShowChannelWarning()

void SCR_ChatPanel.ShowChannelWarning ( BaseChatChannel  Chatchannel = null,
string  message = "" 
)
protected

◆ UpdateChatMessages()

void SCR_ChatPanel.UpdateChatMessages ( )
protected

◆ VerifyChannelStyles()

void SCR_ChatPanel.VerifyChannelStyles ( )
protected

Member Data Documentation

◆ m_ActiveChannel

BaseChatChannel SCR_ChatPanel.m_ActiveChannel
protected

◆ m_aMessageLines

ref array<SCR_ChatMessageLineComponent> SCR_ChatPanel.m_aMessageLines = {}
protected

◆ m_bAlwaysVisible

bool SCR_ChatPanel.m_bAlwaysVisible
protected

◆ m_bHistoryMode

bool SCR_ChatPanel.m_bHistoryMode = false
protected

◆ m_bOpen

bool SCR_ChatPanel.m_bOpen = false
protected

◆ m_ChatEntity

ScriptedChatEntity SCR_ChatPanel.m_ChatEntity
protected

◆ m_DirectChannelStyle

ref SCR_ChatMessageStyle SCR_ChatPanel.m_DirectChannelStyle

◆ m_FactionChannelStyle

ref SCR_ChatMessageStyle SCR_ChatPanel.m_FactionChannelStyle

◆ m_fFadeOutThreshold_s

float SCR_ChatPanel.m_fFadeOutThreshold_s
protected

◆ m_GlobalChannelStyle

ref SCR_ChatMessageStyle SCR_ChatPanel.m_GlobalChannelStyle

◆ m_GroupChannelStyle

ref SCR_ChatMessageStyle SCR_ChatPanel.m_GroupChannelStyle

◆ m_iHistoryId

int SCR_ChatPanel.m_iHistoryId = 0
protected

◆ m_iHistoryIdLowestMessage

int SCR_ChatPanel.m_iHistoryIdLowestMessage = 0
protected

◆ m_iMessageLineCount

int SCR_ChatPanel.m_iMessageLineCount
protected

◆ m_LocalChannelStyle

ref SCR_ChatMessageStyle SCR_ChatPanel.m_LocalChannelStyle

◆ m_MessageEditBoxComponent

EditBoxFilterComponent SCR_ChatPanel.m_MessageEditBoxComponent

◆ m_MessageHistoryAnimator

ref SCR_FadeInOutAnimator SCR_ChatPanel.m_MessageHistoryAnimator

◆ m_OnChatClosed

ref ScriptInvoker SCR_ChatPanel.m_OnChatClosed
protected

◆ m_OnChatOpen

ref ScriptInvoker SCR_ChatPanel.m_OnChatOpen
protected

◆ m_RadioProtocolStyle

ref SCR_ChatMessageStyle SCR_ChatPanel.m_RadioProtocolStyle

◆ m_sChatMessageLineLayout

ResourceName SCR_ChatPanel.m_sChatMessageLineLayout
protected

◆ m_SystemChannelStyle

ref SCR_ChatMessageStyle SCR_ChatPanel.m_SystemChannelStyle

◆ m_VehicleChannelStyle

ref SCR_ChatMessageStyle SCR_ChatPanel.m_VehicleChannelStyle

◆ m_Widgets

ref SCR_ChatPanelWidgets SCR_ChatPanel.m_Widgets = new SCR_ChatPanelWidgets()
protected

◆ m_wRoot

Widget SCR_ChatPanel.m_wRoot
protected

◆ STR_AVAILABLE_CHANNELS

const string SCR_ChatPanel.STR_AVAILABLE_CHANNELS = "#AR-Chat_AvailableChannels"
staticprotected

◆ STR_CHANNEL_DISABLED

const string SCR_ChatPanel.STR_CHANNEL_DISABLED = "#AR-Chat_ChannelDisabled"
staticprotected

◆ STR_CHANNEL_UNKNOWN

const string SCR_ChatPanel.STR_CHANNEL_UNKNOWN = "#AR-Chat_ChannelUnknown"
staticprotected

◆ STR_MESSAGE_LIMIT_REACHED

const string SCR_ChatPanel.STR_MESSAGE_LIMIT_REACHED = "#AR-Chat_LimitReached"
staticprotected

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