Thread: pChat
View Single Post
09/29/19, 07:29 AM   #4
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,980
Inside this function there are checked 2 settings from the table db, which is the SavedVariables of pChat where your settings are stored:

Lua Code:
  1. local function MinimizeChatInMenus()
  2.  
  3.     -- RegisterCallback for Maximize/Minimize chat when entering/leaving scenes
  4.     -- "hud" is base scene (with "hudui")
  5.     local hudScene = SCENE_MANAGER:GetScene("hud")
  6.     hudScene:RegisterCallback("StateChange", function(oldState, newState)
  7.  
  8.         if db.chatMinimizedInMenus then
  9.             if newState == SCENE_HIDDEN and SCENE_MANAGER:GetNextScene():GetName() ~= "hudui" then
  10.                 CHAT_SYSTEM:Minimize()
  11.             end
  12.         end
  13.        
  14.         if db.chatMaximizedAfterMenus then
  15.             if newState == SCENE_SHOWING then
  16.                 CHAT_SYSTEM:Maximize()
  17.             end
  18.         end
  19.        
  20.     end)
  21.    
  22. end

They should be located somehwere below "new chat text color" and "transparency".

So there need to be at least the 2 settings chatMinimizedInMenus and chatMaximizedAfterMenus .
Search for them in the pChat settings please and if you set them to the way you like them your problems should be solved

If not - try to do the following:
Change the function MinimizeChatInMenus to this:

Lua Code:
  1. local function MinimizeChatInMenus()
  2. --[[
  3.     -- RegisterCallback for Maximize/Minimize chat when entering/leaving scenes
  4.     -- "hud" is base scene (with "hudui")
  5.     local hudScene = SCENE_MANAGER:GetScene("hud")
  6.     hudScene:RegisterCallback("StateChange", function(oldState, newState)
  7.  
  8.         if db.chatMinimizedInMenus then
  9.             if newState == SCENE_HIDDEN and SCENE_MANAGER:GetNextScene():GetName() ~= "hudui" then
  10.                 CHAT_SYSTEM:Minimize()
  11.             end
  12.         end
  13.        
  14.         if db.chatMaximizedAfterMenus then
  15.             if newState == SCENE_SHOWING then
  16.                 CHAT_SYSTEM:Maximize()
  17.             end
  18.         end
  19.        
  20.     end)
  21. ]]
  22.    
  23. end

Added --[[ at the beginning and the closing ]] at the end so this is only a comment and not run code! But the 2 settings should solve your problem and there should be no need to comment this function then.
  Reply With Quote