ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   How to create a chat tab programmatically (https://www.esoui.com/forums/showthread.php?t=2503)

klaro00 12/07/14 08:48 AM

How to create a chat tab programmatically
 
Hi,

when I add a chat tab using function AddChatContainerTab() I notice that the new tab is NOT shown until the GUI is reloaded. How can I force its visibility?

Regards,
Klaro

merlight 12/07/14 09:15 AM

function SharedChatContainer:AddWindow(name)

This should create the tab and window controls, it also calls AddChatContainerTab.

Garkin 12/07/14 09:26 AM

AddChatContainerTab(containerId, name, isCombatLog) is just one of the functions you have to call to make new chat window (tab) working. This will only create settings for the window, but it does not update chat system.

CHAT_SYSTEM itself uses CreateNewChatTab method, but it will also show options for the new window, so you might want to use just chatContainer:AddWindow, see examples below:

Lua Code:
  1. local container = CHAT_SYSTEM.primaryContainer
  2.  
  3. --this command creates a new chat window and displays tab options:
  4. CHAT_SYSTEM:CreateNewChatTab(container)
  5.  
  6. --this command creates a new chat window but does not display options:
  7. local name = "New Tab"
  8. container:AddWindow(name)

klaro00 12/07/14 10:31 AM

Thank you, that works perfectly!


All times are GMT -6. The time now is 08:11 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI