ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   Making tooltips wider or reduce font size (https://www.esoui.com/forums/showthread.php?t=10529)

afxmac 04/30/23 04:56 AM

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

votan 04/30/23 05:08 AM

The code itself is working. I still do it that way.
What did you do?

afxmac 04/30/23 05:17 AM

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

votan 04/30/23 05:27 AM

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 :)

afxmac 04/30/23 05:35 AM

I do see the addon in the loaded addons list.
I see no errros pop up. Any other place I should look?
thx
afx

votan 04/30/23 05:40 AM

Verify your manifest.txt.
Is the Lua file written correctly without any trailing space?

afxmac 04/30/23 05:50 AM

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


votan 04/30/23 06:02 AM

What is the output of
Code:

/script d(afxSettings ~= nil)
Should be true, but I except it to be false.

afxmac 04/30/23 06:03 AM

I get true.

votan 04/30/23 06:15 AM

Maybe you are running LibDebugLogger?

afxmac 04/30/23 06:16 AM

I do, was a prereq for something.
Should this give me an extra log somewhere?

votan 04/30/23 06:23 AM

Yes. but I would just disable it temporary to see if the error is shown.

afxmac 04/30/23 06:27 AM

Disabled Debuglogger, and reloaded the UI, no extra messages.

votan 04/30/23 06:34 AM

Well, on one hand, it explains why there is no effect on the tooltips. On the other hand, I can not see why.

afxmac 04/30/23 06:35 AM

So at least I am not the only one who is puzzled....

votan 04/30/23 06:45 AM

Try out https://www.esoui.com/downloads/info...tion.html#info

Maybe you will see, why the Lua file is not loaded.

afxmac 04/30/23 07:04 AM

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.

votan 04/30/23 10:27 AM

Correct. And the tooltips still have no effect??
What if you select the addon stand-alone?

afxmac 04/30/23 04:34 PM

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


Baertram 05/01/23 05:05 AM

I think votan meant disable ALL other addons and libraries! Only load that one addon and library(s) needed.


All times are GMT -6. The time now is 03:18 AM.

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