Commit Graph

402 Commits

Author SHA1 Message Date
Glenn Maynard 4a9b1736f5 flip GetMetric(ref) and GetMetricR(), so there's an interface exposed that doens't
copy the reference.  Copying refs isn't expensive, but it does lock Lua.
2006-09-22 04:46:47 +00:00
Glenn Maynard f90088d616 Currently all metrics except for strings and commands are valid
Lua expressions, and commands simply allow a shorthand that generates
valid Lua expressions.  Make strings Lua expressions.

This essentially reverses strings; rather than:
  Metric1=Text
  Metric2=@Text()

specify:

  Metric1="Text"
  Metric2=Text()

This means that every metric (except Fallback, currently) can be
treated as a Lua expression, except for Command metrics that just
need a bit of preprocessing.
2006-09-22 04:35:11 +00:00
Glenn Maynard 1b8b029eef re-add "get metric as Lua expression" 2006-09-22 03:31:38 +00:00
Glenn Maynard 489fe6262d no @expr for colors 2006-09-22 02:36:19 +00:00
Glenn Maynard 141f48b032 Handle colors as Lua expressions, like int/float/bool metrics: "{1,1,1,1}"
instead of "1,1,1,1".
2006-09-22 02:35:42 +00:00
Glenn Maynard 30d394b665 Remove RunAtExpressionS (@expr) for most metric types. They're evaluated
as expressions anyway.  Still used for strings and colors, which aren't.
(Strings should be, and color metrics should be removed, I think.)
2006-09-21 20:18:23 +00:00
Glenn Maynard f04a03c321 don't use 0 and 1 for bools; use valid Lua expressions 2006-09-21 20:14:14 +00:00
Glenn Maynard 479aca5ff4 don't FontCharAliases::ReplaceMarkers for non-strings (GetMetricI, etc) 2006-09-21 20:13:21 +00:00
Glenn Maynard e0e29285fe RegisterTypes() less 2006-09-21 04:58:41 +00:00
Glenn Maynard eb376fca1d simplify singleton registration. Add the singleton global
to Lua when the singleton is constructed, and not in the
binding class.  The binding just adds the class bindings
(the same as for a non-singleton class).  This way, the
binding is available to Lua as soon as the class is constructed.
2006-09-21 04:20:08 +00:00
Glenn Maynard 8526204155 remove unused overload 2006-09-21 03:33:35 +00:00
Glenn Maynard b30aaa63a7 ActorCommands.h -> Actor.h (for the type) or ActorUtil.h
(for ParseActorCommands)
2006-09-21 02:38:01 +00:00
Glenn Maynard 3a57dca6c4 ActorCommands -> ActorUtil::ParseActorCommands 2006-09-21 02:24:22 +00:00
Glenn Maynard d04a5920fa LuaExpression -> LuaReference 2006-09-21 02:09:44 +00:00
Glenn Maynard 8548f1cb33 simplify ActorCommands 2006-09-21 01:39:38 +00:00
Glenn Maynard ab1fd34e76 Previously, changing themes attempted to preserve Lua data by
serializing data and tables while reinstantiating Lua.  That's
ugly, and can't serialize some things (eg. functions).

Instead, when changing themes, shut down the high-level objects
and unregister as much as we can from Lua, change the theme,
then reregister things.  This doesn't clean the slate as much;
globals won't be erased, etc.

A better way would be to clear everything that uses Lua
(delete singletons), then reload it all.  Singleton creation is
a bit of a mess currently so that would break a lot, and we
don't want to reload songs.
2006-09-20 23:45:38 +00:00
Glenn Maynard 41028ca167 NextTheme -> GetNextTheme 2006-09-20 23:10:15 +00:00
Glenn Maynard 65c9a8bd17 unused header 2006-09-20 23:07:00 +00:00
Glenn Maynard abacb7ef9d ThemeManager::ClearSubscribers 2006-09-20 23:05:52 +00:00
Steve Checkoway 7f6ccd1688 Cleanup. Don't return NULL when RString is expected. 2006-09-18 10:04:05 +00:00
Steve Checkoway b1ccf2e5ff The correct syntax for theme metrics is "class::name". 2006-09-17 05:37:42 +00:00
Steve Checkoway c9fa49b7ba Use UserLog. Also clean up RageException::Throw() calls. 2006-09-17 01:14:39 +00:00
Steve Checkoway a22b349e81 Only flush the directory of the theme in question. 2006-09-16 03:26:23 +00:00
Glenn Maynard 336bfe38c7 unused 2006-08-20 19:49:53 +00:00
Glenn Maynard 0d12c69795 ReloadMetrics always calls FlushDirCache 2006-08-01 23:40:35 +00:00
Chris Danford b44ad7a4e0 preserve language name case in file name if LanguageInfo not available 2006-06-24 16:57:39 +00:00
Chris Danford aa88059c80 fix mis-named: GetOptionNames -> GetModifierNames 2006-06-24 05:16:38 +00:00
Chris Danford 26ce4fa74d split strings and metrics 2006-06-24 05:13:54 +00:00
Chris Danford f424a27a2c fix smpackage compile 2006-06-23 17:54:38 +00:00
Steve Checkoway 9df559af08 Fall back if PREFSMAN->m_sTheme.GetDefault() is not selectable. 2006-06-16 08:51:15 +00:00
Chris Danford 960da85a05 don't try to switch to theme 'default' if it doesn't exist 2006-06-15 06:39:08 +00:00
Glenn Maynard 0990daa5f1 oops; fixed this, then unfixed it before committing 2006-06-14 22:43:49 +00:00
Glenn Maynard 2e47a912f5 use _ prefix for "hidden" (for internal, fallback, language, etc. themes); avoid
reading a file at runtime to get this info
2006-06-14 22:42:43 +00:00
Chris Danford daf48e67bc move installer strings to an unselectable theme for easier exporting via tools.exe 2006-06-14 07:42:40 +00:00
Steve Checkoway db3a540585 Fix warning (gcc was erroneously saying that it was reaching the end of a nonvoid function) and remove goto. 2006-06-13 06:25:49 +00:00
Steve Checkoway fee39b931d element 2006-06-13 04:47:33 +00:00
Glenn Maynard b654138064 fix escaping 2006-04-24 16:46:30 +00:00
Chris Danford e4717d1f79 reload all ThemeMetrics when aspect ratio changes so that metrics using SCREEN_* are reevaluated 2006-03-12 20:05:27 +00:00
Glenn Maynard 03d8568a8a we lowercase elsewhere 2006-03-10 04:09:48 +00:00
Chris Danford 7f52558484 fix dupe language names 2006-03-09 00:12:11 +00:00
Glenn Maynard b4abd6f067 simplify clearing theme path cache; fix it when changing languages 2006-03-02 05:31:14 +00:00
Glenn Maynard dc15096294 language filtering for XML-referenced files 2006-03-02 04:59:37 +00:00
Glenn Maynard 9c4d7606cf ToLower -> MakeLower 2006-03-01 00:39:32 +00:00
Chris Danford ae1bf0dcd8 add ScreenGameplaySyncMachine 2006-02-04 18:39:37 +00:00
Glenn Maynard 996477feae rename ReloadMetricsAndUpdateLua -> ReloadScreenDimensions 2006-01-21 01:15:09 +00:00
Chris Danford cc2558fac6 don't pseudolocalize replacement markers in strings 2006-01-18 04:09:14 +00:00
Chris Danford 2827fc10fa Disable writing of missing string to base language's ini. This was temporary to ease adding tons of missing strings.
Don't pseudolocalize ":".  It's messing up the help text tip separators.
2006-01-17 20:47:43 +00:00
Glenn Maynard 776ff285cf allow empty translatable strings 2006-01-14 04:31:56 +00:00
Glenn Maynard 7c25138029 typo 2006-01-14 04:21:54 +00:00
Glenn Maynard 1d488f223d typo 2006-01-14 00:40:55 +00:00