Download
(11 Kb)
Download
Updated: 01/03/24 10:57 AM
Pictures
File Info
Compatibility:
Endless Archive (9.2.5)
Updated:01/03/24 10:57 AM
Created:03/18/23 10:59 AM
Monthly downloads:189
Total downloads:2,512
Favorites:3
MD5:
Custom gamepad button glyphs
Version: 1.0.1
by: 13xforever [More]
Dependencies
Description
This addon will allow you to change gamepad button prompts for xinput-compatible devices to one of the few built-in options that are not available through normal means.

Currently TESO ships with six additional controller textures: Xbox Series S|X, DualShock 4, DualSense, Switch Pro, and Stadia (plus a weird PlayStation 4 variant).

Notes
AddOn settings are only available in keyboard & mouse menus, and you may have to change selection a couple times for preview to start updating (these are current limitations of the menu library).

Controller mapping may show cached button glyphs until you restart the UI (/reloadui). Button bindings sometimes also show cached glyphs, but they should update if you move your mouse over them.

Source Code
Source code is available on GitHub.
v1.0.1
Minor internal code changes
Optional Files (0)


Archived Files (1)
File Name
Version
Size
Uploader
Date
1.0
11kB
13xforever
03/18/23 10:59 AM


Post A Reply Comment Options
Unread 01/03/24, 12:01 PM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4979
File comments: 6039
Uploads: 78
It's no bug so I did not raise any bug report for it.
It's just a leaking global variable _G["Set"], no matter if lua itsself would use Set already (even worse then if you redefine and overwrite it?!).
If any other addon uses a local function or variable Set your global would overwrite it and destroy that other addon's code.
That was my concern.

btw no reason to answer that "snippy", if someone reports or asks you to change something to make it work "for all of us here"
It's not about making me sleep better but making your addon not destroying other addons -> Make all compatible here.
Thanks for your change



Originally Posted by 13xforever
Originally Posted by Baertram
Hi,
please fix you globally leaking function name Set and make it local!
I currently will overwrite all other addon/vanilla code variables with name Set as you have not added the function to your global variable ButtonsManager (which neither is unique and should be renamed!) nor have provided any unqiue name.
Set is a pretty standard name and implementation straight from the official LUA documentation, but if it'll make you sleep easier, I'll update the code (I would've done it much faster if you posted an issue on the repo and not here in the comments, which I do not read often).
Last edited by Baertram : 01/04/24 at 05:34 AM.
Report comment to moderator  
Reply With Quote
Unread 01/03/24, 10:32 AM  
13xforever
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 1
Uploads: 1
Originally Posted by Baertram
Hi,
please fix you globally leaking function name Set and make it local!
I currently will overwrite all other addon/vanilla code variables with name Set as you have not added the function to your global variable ButtonsManager (which neither is unique and should be renamed!) nor have provided any unqiue name.
Set is a pretty standard name and implementation straight from the official LUA documentation, but if it'll make you sleep easier, I'll update the code (I would've done it much faster if you posted an issue on the repo and not here in the comments, which I do not read often).
Last edited by 13xforever : 01/03/24 at 10:32 AM.
Report comment to moderator  
Reply With Quote
Unread 08/25/23, 12:26 PM  
ldenixl

Forum posts: 0
File comments: 4
Uploads: 0
Im using this because no matter what i do i always get xbox buttons shown but i have ps5 controller and therefore want ps buttons. This addon works great only thing i noticed is the gamepad ui login screen and the scrying interface still have xbox buttons
Report comment to moderator  
Reply With Quote
Unread 07/22/23, 06:11 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4979
File comments: 6039
Uploads: 78
Hi,
please fix you globally leaking function name Set and make it local!
I currently will overwrite all other addon/vanilla code variables with name Set as you have not added the function to your global variable ButtonsManager (which neither is unique and should be renamed!) nor have provided any unqiue name.

Variables not defined local are all global within lua and thus will overwrite other variables with same name.

Thanks for checking your code and adding more locals OR use best practive:
define 1 global table variable with unique name = your addon name, and add all variables and functions to it then.


Lua Code:
  1. CustomGamepadButtons = {
  2.  ...
  3. }
  4.  
  5. function CustomGamepadButtons.Set(...)
  6. end
  7. local Set = CustomGamepadButtons.Set

For example
Last edited by Baertram : 07/22/23 at 06:12 AM.
Report comment to moderator  
Reply With Quote
Unread 06/07/23, 03:55 PM  
Elvis King

Forum posts: 2
File comments: 40
Uploads: 0
Thanks !

Very nice !
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: