SettingsItemclass | settings.t[65] |
Superclass Tree | Subclass Tree | Global Objects | Property Summary | Method Summary | Property Details | Method Details |
Note that we don't make any assumptions in this base class about the type of the value associated with this setting, how it's stored, or how it's represented in the external configuration file. This means that each subclass has to provide the property or properties that store the item's value, and must also define the methods that operate on the value.
If you want to force a particular default setting for a particular preference item, overriding the setting stored in the global preferences file, you can override that SettingsItem's settingFromText() method. This is the method that interprets the information in the preferences file, so if you want to ignore the preferences file setting, override this method to set the hard-coded value of your choosing.
class
SettingsItem : object
SettingsItem
object
SettingsItem
BinarySettingsItem
exitsMode
footnoteSettingsItem
factoryDefault | settings.t[126] |
settingDesc | settings.t[101] |
settingID | settings.t[89] |
The ID should be chosen to ensure uniqueness. To reduce the chances of name collisions, we suggest a convention of using a two part name: a prefix identifying the source of the name (an abbreviated version of the name of the library, library extension, or game), followed by a period as a separator, followed by a short descriptive name for the variable. The library follows this convention by using names of the form "adv3.xxx" - the "adv3" prefix indicates the standard library.
The ID should contain only letters, numbers, and periods. Don't use spaces or punctuation marks (other than periods).
Note that the ID string is for the program's use, not the player's, so this isn't something we translate to different languages. Note, though, that the configuration file is a simple text file, so it wouldn't hurt to use a reasonably meaningful name, in case the user takes it upon herself to look at the contents of the file.
settingFromText (str) | settings.t[115] |
settingToText ( ) | settings.t[108] |