ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   looking for a way to detect if ingame setting enabled (https://www.esoui.com/forums/showthread.php?t=10704)

sinnereso 10/01/23 10:51 PM

looking for a way to detect if ingame setting enabled
 
hey guys..

im looking for a way to boolean if social setting "PvP Kill Feed" is enabled or disabled, preferably a ZO_something if it exists similar to "ZO_ShouldPreferUserId()" but for the kill feed.

Ive been going through /zgoo but cant find either in there when mousing over the control.

Masteroshi430 10/02/23 01:32 AM

Quote:

Originally Posted by sinnereso (Post 48553)
hey guys..

im looking for a way to boolean if social setting "PvP Kill Feed" is enabled or disabled, preferably a ZO_something if it exists similar to "ZO_ShouldPreferUserId()" but for the kill feed.

Ive been going through /zgoo but cant find either in there when mousing over the control.

Just find the setting with
GetSetting_Bool(*[SettingSystemType|#SettingSystemType]* _system_, *integer* _settingId_)
** _Returns:_ *bool* _value_
?

SETTING_TYPE_UI
UI_SETTING_SHOW_PVP_KILL_FEED_NOTIFICATIONS

local ShowPvpKillFeedEnabled = GetSetting_Bool(SETTING_TYPE_UI, UI_SETTING_SHOW_PVP_KILL_FEED_NOTIFICATIONS)

sinnereso 10/02/23 09:13 AM

Quote:

Originally Posted by Masteroshi430 (Post 48554)
Just find the setting with
GetSetting_Bool(*[SettingSystemType|#SettingSystemType]* _system_, *integer* _settingId_)
** _Returns:_ *bool* _value_
?

SETTING_TYPE_UI
UI_SETTING_SHOW_PVP_KILL_FEED_NOTIFICATIONS

local ShowPvpKillFeedEnabled = GetSetting_Bool(SETTING_TYPE_UI, UI_SETTING_SHOW_PVP_KILL_FEED_NOTIFICATIONS)

Thank you bro thats perfect. I was digging around in zgoo for hours and couldn't find how to find that.

Baertram 10/02/23 12:54 PM

Quote:

Originally Posted by sinnereso (Post 48555)
Thank you bro thats perfect. I was digging around in zgoo for hours and couldn't find how to find that.

Check the ESOUI source code for that. How does ZOs do it.
e.g. move mouse above the settings entry and find out what the name of the control is.

Then find that control name, or ends of it, in the esoui sources.
And get to the code and aPi functions uses that way.

sinnereso 10/03/23 09:45 AM

Quote:

Originally Posted by Baertram (Post 48557)
Check the ESOUI source code for that. How does ZOs do it.
e.g. move mouse above the settings entry and find out what the name of the control is.

Then find that control name, or ends of it, in the esoui sources.
And get to the code and aPi functions uses that way.

kk ill check it.

Im considering something else maybe as well... Is there is SetSetting to change the ingame setting or just GetSetting? Ill poke around in a bit and see maybe.

Masteroshi430 10/03/23 12:42 PM

Quote:

Originally Posted by sinnereso (Post 48560)
kk ill check it.

Im considering something else maybe as well... Is there is SetSetting to change the ingame setting or just GetSetting? Ill poke around in a bit and see maybe.

Check in the code of my https://www.esoui.com/downloads/info...30sbranch.html it is indeed faster than looking in the ESOUI source code. ;)

Baertram 10/03/23 12:55 PM

Quote:

Originally Posted by Masteroshi430 (Post 48561)
Check in the code of my https://www.esoui.com/downloads/info...30sbranch.html it is indeed faster than looking in the ESOUI source code. ;)

If you know already what addon does what I need: It's faster to spy that addon, yes.
But if you want to learn how to get to the thing, you should check "how does ZOs do it". And in general it's ncie to compare addon code to "how does ZOs do it", as ZOs sources could have improved/made it easier than addons that were coded years ago (not talking about your addon here, just in general!).

Hint to sinnereso:
I don't know if ZGOO provides that too, maybe it does:
If you use "merTorchbug updated" you will have the /tbug or /tb command to open the UI, and on the tab "functions" you will find all the global API (and addon, if any other addon is enabled) functions.
You can search that for "setting" (top left) and it will filter to only matching function names with setting then.

sinnereso 10/03/23 05:22 PM

Quote:

Originally Posted by Baertram (Post 48562)
If you know already what addon does what I need: It's faster to spy that addon, yes.
But if you want to learn how to get to the thing, you should check "how does ZOs do it". And in general it's ncie to compare addon code to "how does ZOs do it", as ZOs sources could have improved/made it easier than addons that were coded years ago (not talking about your addon here, just in general!).

Hint to sinnereso:
I don't know if ZGOO provides that too, maybe it does:
If you use "merTorchbug updated" you will have the /tbug or /tb command to open the UI, and on the tab "functions" you will find all the global API (and addon, if any other addon is enabled) functions.
You can search that for "setting" (top left) and it will filter to only matching function names with setting then.

I went with zgoo because some REALLY old 2014/15 posts described exactly how to look for what I needed with /zgoo mouse with cursor over control but... I could not find anything related in it that way. Im new with those though.

sinnereso 10/03/23 05:23 PM

Quote:

Originally Posted by Masteroshi430 (Post 48561)
Check in the code of my https://www.esoui.com/downloads/info...30sbranch.html it is indeed faster than looking in the ESOUI source code. ;)

will the new kill feed setting be in there? its a new feature and that addon was last updated in june. What you originally gave me works perfectly thought with some tweaks.. I was merely looking for the ZO_something version of it for simplicity if it even exists yet. And im considering the possibility of turing it off if when my feature is enabled for pure personal kill feed awesomeness.

sinnereso 10/03/23 10:02 PM

ok found what I was looking for sorta using masteroshi's addon and a little trial and error...

Code:

SetSetting(SETTING_TYPE_UI, UI_SETTING_SHOW_PVP_KILL_FEED_NOTIFICATIONS, PVP_KILL_FEED_NOTIFICATIONS_OFF)
it does the job if i decide to go with it ty :)

Baertram 10/04/23 07:14 AM

Quote:

Originally Posted by sinnereso (Post 48563)
I went with zgoo because some REALLY old 2014/15 posts described exactly how to look for what I needed with /zgoo mouse with cursor over control but... I could not find anything related in it that way. Im new with those though.

merTorchbug updated does about the same, only with a more comfortable UI, and search functionalities, saved scripts (if you ran /script <code>..... or /tb <code>... it will save that at the "Scripts" tab so you can double click to run again, or change and run again), String constants, constants, loaded addons and libraries, etc.
The event inspector provides more features to include/exclude/filter events than zgoo afaik.
And you got preview of textures, strings with colors, and helpers on right click at the UI to copy the raw text/text to the chat, or run some GetItem* functions on inventory item data (having bagid and slotindx) etc.

+ many other features and slash commands -> See description of the addon


It even supports /zgoo and /zgoo mouse, even if you do not have zgoo activated -> Just opens merTorchbug UI then :D

Commands similar to zgoo ones:
/tb or /tbug <some code here or control to run/inspect>
-> Similar to /zgoo <some code here or control to run/inspect>

/tbm or /tbug mouse
-> Similar to /zgoo mouse


All times are GMT -6. The time now is 05:34 AM.

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