How preferences work

From Second Life Wiki
Revision as of 17:40, 10 January 2007 by Sophia Weary (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Adding a user preference:

To access a user preference in code, a global called gSavedSettings is used to store stuff in settings.xml. Adding a new setting to settings.xml requires that you add it to your personal settings file, as well as settings_default.xml. Additonally, you need to declare it in llcontroldef.cpp for it to be accessible.

gSavedSettings is of type llcontrolgroup inside of llcontrol.h, which may be nonobvious.