Commit Graph

28 Commits

Author SHA1 Message Date
Chris Danford 7f821e8cfc CString -> RString 2006-01-22 01:00:06 +00:00
Glenn Maynard cdf951e589 Instead of loading Defaults.ini underneith Preferences.ini, change the
actual IPreference defaults according to Defaults.ini.  This way, we can
access default values immediately, without having to load and parse a
file.  Since this simply changes the value in the preference, this doesn't
use any more memory.
2006-01-14 03:56:59 +00:00
Chris Danford 8b0c7ac36e SubscriptionHandler -> SubscriptionManager 2006-01-06 20:19:30 +00:00
Glenn Maynard f435983996 IPreference stores preferences, but knows nothing about loading or
saving them; that's up to PrefsManager.

Treat IPreference as a simple data holder, with simple facilities for
looking them up by name, converting to/from strings, and storing to/from
an XNode, but with no application-specific code to save to disk.  This
can be used alone as a way for code to configure things internally, even
for uses that have no notion of storing user preferences (eg. unit tests),
and other programs can use it to store preferences in entirely different
ways (SMPackage could use it to store to the registry).  PrefsManager is
layered on top, to implement StepMania's particular use of Preference
(saving and loading INIs), but isn't needed for Preference to be useful.

This also makes Preference only use XNode, not the more specialized IniFile.

(One piece is missing: several low-level places, eg. Dialog, want to set
a preference and write it to disk immediately.  The only way to do that
is to have access to PREFSMAN.  FIXME.)
2005-12-31 04:59:56 +00:00
Glenn Maynard 76e55c2f14 PrefsMan and Preference depend on each other. PrefsMan is big, and
depends on some higher level code.  Make Preference stand-alone, so
code that only has its own preferences can be used without PrefsMan.
2005-12-31 01:26:29 +00:00
Chris Danford 81037f05cd move Preferences from ThemeManager to completely in PrefsManager
Also, allow Defaults.ini and Static.ini to have sections
2005-11-09 10:55:30 +00:00
Glenn Maynard ccbbb2e5ec Add an optional template parameter to Preference to specify the operating type
for conversions.  This way, Preference doesn't need to know about every enum
type used with it.  (This means that you can't construct a Preference<T,U> from T,
since you don't know U, which led to the previous ScreenOptionsMasterPrefs.cpp
change.)
2005-10-27 15:47:31 +00:00
Chris Danford feb1bfb0fc naming cleanup: rename scoring "Tier1"s to "W1"s (short for "Window 1")
add Preference1D so that we can index into the grading and life values
2005-10-09 04:30:59 +00:00
Chris Danford 32464990af enum name cleanup to reflect the generic calculations 2005-10-08 04:50:28 +00:00
Chris Danford b6cf3477b4 Use generic names for TapNoteScore values since they are treated genericly by the code.
Theme changes coming...
2005-10-08 00:57:40 +00:00
Chris Danford 1c9f10be42 default DancingCharacters to random, not off 2005-09-29 06:30:09 +00:00
Chris Danford 386de4e74c use enum for attract sound frequency 2005-06-11 10:53:16 +00:00
Glenn Maynard ea1bede8c3 drop StepMania.ini sections. Almost everything is in [Options], and it's
hard enough keeping straight which arbitrary options screen an option
is in without having a separate categorization for the INI.  (This will
simplify later changes.)
2005-05-19 01:25:38 +00:00
Chris Danford dd98a6bc7e move more of autoplay into debugOverlay 2005-05-18 07:15:56 +00:00
Chris Danford e389ba6191 convert the rest to use Preference 2005-05-16 09:36:32 +00:00
Steve Checkoway 135884ceb9 Explicit template specializations require template<>. 2005-05-14 07:59:46 +00:00
Chris Danford 820fb0b361 broadcast on Preference changes 2005-05-06 20:41:05 +00:00
Chris Danford 3db3500226 remove size on statc CString arrays so that XToString can catch size differences 2005-05-05 19:55:04 +00:00
Chris Danford 134cbf284b fix VC7 warning 2005-04-28 08:37:13 +00:00
Chris Danford 0938d9d9a7 conver more to use Preference 2005-04-28 08:27:40 +00:00
Chris Danford 8415b4466d fix VC7 template error: move templated methods out of LuaManager 2005-03-13 00:01:05 +00:00
Chris Danford b60d135493 don't allow StringToX for *_INVALID values 2005-03-05 21:50:33 +00:00
Glenn Maynard 06e6411044 fix compile 2005-02-25 02:53:20 +00:00
Glenn Maynard 61064820b9 SetFromStack 2005-02-22 04:22:24 +00:00
Glenn Maynard 11f3514275 simplify 2005-02-20 02:56:51 +00:00
Glenn Maynard ef12eea2d4 Add Preference<type>::PushValue() (note that this is not a PushSelf). 2005-01-30 02:02:42 +00:00
Glenn Maynard ba929b8e71 move more common stuff out of the template class, so g_pvpSubscribers is
more useful
2004-12-07 01:44:17 +00:00
Chris Danford 63e138a212 remove includes from Preference.h 2004-12-04 07:15:22 +00:00