ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   AddOn Search/Requests (https://www.esoui.com/forums/forumdisplay.php?f=165)
-   -   Request - Hide Chat Bubble Icon (https://www.esoui.com/forums/showthread.php?t=10705)

Rex87 10/04/23 01:33 AM

Request - Hide Chat Bubble Icon
 
2 Attachment(s)
hi, I wanna hide this white chat bubble icon, it's part of the controller UI, personally I would just make blank texture and replace it to just hide it this way but sadly it's not as easy, I don't know how to code in Lua to create AddOn that does just that so I'm asking for help, I hope that it's possible to hide this icon permanently because it's really distracting and there are no option in game and in the config file that hides it, personally I like the simplistic Console UI and I prefer it over the PC UI so that's why I'm trying to hide it

DakJaniels 10/04/23 06:09 AM

Quote:

Originally Posted by Rex87 (Post 48566)
hi, I wanna hide this white chat bubble icon, it's part of the controller UI, personally I would just make blank texture and replace it to just hide it this way but sadly it's not as easy, I don't know how to code in Lua to create AddOn that does just that so I'm asking for help, I hope that it's possible to hide this icon permanently because it's really distracting and there are no option in game and in the config file that hides it, personally I like the simplistic Console UI and I prefer it over the PC UI so that's why I'm trying to hide it

Lua Code:
  1. ZO_GamepadTextChatChatBubble:SetAlpha(0)

hmm, doesn't stay if you tab out to another screen.


Baertram 10/04/23 08:01 AM

You can try

/script RedirectTexture("EsoUI/Art/HUD/Gamepad/gp_HUDNotification_notification.dds", "")

-> Found here: https://github.com/esoui/esoui/blob/...L45C66-L45C123

Or add that line into any other addon's EVENT_ADD_ON_LOADED callback function (without the /script)

But this will make the bubble disappear game wide then, wherever it was used.


Or try this:
Lua Code:
  1. SecurePostHook(GAMEPAD_CHAT_SYSTEM, "Minimize", function()  
  2.     local self = GAMEPAD_CHAT_SYSTEM
  3.         if self.newChatFadeAnim and self.newChatFadeAnim:IsPlaying() then self.newChatFadeAnim:Stop() end
  4.         self.chatBubble:SetAlpha(0)
  5. end)
Should make it invisible as the chat minimizes.


This is the OnChatMaximize code then, which should show it again:
https://github.com/esoui/esoui/blob/...314C58-L314C69



Put that code in any addon's EVENT_ADD_ON_LOADED callback like this:
Lua Code:
  1. local function OnAddonLoaded(event, name)
  2.    if name == "MyAddonName" then
  3.        EVENT_MANAGER:UnregisterForEvent("MyAddonName", EVENT_ADD_ON_LOADED)
  4.  
  5.       SecurePostHook(GAMEPAD_CHAT_SYSTEM, "Minimize", function()  
  6.          local self = GAMEPAD_CHAT_SYSTEM
  7.          if self.newChatFadeAnim and self.newChatFadeAnim:IsPlaying() then self.newChatFadeAnim:Stop() end
  8.          self.chatBubble:SetAlpha(0)
  9.       end)
  10.    end
  11.  
  12.  --Or strip the above code and add the RedirectTexture here to remove the chat bubble texture in total -> ESO game wide!
  13. end
  14. EVENT_MANAGER:RegisterForEvent("MyAddonName", EVENT_ADD_ON_LOADED, OnAddonLoaded)

Rex87 10/04/23 06:02 PM

thank you all for the help I had trouble figuring out how to make this work and with help of someone, I got this, it makes the icon completely dissappear but appears again when my companion says something even when subtitles are turned off, it's very random tho, and doesn't go away after that, I don't know why this happens, reloading UI fixes that but will reappear anyway
Code:

deleteIcon={}
deleteIcon.name="GamepadChatIconBegone"
function deleteIcon.begone()
GAMEPAD_CHAT_SYSTEM.chatBubble:SetAlpha(0)
EVENT_MANAGER:UnregisterForEvent(deleteIcon.name,EVENT_ADD_ON_LOADED)
SecurePostHook(GAMEPAD_CHAT_SYSTEM, "remove", function()
GAMEPAD_CHAT_SYSTEM.chatBubble:SetAlpha(0)
end)
end
EVENT_MANAGER:RegisterForEvent(deleteIcon.name,EVENT_ADD_ON_LOADED,deleteIcon.begone)

as I said this is just temporary fix still

Baertram 10/05/23 06:10 AM

I never heard of the function
GAMEPAD_CHAT_SYSTEM, "remove" :confused:

nor KEYBOARD_CHAT_SYSTEM, nor the base ZO_ChatSystem does provide that function
So I'm not sure if your hook here ever works "normal".

btw: Better set a local up in front of deleteIcon please, or else you will overwrite other addon's using this variable already.
The name is not unique enough to eb global!
Or rename that to a more unique global variable like GamepadChatIconBegone


Question:
When exactly do you want the bubble to disappear?

Always: Then try my RedirectTexture hack!

Only after chat minimizes and there are no new messages, until new messages come in: Then use my SecurePostHook(GAMEPAD_CHAT_SYSTEM, "Minimize", function() idea.

If you do not want the chat bubble to reappear you need to disable the chat tab options for chat channels like NPC talk.
As gamepad mode does not provide that switch to keyboard mode, right click the most left chat tab, choose preferences and disable the chat channel for NPC talk e.g.
Then switch back to gamepad mode.

It should no longer show you and NPCs text in the chat then, and only messages from zone/say/yell etc. (the channels YOU have configured for that chat tab) will be shown in chat and should raise the bubble to reappear again (if not using the RedirectTexture hack which should it hide always), to show you there are new messages.

Rex87 10/05/23 10:47 AM

I tried this and works, it makes it fully hidden even when the chat is visible but even while NPCs text in chat is invisible it will reappear whenever they talk, I can hide it manually by opening the chat and waiting till it hides, is there a way to make it hide all the time? or something that could check if the icon is showing and if it's showing it would hide it automatically without manually opening the chat to hide it? I wanna hide it permanently like RedirectTexture does but the other way creates other issues and many other UI elements become invisible not just the chat bubble icon which is very upsetting
Code:

local function OnAddonLoaded(event, name)
  if name == "GamepadChatIconBegone" then
      EVENT_MANAGER:UnregisterForEvent("GamepadChatIconBegone", EVENT_ADD_ON_LOADED)
 
      SecurePostHook(GAMEPAD_CHAT_SYSTEM, "Minimize", function() 
        local self = GAMEPAD_CHAT_SYSTEM
        if self.newChatFadeAnim and self.newChatFadeAnim:IsPlaying() then self.newChatFadeAnim:Stop() end
        self.chatBubble:SetAlpha(0)
      end)
  end
 

end
EVENT_MANAGER:RegisterForEvent("GamepadChatIconBegone", EVENT_ADD_ON_LOADED, OnAddonLoaded)


Baertram 10/05/23 12:50 PM

Code:

local function OnAddonLoaded(event, name)
  if name == "GamepadChatIconBegone" then
      EVENT_MANAGER:UnregisterForEvent("GamepadChatIconBegone", EVENT_ADD_ON_LOADED)
 
    RedirectTexture("EsoUI/Art/HUD/Gamepad/gp_HUDNotification_notification.dds", "")
  end
 end
EVENT_MANAGER:RegisterForEvent("GamepadChatIconBegone", EVENT_ADD_ON_LOADED, OnAddonLoaded)

This should make the texture go away for all stuff in the game, so no matetr if it shws or not, it will just be invisible.
If you see a white square now instead we need to find a see-through texture and replace "" above with that name then.

Other UI elements will not get invisible that way as we only replace the 1 texture "EsoUI/Art/HUD/Gamepad/gp_HUDNotification_notification.dds"
And according to esui source code of the game it's ONLY used here, at gamepad and console stuff:


Quote:

Originally Posted by Rex87 (Post 48572)
I tried this and works, it makes it fully hidden even when the chat is visible but even while NPCs text in chat is invisible it will reappear whenever they talk, I can hide it manually by opening the chat and waiting till it hides, is there a way to make it hide all the time? or something that could check if the icon is showing and if it's showing it would hide it automatically without manually opening the chat to hide it? I wanna hide it permanently like RedirectTexture does but the other way creates other issues and many other UI elements become invisible not just the chat bubble icon which is very upsetting
Code:

local function OnAddonLoaded(event, name)
  if name == "GamepadChatIconBegone" then
      EVENT_MANAGER:UnregisterForEvent("GamepadChatIconBegone", EVENT_ADD_ON_LOADED)
 
      SecurePostHook(GAMEPAD_CHAT_SYSTEM, "Minimize", function() 
        local self = GAMEPAD_CHAT_SYSTEM
        if self.newChatFadeAnim and self.newChatFadeAnim:IsPlaying() then self.newChatFadeAnim:Stop() end
        self.chatBubble:SetAlpha(0)
      end)
  end
 

end
EVENT_MANAGER:RegisterForEvent("GamepadChatIconBegone", EVENT_ADD_ON_LOADED, OnAddonLoaded)



Rex87 10/05/23 01:10 PM

1 Attachment(s)
it works, it's not showing up at all but this creates some issues in other parts of the UI
Code:

local function OnAddonLoaded(event, name)
  if name == "GamepadChatIconBegone" then
      EVENT_MANAGER:UnregisterForEvent("GamepadChatIconBegone", EVENT_ADD_ON_LOADED)
 
    RedirectTexture("EsoUI/Art/HUD/Gamepad/gp_HUDNotification_notification.dds", "")
  end
 end
EVENT_MANAGER:RegisterForEvent("GamepadChatIconBegone", EVENT_ADD_ON_LOADED, OnAddonLoaded)

is there way to just replace this texture with blank texture? maybe this way it will be finally hidden, this shouldn't make other things invisible like that too

Baertram 10/05/23 02:19 PM

I'm not sure if this is related to the chat bubble here... Please disable ALL addons except your chat bubble redirect texture.
Does it still look the same?

Cuz the chat bubble is a totally different UI part and another scene than inventory (not connected by any means).

Rex87 10/05/23 02:52 PM

1 Attachment(s)
just the RedirectTexture, no other mods, still happening, not just the background is missing but also the chat helper line is missing, so I don't know when and where I'm typing in the chat, can't we edit the file that contains the texture and replace it this way? I see that textures are in DDS files, other UI mods have such files but I don't know where the game contains these texture files to edit them

Baertram 10/06/23 02:34 AM

I'll see if I can find a see-through .dds somewhere in esoui default textures so the size remains the same.
Edit:
Found one

RedirectTexture("EsoUI/Art/HUD/Gamepad/gp_HUDNotification_notification.dds", "/esoui/art/icons/heraldrycrests_misc_blank_01.dds")

Rex87 10/08/23 07:49 PM

thank you, this time this actually worked, RedirectTexture this time didn't made other elements invisible like before, decided to leave rest of the code to make sure that it will stay invisible even if it's not really needed, I hope that future requests gonna be easier and not as time consuming as this was
Code:

local function OnAddonLoaded(event, name)
  if name == "GamepadChatIconBegone" then
      EVENT_MANAGER:UnregisterForEvent("GamepadChatIconBegone", EVENT_ADD_ON_LOADED)
 
      SecurePostHook(GAMEPAD_CHAT_SYSTEM, "Minimize", function() 
        local self = GAMEPAD_CHAT_SYSTEM
        if self.newChatFadeAnim and self.newChatFadeAnim:IsPlaying() then self.newChatFadeAnim:Stop() end
        self.chatBubble:SetAlpha(0)
      end)
  end
 
RedirectTexture("EsoUI/Art/HUD/Gamepad/gp_HUDNotification_notification.dds", "/esoui/art/icons/heraldrycrests_misc_blank_01.dds")
end
EVENT_MANAGER:RegisterForEvent("GamepadChatIconBegone", EVENT_ADD_ON_LOADED, OnAddonLoaded)

Quote:

Originally Posted by Baertram (Post 48578)
I'll see if I can find a see-through .dds somewhere in esoui default textures so the size remains the same.
Edit:
Found one

RedirectTexture("EsoUI/Art/HUD/Gamepad/gp_HUDNotification_notification.dds", "/esoui/art/icons/heraldrycrests_misc_blank_01.dds")


Baertram 10/09/23 02:14 AM

You are welcome, glad it worked now :D

btw, I'd remove these extra code lines by commenting them:

Lua Code:
  1. --[[
  2. SecurePostHook(GAMEPAD_CHAT_SYSTEM, "Minimize", function()  
  3.          local self = GAMEPAD_CHAT_SYSTEM
  4.          if self.newChatFadeAnim and self.newChatFadeAnim:IsPlaying() then self.newChatFadeAnim:Stop() end
  5.          self.chatBubble:SetAlpha(0)
  6.       end)
  7. ]]

That way you still got them in and can spy them but they are not used (they are simply not needed and every non needed but run code slows down the game, and might create problems, so better strip it).


All times are GMT -6. The time now is 05:33 PM.

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