ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   Disable "earned by" tooltip for AwA (https://www.esoui.com/forums/showthread.php?t=10098)

ExoY 03/15/22 06:16 AM

Disable "earned by" tooltip for AwA
 
Hey guys,
i am looking for a way to disable the popup tooltip "earned by xxx" when overing over an achievement with the new AwA system. So far I havent had any luck and am hoping somebody here can point me in the right direction :)

Regards,
ExoY

NeuroticPixels 03/15/22 07:07 AM

https://www.esoui.com/downloads/info...ievements.html

ExoY 03/15/22 08:19 AM

This is not quite accomplishing what i am looking for.

I want to disable the pop-up tooltip that shows who erned an achivement when hovering over it, not the tooltip text within the achivements description.

I just tried out the addon you referred to an the pop up tooltip is still there.


Edit: i just check the vanilla game and it looks like the ingame "earned by" description text with the addons was actually removed by default and replaced by the pop up one. (except when indicated by "recent achivements)

Baertram 03/15/22 08:27 AM

The text "earned by" is this string constant:
"Earned by: <<1>>", -- SI_ACHIEVEMENT_EARNED_FORMATTER

If you search in the code for SI_ACHIEVEMENT_EARNED_FORMATTER you might find the place where it can be removed:
https://github.com/esoui/esoui/blob/...ments.lua#L861

You can overwrite the string constant with an empty string so the text is not shown anymore:
Lua Code:
  1. SafeAddString(SI_ACHIEVEMENT_EARNED_FORMATTER, "", 2)
or re-use ZO_CreateStringId but adding a newer versin 2 should be enough.


Else the tooltip control of achievements are created here:

Could be this control:
https://github.com/esoui/esoui/blob/...ments.xml#L270

ZO_AchievementTooltip

Connected to lua here:
https://github.com/esoui/esoui/blob/...ents.lua#L1480

Object:
ACHIEVEMENTS.tooltip

Function showing it:
https://github.com/esoui/esoui/blob/...ents.lua#L1752
ACHIEVEMENTS:ShowAchievementDetailedTooltip

Lua Code:
  1. ZO_PreHook(ACHIEVEMENTS, "ShowAchievementDetailedTooltip", function(selfAchievements, id, anchor)
  2.   return true --suppress call to original function
  3. end)

#Not tested, hope it works and was the correct one :p

If this was not intended you could also try to prehook the function and change the data in the function accordingly to your needs:

Lua Code:
  1. function Achievements:ShowAchievementDetailedTooltip(id, anchor)
  2. end
  3. ZO_PreHook(ACHIEVEMENTS, "ShowAchievementDetailedTooltip", function(selfAchievements, id, anchor)
  4.     selfAchievements.tooltip.parentControl:ClearAnchors()
  5.     anchor:Set(selfAchievements.tooltip.parentControl)
  6.  
  7.     --local progress = GetAchievementProgress(id)
  8.     local progress = 0 --chanegd to always use 0
  9.     local timestamp = GetAchievementTimestamp(id)
  10.     selfAchievements.tooltip:Show(id, progress, timestamp)
  11.   return true --suppress call to original function
  12. end)

ExoY 03/15/22 08:33 AM

Thanks Baertram,

I will check it how but it does look promising.



Edit: ShowAchievementDetailedTooltip wasnt the correct one, but this one ended up doing the trick:

Lua Code:
  1. ZO_PreHook(Achievement, "RefreshTooltip", function()
  2.     return true
  3.   end)

but i didnt check, if it effects any other tooltips within the achievement context.

NeuroticPixels 03/15/22 01:38 PM

Maybe this one then?
https://www.esoui.com/downloads/info...nonymizer.html

tim99 03/24/22 08:00 PM

Quote:

Originally Posted by LoneStar2911 (Post 45482)


rofl
:D:D:D:D:D:D:D

NeuroticPixels 03/25/22 12:39 AM

Quote:

Originally Posted by tim99 (Post 45570)
rofl
:D:D:D:D:D:D:D

LOL!!!!! I just realized. :o
Also, I didn't realize they were probably asking so they could implement it into their own addon... that i linked... to them...
Derp.

Baertram 03/25/22 03:04 AM

:D Circle of life

ExoY 03/25/22 03:31 AM

Quote:

Originally Posted by LoneStar2911 (Post 45574)
LOL!!!!! I just realized. :o
Also, I didn't realize they were probably asking so they could implement it into their own addon... that i linked... to them...
Derp.

Yeah :)
and i only wanted to make the addon if it not already exists :)

But i thought it was intentional that you posted my addon as a reference for anybody else stumbling upon this thread :)


All times are GMT -6. The time now is 11:46 PM.

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