-
Notifications
You must be signed in to change notification settings - Fork 3
/
PreferencesDemo.sb
42 lines (25 loc) · 938 Bytes
/
PreferencesDemo.sb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
XIncludeFile "Preferences.sbi"
EnableExplicit
UseModule Preferences
If CreatePreferences("Preferences.prefs")
PreferenceGroup("Global")
WritePreferenceString("ApplicationName", "MP3 Player")
WritePreferenceString("Version", "1.1b")
PreferenceComment("This is the Window dimension")
PreferenceComment("")
PreferenceGroup("Window")
WritePreferenceLong ("WindowX", 123)
WritePreferenceLong ("WindowY", 124)
WritePreferenceFloat("WindowZ", -125.5)
ClosePreferences()
EndIf
OpenPreferences("Preferences.prefs")
PreferenceGroup("Window")
Debug ReadPreferenceLong ("WindowX", 0)
Debug ReadPreferenceLong ("WindowY", 0)
Debug ReadPreferenceFloat("WindowZ", 0)
PreferenceGroup("Global")
Debug ReadPreferenceString("ApplicationName", "")
Debug ReadPreferenceString("Version", "")
ClosePreferences()
UnuseModule Preferences