Commit Graph
325 Commits
Author SHA1 Message Date
Glenn Maynard 79fcf408d6 unneeded 2005-11-22 21:21:48 +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
Chris Danford 489cf3b202 .dat -> .txt so that file associations will find a text editor 2005-11-07 05:45:48 +00:00
Chris Danford 8d2316f1c3 search Data\Type.dat for the Preferences group in addition to reading from the command line 2005-11-07 05:40:22 +00:00
Glenn Maynard c8f38629ef ThemeManager::ReloadMetrics: only reload metrics, not the whole theme. This
is much less unintrusive, and fixes crashes on most "retry" theme dialogs due
to reloading and resetting Lua and other things unexpectedly in the middle of
a screen load.
2005-11-03 19:53:27 +00:00
Glenn Maynard c85965d054 handle language tags in files for translations 2005-11-03 18:11:40 +00:00
Glenn Maynard cfed90cfec Stop keeping theme metrics for each fallback theme separate. Just merge them
into one theme.  I'm not sure why this was done originally, but it was probably
related to the ugly "fallback themes can fork Fallback" behavior that was
removed recently.

This is simpler, and reduces overhead in looking up theme metrics.
2005-11-03 17:24:56 +00:00
Glenn Maynard a46086fdda Avoid extra work when changing the language and not the theme. 2005-11-01 19:15:26 +00:00
Glenn Maynard 826804bf84 It's too early to DoesLanguageExist at this point. Just return the preferred language; we'll fall back on BASE_LANGUAGE anyway. 2005-11-01 19:14:38 +00:00
Glenn Maynard fae57b297c fix log 2005-11-01 19:12:13 +00:00
Glenn Maynard 92b93dc689 fixing up language reverting to english 2005-11-01 18:13:32 +00:00
Glenn Maynard fe52b72f25 log in LoadThemeMetrics 2005-11-01 18:08:56 +00:00
Glenn Maynard 51e06fdc2b pass the language to LoadThemeRecursive and rename to LoadThemeMetrics 2005-11-01 18:04:59 +00:00
Glenn Maynard 1851fda405 move --metric hanlding to LoadThemeRecursive 2005-11-01 17:46:48 +00:00
Glenn Maynard 485bab571f move clean up of old themes to LoadThemeRecursive 2005-11-01 17:42:48 +00:00
Glenn Maynard b2aa109cbc GetLanguages: check all loaded themes 2005-11-01 17:05:07 +00:00
Glenn Maynard 102f39d7c5 simplify: ThemeManager::LoadThemeRecursive recurses themes, but
there's no reason for it to actually be a recursive function
2005-10-28 19:07:19 +00:00
Glenn Maynard 2d907c34e4 use HOOKS->GetPreferredLanguage to set the default language 2005-10-28 17:25:22 +00:00
Glenn Maynard d7fdb1917f cleanup 2005-10-28 16:34:58 +00:00
Glenn Maynard 590381ce25 GetPreferencesSection
assert
2005-10-28 16:33:28 +00:00
Glenn Maynard ac76715d21 BGANimations and Graphics are equivalent (will be merged some day) 2005-10-18 04:09:29 +00:00
Chris Danford 372c5ad6df only ignore empty dirs in Debug for performance 2005-10-15 01:05:27 +00:00
Chris Danford 3610303408 ignore empty directories so we don't have to let CVS prune before we can test changes that delete a dir 2005-10-15 00:35:54 +00:00
Glenn Maynard 247b9c3fb5 prevent falling back further than the base theme, even if it's renamed 2005-10-14 04:51:16 +00:00
Glenn Maynard 64d9c29568 Simplify: store attributes in a simple map<CString,CString>, not in an object.
Makes attributes lighter.
2005-10-11 10:24:07 +00:00
Glenn Maynard 797653e5a4 better encapsulation 2005-10-09 01:36:04 +00:00
Glenn Maynard 4e312a4ffd cleanup 2005-10-05 06:13:57 +00:00
Chris Danford 65d71a4f23 expermienting with DEFINE_METHOD macro for Lua methods 2005-09-10 02:47:04 +00:00
Glenn Maynard 438b712da2 Previously, theme paths searched fallback classes before themes: each class
fallback was checked with the main theme, then each class fallback was checked
with the base theme, and so on.

Reverse this: check the class name with each theme, then check the class
fallback with each theme, and so on.

This is faster, since we only look up each class Fallback at most once, not
once per fallback theme, and groups together theme lookups (which may allow
further optimizations).  More importantly, this matches the metric lookup
scheme.

This also makes more sense--if "ScreenWithMenuElements header" is overridden by
"ScreenMenu header" in the base theme, overriding "ScreenWithMenuElements header"
in a derived theme should change the same in the base theme (changing the
default) but not change the specialized "ScreenMenu header".
2005-09-07 01:42:47 +00:00
Glenn Maynard a0a61d4519 implement without (deep) recursion 2005-09-07 00:52:31 +00:00
Glenn Maynard f60693ffa1 no fallback for no class 2005-09-07 00:35:16 +00:00
Glenn Maynard 80e5cd8dbe cleanup 2005-09-07 00:34:02 +00:00
Glenn Maynard c872cea5ab cleanup 2005-09-07 00:08:39 +00:00
Glenn Maynard a03eba0767 cleanup 2005-09-07 00:07:53 +00:00
Glenn Maynard 59f9941445 Previously, theme metric lookups follows Fallback at every place; for
example, if a base theme had:

[Derived]
Fallback=Base1

[Base1]
A=1

and a derived theme had:

[Derived]
Fallback=Base2

[Base2]

then the lookup "Derived", "A" would find 1.  This is confusing and inconsistent:
it means that the value of Derived::Fallback has two values, both Base1 and Base2,
and Base1 is only accessible by the internal metric lookup.  Every metric should
have only one value; "Fallback=Base1" should be completely overridden here.

(This also reduces the difference between theme lookups and path lookups; path
lookups did not have this anomaly, as they did not have access to the extra Fallback
value.)
2005-09-06 22:57:37 +00:00
Glenn Maynard 05a2409659 move function 2005-09-06 22:14:06 +00:00
Glenn Maynard dc4c4a254d remove 2005-09-06 20:58:50 +00:00
Glenn Maynard e362389b0f prefer std::string calls over CStdString compat calls 2005-09-06 20:33:55 +00:00
Glenn Maynard f5f2f4a885 ThemeManager::EvaluateString was called here for three things:
- RunAtExpressionS.  Using @ to generate command lists is no longer allowed; it's
   too expensive and clumsy, and is no longer needed.
 - "::" for newlines.  This isn't needed, since the string is a Lua expression;
   use "\n".
 - FontCharAliases::ReplaceMarkers.  This only makes sense for settext calls.
(The latter two will still be supported by settext directly.)
2005-09-06 04:34:44 +00:00
Glenn Maynard fa2fa3d526 rename GetMetricRaw overload to GetMetricRawRecursive for clarity 2005-09-04 05:26:44 +00:00
Glenn Maynard a2740445ef fix message 2005-09-03 08:40:21 +00:00
Glenn Maynard 5e99ccfb22 remove unused 2005-09-03 02:11:05 +00:00
Glenn Maynard babaa7761e Font paths must be prefix-unique, like other assets. Remove hack. 2005-09-03 00:14:06 +00:00
Glenn Maynard 6ce7d5d8c8 cleanup 2005-09-02 22:37:19 +00:00
Glenn Maynard 4757ba604f remove hack 2005-09-02 22:28:22 +00:00
Glenn Maynard 3fae1b67cb remove Numbers 2005-09-02 22:16:39 +00:00
Glenn Maynard 99c6309d48 remove hack 2005-09-02 22:11:13 +00:00
Chris Danford 7c4f2595ab Remove support for .actor. Use .xml instead. 2005-09-02 00:09:21 +00:00
Chris Danford 907f7d3dcc remove ugly LuaElementCategory, add bindings for GetPath overloads 2005-07-30 21:12:54 +00:00
Chris Danford 7cfcce6e7d remove .sprite file support. Use .xml instead 2005-07-26 20:00:19 +00:00