ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   GetSetting_bool (https://www.esoui.com/forums/showthread.php?t=742)

Cranius 04/09/14 06:11 PM

GetSetting_bool
 
Hey folks,

Please forgive if this is a FAQ or otherwise noobish question. I'm working on my first ESO addon and am having a difficult time figuring out how to set a Boolean setting. I'm able to do this to read the setting:

GetSetting_Bool(0, NAMEPLATE_TYPE_ALL_HEALTHBARS)

but can't find the equivalent to write to this thing and change its value.

BTW I was guessing at the value of the first argument, but it seemed to work. Is this documented somewhere?

Brainling 04/09/14 07:33 PM

The first parameter is the setting type, such as SETTING_TYPE_ACTION_BARS or SETTING_TYPE_UI. I'm not sure exactly what those mean, but those are the constants.

The opposing function is 'SetSetting' (no type specifier), of the form:
SetSetting(type, id, value)

I'm not sure if SetSetting is marked private or protected, but it may be.

Cranius 04/09/14 08:42 PM

Thanks. Where can I find this information? The API reference on this site didn't include that information as far as I can tell.

Seerah 04/09/14 08:49 PM

SetSetting is the next function down from GetSetting_Bool
http://wiki.esoui.com/API

Cranius 04/09/14 09:00 PM

Ya, but it says only:

SetSetting(integer system, integer settingId, string value, integer setOptions)

Nothing about what these things are or how to find more information about them.

Brainling 04/09/14 09:04 PM

Because that's all we (or anyone else) know until it's experimented with more. ZO hasn't given detailed documentation for anything. Everything that's documented has been documented through trial and error. Play with the function and fill in the Wiki once you figure it out. You'll be helping the next guy that needs to use SetSetting.

Cranius 04/09/14 09:07 PM

Perfect. Thanks.

So are "SETTING_TYPE_ACTION_BARS or SETTING_TYPE_UI" in your head, or are they documented somewhere? It's cool if it's just in your head, but if there's a resource I'm not utilizing, I'd like to know where it is.

Thanks again.

Brainling 04/09/14 09:09 PM

http://wiki.esoui.com/Globals

Scroll down to SystemSettingType. No I don't know what they all mean, but those are the available constants.

Cranius 04/09/14 10:38 PM

How did you know that the first parameter of:

SetSetting(integer system, integer settingId, string value, integer setOptions)

Was a SettingSystemType? (not SystemSettingType btw)

Taking this a step futher, how do I know what types function parameters map to in general (setOptions, for example)?

Thanks again!

Cranius 04/10/14 03:16 PM

Hey guys,

I just wanted you to know that I figured out what I wanted to do with my first addon. I still don't really understand how to connect the dots as I'd like to, but via trial and error I was able to get it working. I'm still quite confused about what setOptions are, though I was able to just use "1" and it worked. For example, this works:

Code:

SetSetting(SETTING_TYPE_NAMEPLATES, NAMEPLATE_TYPE_ALL_HEALTHBARS, tostring(false), 1)
I was able to make the following associations:

NAMEPLATE_TYPE_* are of type SETTING_TYPE_NAMEPLATES
UI_SETTING_* are of type SETTING_TYPE_UI
IN_WORLD_UI_SETTING_* are of type SETTING_TYPE_IN_WORLD


All times are GMT -6. The time now is 12:01 AM.

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