Originally Posted by Baertram
Maybe this helps. Taken from the gamemenu scene source code " here"
Lua Code:
local wasChatMaximized local function OnShow(gameMenu) RebuildTree(gameMenu) wasChatMaximized = not CHAT_SYSTEM:IsMinimized() if wasChatMaximized then CHAT_SYSTEM:Minimize() end end local function OnHide(gameMenu) if wasChatMaximized and CHAT_SYSTEM:IsMinimized()then CHAT_SYSTEM:Maximize() end wasChatMaximized = nil end
Too bad it is local :-( But maybe you can use this code of CHAT_SYSTEM to simply hide (Minimize) /show (Maximize) the chat.
|
It is local, but if you take a look how those functions are used:
xml Code:
<GuiXml>
<Controls>
<TopLevelControl name="ZO_GameMenu_InGame" inherits="ZO_GameMenu_Template" hidden="true">
<OnInitialized>
ZO_GameMenu_InGame_Initialize(self)
</OnInitialized>
</TopLevelControl>
</Controls>
</GuiXml>
Lua Code:
function ZO_GameMenu_InGame_Initialize(self)
local GAME_MENU_INGAME = ZO_GameMenu_Initialize(self, OnShow, OnHide)
--some other code
end
Lua Code:
function ZO_GameMenu_Initialize(control, onShowFunction, onHideFunction)
local gameMenu = ZO_GameMenuManager:New(control)
control.OnShow = onShowFunction
control.OnHide = onHideFunction
control.gameMenu = gameMenu
return gameMenu
end
You can see, that there is a global reference to those functions:
Code:
ZO_GameMenu_InGame:OnShow()
ZO_GameMenu_InGame:OnHide()