ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   AddOn Search/Requests (https://www.esoui.com/forums/forumdisplay.php?f=165)
-   -   Action Bar Scaling (https://www.esoui.com/forums/showthread.php?t=8997)

SimplyArmin 02/28/20 03:03 AM

Action Bar Scaling
 
Is there an addon or possibility to keep the default scale size of the action bar but downscale everything else?

SimplyArmin 02/29/20 06:06 AM

Quote:

Originally Posted by SimplyArmin (Post 40396)
Is there an addon or possibility to keep the default scale size of the action bar but downscale everything else?

Since there's no answer yet i gonna ask another question. :confused:

Is it even possible to change the ingame "Custom Scale" to the lowest and revert only the "Action Bar" scale back to default?

sirinsidiator 02/29/20 06:16 AM

Yes, you can change the scale of any control independently.
Try to type "/script ZO_ActionBar1:SetScale(2)" in chat and it should appear twice as big.
Once you found a number that you like, just put it (without "/script" ofc) into an addon file and you are done.

SimplyArmin 02/29/20 06:34 AM

Quote:

Originally Posted by sirinsidiator (Post 40405)
Yes, you can change the scale of any control independently.
Try to type "/script ZO_ActionBar1:SetScale(2)" in chat and it should appear twice as big.
Once you found a number that you like, just put it (without "/script" ofc) into an addon file and you are done.

Thank you very much!
Gonna try it out

Ponnjie 04/28/23 03:00 AM

Quote:

Originally Posted by sirinsidiator (Post 40405)
Yes, you can change the scale of any control independently.
Try to type "/script ZO_ActionBar1:SetScale(2)" in chat and it should appear twice as big.
Once you found a number that you like, just put it (without "/script" ofc) into an addon file and you are done.

How do you add that line into an addon file?

Baertram 04/28/23 03:31 AM

Choose any addon's main lua file, search for the EVENT_ADD_ON_LOADED line.
At this event the game loads this addon and changing the actionabr or other controls before might bring an error.

It will look like this e.g.
Code:

EVENT_MANAGER:RegisterForEvent("NameOfAddonHere", EVENT_ADD_ON_LOADED, functionName)
functionName is either a name of a callback function used in that addon OR it is defined there directly as anonymous fucntion like this
Code:

function(eventId, addOnName)
 --something is done here
end


Inside that functionName function the code of the addon will be executed as the addon loads.
It normally starts with something like a comparison of the addon name to the parameter "addOnName" of that function.

e.g.

Lua Code:
  1. if "MyAddonName" ~= addOnName then return end


This is done as the event triggers for EACH active addon once! And only the current addon's call should be processed here in this addon file.
So at the end of that function functionName you can try to add that script, without the /script though as we are in a lua script already.

So your function functionName would look like this e.g. in the end:

Lua Code:
  1. function MyAddon.OnEventAddonLoaded(eventId, addOnName)
  2.    if "MyAddonName" ~= addOnName then return end
  3.    --other code here
  4.    ZO_ActionBar1:SetScale(2)
  5. end

or like this:
Lua Code:
  1. local function OnEventAddonLoaded(eventId, addOnName)
  2.    if "MyAddonName" == addOnName then
  3.       --other code here
  4.       ZO_ActionBar1:SetScale(2)
  5.    end
  6. end

or like this if it's an anonymous function directly in the EVENT_MANAGER:RegisterForEvent line:
Lua Code:
  1. EVENT_MANAGER:RegisterForEvent("NameOfAddonHere", EVENT_ADD_ON_LOADED, function(eventId, addOnNam)
  2.    if "MyAddonName" == addOnName then
  3.       --other code here
  4.       ZO_ActionBar1:SetScale(2)
  5.    end
  6. end)

Tiara Ra 12/16/23 01:21 AM

If i using script (/script ZO_ActionBar1:SetScale(2)) in chat and jump to another location after, my action bar like it:
https://imgur.com/a/3LgXGbu

No any addons.

How i can fix it?

Baertram 12/16/23 08:18 AM

/script ZO_ActionBar1:SetScale(1)

:confused:

Tiara Ra 12/16/23 10:15 AM

Quote:

Originally Posted by Baertram (Post 49043)
/script ZO_ActionBar1:SetScale(1)

:confused:

but it will return size of action bar to default. I need to increase size

Baertram 12/16/23 04:36 PM

Sorry, you asked how to fix that after jumping to a new zone.
So I assumed you wanted to know how to resize it to normal.
What if you just repeat /script ZO_ActionBar1:SetScale(2) after zoning?

Or first /script ZO_ActionBar1:SetScale(1) and afterwards /script ZO_ActionBar1:SetScale(2) ?


If chaning to scale 1 and then scale 2 fixes it you can add it directly to any addOn's
EVENT_PLAYER_ACTIVATED event call back via

This event will be loaded after login and after each zoning, or reloadui

Lua Code:
  1. EVENT_MANAGER:RegisterForEvent("NameOfAddonHere", EVENT_PLAYER_ACTIVATED , function(eventId)
  2.    ZO_ActionBar1:SetScale(1)
  3.    ZO_ActionBar1:SetScale(2)
  4. end)


All times are GMT -6. The time now is 01:54 PM.

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