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? |
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. |
Thanks. Where can I find this information? The API reference on this site didn't include that information as far as I can tell.
|
SetSetting is the next function down from GetSetting_Bool
http://wiki.esoui.com/API |
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. |
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.
|
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. |
http://wiki.esoui.com/Globals
Scroll down to SystemSettingType. No I don't know what they all mean, but those are the available constants. |
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! |
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) 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