# ChatTabs Chat tabs refer to the tabs/buttons that are below the {ref}`Chat` box. You can use these to change the current chat being viewed. ```{figure} ../../images/chattabs.png ``` - - - ## ERSChatTab ```pascal ERSChatTab = enum(NONE, ALL, GAME, PUBLIC_, PRIVATE_, CHANNEL, CLAN, TRADE); ``` Enum representing each of the chat tabs available. - - - ## ERSChatTabState ```pascal ERSChatTabState = (NONE, ENABLED, FILTERED, DISABLED, HIDE, AUTOCHAT); ``` Enum representing each of the filters a chat tab can have. You can see the filters when you right click the tab: ```{figure} ../../images/chattab_filter.png ``` - - - ## TRSChatTab Helper record to interact with a tab. - - - ## TRSChatTabs Record responsible with interacting with the {ref}`ChatTabs`. In {ref}`TRSChat` you have a `Tabs` variable of this type. - - - ## Chat.Tabs.SetupInterface ```pascal procedure TRSChatTabs.SetupInterface(); ``` Internal method used to setup the {ref}`TRSChatTabs` coordinates. This is automatically called for you on the {ref}`Chat.Tabs variable`. - - - ## Chat.Tabs.Get ```pascal function TRSChatTabs.Get(tab: ERSChatTab): TRSChatTab; ``` Returns the {ref}`TRSChatTab` that is represented by the specified {ref}`ERSChatTab`. This is mostly for internal use. Example: ```pascal WriteLn Chat.Tabs.Get(ERSChatTab.GAME); ``` - - - ## Chat.Tabs.GetActive ```pascal function TRSChatTabs.GetActive(): ERSChatTab; ``` Returns the {ref}`TRSChatTab` that is active right now. Example: ```pascal WriteLn Chat.Tabs.GetActive(); ``` - - - ## Chat.Tabs.IsActive ```pascal function TRSChatTabs.IsActive(tab: ERSChatTab): Boolean; ``` Returns True/False if the specified {ref}`ERSChatTab` is active right now. Example: ```pascal WriteLn Chat.Tabs.IsActive(ERSChatTab.ALL); ``` - - - ## Chat.Tabs.Open ```pascal function TRSChatTabs.Open(tab: ERSChatTab): Boolean; ``` Attempts to open the specified {ref}`ERSChatTab`. Example: ```pascal WriteLn Chat.Tabs.Open(ERSChatTab.ALL); ``` - - - ## Chat.Tabs.GetState ```pascal function TRSChatTabs.GetState(tab: ERSChatTab): ERSChatTabState; ``` Returns the {ref}`ERSChatTabState` of the specified {ref}`ERSChatTab`. Example: ```pascal WriteLn Chat.Tabs.GetState(ERSChatTab.PUBLIC_); ``` - - - ## Chat.Tabs.ChangeState ```pascal function TRSChatTabs.ChangeState(tab: ERSChatTab; state: ERSChatTabState): Boolean; ``` Attempts to change the state of the specified {ref}`ERSChatTab` to the specified {ref}`ERSChatTabState`. Example: ```pascal WriteLn Chat.Tabs.GetState(ERSChatTab.PUBLIC_, ERSChatTabState.ENABLED); ```