Thread Tools Display Modes
04/30/23, 04:56 AM   #1
afxmac
Join Date: Dec 2021
Posts: 13
Making tooltips wider or reduce font size

Hi,

when playing on a low res HD screen, item tooltips easily get too tall to fit when a few addons also add info to the tooltip.

I found this old post that explains how to make them wider: https://forums.elderscrollsonline.co...n-item-tooltip

But it does not seem to affect the tooltips at all.

So I guess I am doing something wrong. Any ideas?
thx
afx
  Reply With Quote
04/30/23, 05:08 AM   #2
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
The code itself is working. I still do it that way.
What did you do?
  Reply With Quote
04/30/23, 05:17 AM   #3
afxmac
Join Date: Dec 2021
Posts: 13
I have put it in my own addon (and it loads without errors).
The settings in the init block is probably redundant, right?

Code:
afxSettings = {}
afxSettings.name = "afxSettings"

--  x.y ,xmax,ymax 
function afxSettings.Initialize()
	ItemTooltip:SetDimensionConstraints(600, 0, 600, 1080)
	ItemTooltip:SetScale(0.875)
	PopupTooltip:SetDimensionConstraints(600, 0, 600, 1080)
	ItemTooltip:SetScale(0.875)

	ComparativeTooltip1:SetDimensionConstraints(600, 0, 600, 8192)
	ComparativeTooltip2:SetDimensionConstraints(600, 0, 600, 8192)
	ComparativeTooltip1:SetScale(0.875)
	ComparativeTooltip2:SetScale(0.875)
end
 
function afxSettings.OnAddOnLoaded(event, addonName)
  if addonName == afxSettings.name then
    afxSettings.Initialize()
    EVENT_MANAGER:UnregisterForEvent(afxSettings.name, EVENT_ADD_ON_LOADED) 
  end
end
 
EVENT_MANAGER:RegisterForEvent(afxSettings.name, EVENT_ADD_ON_LOADED, afxSettings.OnAddOnLoaded)

ItemTooltip:SetDimensionConstraints(600, 0, 600, 1080)
ItemTooltip:SetScale(0.875)
PopupTooltip:SetDimensionConstraints(600, 0, 600, 1080)
ItemTooltip:SetScale(0.875)
ComparativeTooltip1:SetDimensionConstraints(600, 0, 600, 1080)
ComparativeTooltip2:SetDimensionConstraints(600, 0, 600, 1080)
ComparativeTooltip1:SetScale(0.875)
ComparativeTooltip2:SetScale(0.875)
And thanks for your wonderful addons!
afx
  Reply With Quote
04/30/23, 05:27 AM   #4
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Yes, the Initialize is redundant.
Are you sure the code is executed? Add some error to see, if the error popup is showing.

/edit: And Thank You

Last edited by votan : 04/30/23 at 05:35 AM.
  Reply With Quote
04/30/23, 05:35 AM   #5
afxmac
Join Date: Dec 2021
Posts: 13
I do see the addon in the loaded addons list.
I see no errros pop up. Any other place I should look?
thx
afx
  Reply With Quote
04/30/23, 05:40 AM   #6
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Verify your manifest.txt.
Is the Lua file written correctly without any trailing space?
  Reply With Quote
04/30/23, 05:50 AM   #7
afxmac
Join Date: Dec 2021
Posts: 13
Hmm, LUA is sensitive to trailing spaces? Ok, I nuked all of them. No change.
The text file is very simple:

Code:
## Title: afxSettings
## Description: Fix tooltip width
## Author: afx
## Version: 1.0
## APIVersion: 101037

afxSettings.lua
  Reply With Quote
04/30/23, 06:02 AM   #8
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
What is the output of
Code:
/script d(afxSettings ~= nil)
Should be true, but I except it to be false.
  Reply With Quote
04/30/23, 06:03 AM   #9
afxmac
Join Date: Dec 2021
Posts: 13
I get true.
  Reply With Quote
04/30/23, 06:15 AM   #10
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Maybe you are running LibDebugLogger?
  Reply With Quote
04/30/23, 06:16 AM   #11
afxmac
Join Date: Dec 2021
Posts: 13
I do, was a prereq for something.
Should this give me an extra log somewhere?
  Reply With Quote
04/30/23, 06:23 AM   #12
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Yes. but I would just disable it temporary to see if the error is shown.
  Reply With Quote
04/30/23, 06:27 AM   #13
afxmac
Join Date: Dec 2021
Posts: 13
Disabled Debuglogger, and reloaded the UI, no extra messages.
  Reply With Quote
04/30/23, 06:34 AM   #14
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Well, on one hand, it explains why there is no effect on the tooltips. On the other hand, I can not see why.
  Reply With Quote
04/30/23, 06:35 AM   #15
afxmac
Join Date: Dec 2021
Posts: 13
So at least I am not the only one who is puzzled....
  Reply With Quote
04/30/23, 06:45 AM   #16
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Try out https://www.esoui.com/downloads/info...tion.html#info

Maybe you will see, why the Lua file is not loaded.
  Reply With Quote
04/30/23, 07:04 AM   #17
afxmac
Join Date: Dec 2021
Posts: 13
I wish I understood what this tells me:
Code:
PS C:\bin> .\ESOGlobals.ps1 -Path 'C:\Users\afx\Documents\Elder Scrolls Online\live\AddOns\afxSettings'  -ParseXml      

Parse manifest C:\Users\afx\Documents\Elder Scrolls Online\live\AddOns\afxSettings\afxSettings.txt

afxSettings.lua
+        1 afxSettings
?        2 afxSettings
?        7 afxSettings
?        8 ItemTooltip
?        9 ItemTooltip
?       10 PopupTooltip
?       11 ItemTooltip
?       13 ComparativeTooltip1
?       14 ComparativeTooltip2
?       15 ComparativeTooltip1
?       16 ComparativeTooltip2
?       20 afxSettings
?       22 afxSettings
?       23 afxSettings
?       25 afxSettings
?       25 EVENT_ADD_ON_LOADED
?       25 EVENT_MANAGER
?       30 afxSettings
?       30 afxSettings
?       30 EVENT_ADD_ON_LOADED
?       30 EVENT_MANAGER
?       32 ItemTooltip
?       33 ItemTooltip
?       34 PopupTooltip
?       35 ItemTooltip
?       36 ComparativeTooltip1
?       37 ComparativeTooltip2
?       38 ComparativeTooltip1
?       39 ComparativeTooltip2
The docs seem to indicate I am setting the appropriate global variables.
  Reply With Quote
04/30/23, 10:27 AM   #18
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Correct. And the tooltips still have no effect??
What if you select the addon stand-alone?
  Reply With Quote
04/30/23, 04:34 PM   #19
afxmac
Join Date: Dec 2021
Posts: 13
Without any options?
This is what I get then:

Code:
afxSettings.lua
+        1 afxSettings
?        2 afxSettings
?        7 afxSettings
?        8 ItemTooltip
?        9 ItemTooltip
?       10 PopupTooltip
?       11 ItemTooltip
?       13 ComparativeTooltip1
?       14 ComparativeTooltip2
?       15 ComparativeTooltip1
?       16 ComparativeTooltip2
?       20 afxSettings
?       22 afxSettings
?       23 afxSettings
?       25 afxSettings
?       25 EVENT_ADD_ON_LOADED
?       25 EVENT_MANAGER
?       30 afxSettings
?       30 afxSettings
?       30 EVENT_ADD_ON_LOADED
?       30 EVENT_MANAGER
?       32 ItemTooltip
?       33 ItemTooltip
?       34 PopupTooltip
?       35 ItemTooltip
?       36 ComparativeTooltip1
?       37 ComparativeTooltip2
?       38 ComparativeTooltip1
?       39 ComparativeTooltip2
  Reply With Quote
05/01/23, 05:05 AM   #20
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,959
I think votan meant disable ALL other addons and libraries! Only load that one addon and library(s) needed.
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » Making tooltips wider or reduce font size

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off