Commit Graph

395 Commits

Author SHA1 Message Date
Glenn Maynard 8daf0c49d3 add ShowMasks 2007-05-23 21:07:28 +00:00
Glenn Maynard 0b3db98d00 add timerglobal 2007-05-03 22:59:14 +00:00
Glenn Maynard 3913f97cd3 fix crash when queued commands finishtweening/stoptweening 2007-04-10 21:12:33 +00:00
Glenn Maynard 6f71043cc9 add SetTextureFiltering 2007-03-24 00:39:19 +00:00
Glenn Maynard 9dbd608085 bindings 2007-03-12 05:54:57 +00:00
Chris Danford 96fac5a091 lua binding, GetVisible 2007-03-06 18:42:53 +00:00
Glenn Maynard c5daee77b6 bind GetNumStates 2007-03-02 06:16:45 +00:00
Glenn Maynard 495f80962b expose fractional alignment 2007-03-01 08:14:33 +00:00
Glenn Maynard 6b9084a72d cleanup 2007-03-01 04:30:40 +00:00
Glenn Maynard c371d9f26b Previously, alignment had to be implemented by each actor, so it was
only ever supported by Sprite and BitmapText.  Handle it globally, using
m_size.  This way, an actor only needs to set m_size to support alignment.

This means alignment can be set for non-drawing ActorFrames, if a size
is set explicitly.  This allows stretching from the border of a frame
without playing games with extra nested frames.  "setsize,100,100;valign,4;zoomx,.5"

This adds an extra matrix multiply.  This will only happen for actors
actually set to non-centered alignment, which is the exception.

BitmapText still overrides this behavior a bit.  Alignment for text
does two things: changes the alignment of the bounding box vs. the
X/Y position (the generic behavior), and changes the alignment of
the text within the bounding box.
2007-03-01 04:29:05 +00:00
Glenn Maynard be4efcd0c2 Represent alignment as a float; eliminates selects. (I havn't
yet decided whether these should be -1.0 ... +1.0, indicating
"fully left aligned" and "fully right aligned", or 0.0 ... 1.0,
indicating "anchor to this fractional position in m_size".
It may become the latter.)
2007-03-01 02:19:49 +00:00
Glenn Maynard 2fa8986ea6 fix RunCommandsRecursively by implementing it directly
distinguish between Run ("call this function") and Play
("look up the function with this name and call it")
2007-02-20 23:49:13 +00:00
Glenn Maynard 0d693a0ccb remove EffectCommand. Use SetDrawFunction instead; it's cleaner
and can modify any property, not just tweened properties.
2007-02-20 02:06:11 +00:00
Glenn Maynard 94619a7607 fix error handling 2007-02-20 00:33:09 +00:00
Glenn Maynard a5a907af0e bind Draw 2007-02-13 23:59:59 +00:00
Chris Danford f7fc9ceaa5 remove Set/GetHidden, leave *Visible
remove hidden from ActorCommands eventually
2007-02-13 06:32:26 +00:00
Glenn Maynard a9fd52cce0 add TextureUnit param to SetTextureWrapping 2007-02-13 05:56:24 +00:00
Glenn Maynard fcf121feb0 add PlayCommandNoRecurse to fix PlayCommand hack 2007-02-10 05:42:25 +00:00
Glenn Maynard 8ec54555e3 remove obsolete Context 2007-02-03 12:22:03 +00:00
Glenn Maynard fc9d79d7b2 remove old actor parameters; obsoleted by LuaThreadVariable 2007-02-03 11:02:45 +00:00
Glenn Maynard 9bc27fb390 Messages and commands are nearly identical: they both have a name,
they can both have parameters stashed in a table, and they both play
stuff out of the actor command list.  Merge them; now the only
difference between playing and broadcasting a command is that playing
plays recursively on a tree and broadcasting sends to all subscribers.

The distinction between "messages" and "commands" is cosmetic now;
everything is a message.  The only thing special about commands intended
to be received as a broadcast is the "Message" suffix, which subscribes it.
2007-02-03 06:17:02 +00:00
Glenn Maynard 3eb9e96385 more general color table support 2007-01-31 08:45:53 +00:00
Chris Danford ad5604b331 allow #xxxxxx colors in seteffectcolor* 2006-12-07 07:47:20 +00:00
Glenn Maynard 5cc5462722 header cleanup 2006-11-21 05:17:01 +00:00
Glenn Maynard 174f0c16fa update bindings 2006-11-14 04:22:27 +00:00
Glenn Maynard 7e9ec10f3a work on allowing parameters to messages: pass a Message
struct, not just a string
2006-11-13 23:51:24 +00:00
Glenn Maynard a5f5fa0b78 HandleMessage( Message ) 2006-11-13 23:11:25 +00:00
Glenn Maynard e76a9c8965 remove parent parameter. Use self:GetParent(). 2006-10-23 09:14:27 +00:00
Glenn Maynard cd3f228338 covariant Copy() 2006-10-20 00:17:51 +00:00
Glenn Maynard 9279081723 remove old backwards compatibility 2006-10-18 20:19:51 +00:00
Glenn Maynard 1d5e21c778 old comment 2006-10-15 08:29:26 +00:00
Glenn Maynard cea3b4ef5e remove <Command> children. This was only used to generate
command names on the fly.  If you need that, use Lua, eg.:

Actor.Quad {
    [s .. "Command"] = cmd(x,10)
}
2006-10-15 08:28:11 +00:00
Glenn Maynard 3d7f268dae "Optional" attrib unused 2006-10-15 08:25:11 +00:00
Glenn Maynard 2cede5a421 for cases where we take a number as a boolean, accept a boolean
false as false (to transition away from numbers)
2006-10-15 08:17:35 +00:00
Steve Checkoway e87789da7c Rename XToString2 to XToString. 2006-10-15 00:09:18 +00:00
Steve Checkoway 04bff6bc1d Use XToString2. 2006-10-15 00:00:22 +00:00
Glenn Maynard 6ff22acb45 remove hacky Actor::IsType 2006-10-11 23:51:40 +00:00
Glenn Maynard bd9a210628 simplify 2006-10-11 06:56:42 +00:00
Glenn Maynard 9cb1409964 fix comment 2006-10-11 02:39:53 +00:00
Glenn Maynard e11914d4bb LoadFromNode(sDir, pNode) -> LoadFromNode(pNode) 2006-10-09 08:24:10 +00:00
Glenn Maynard f1ca420069 use ActorUtil::GetWhere 2006-10-09 08:08:59 +00:00
Glenn Maynard ce07b22b56 fix up Context handling 2006-10-09 01:15:49 +00:00
Glenn Maynard 3cae60d6fd Currently, expression handling in XML is spotting and inconsistent.
Each actor type needs to evaluate attributes; only a few do.  Strings
are handled with the "@foo()" notation.

Instead, after loading an XML file for loading as an actor,
precompile all XML attributes as Lua expressions.

The primary difference to code is:
 - previously, Attr="string" would act as a string if it was being
   read as one.  Now, specify Attr='"string"'.  Attr="@string" is
   a shorthand.  (note that @strings will not be parsed as Lua
   strings, so can not use Lua escape characters)
 - previously, Attr="@func()" would evaluate func(), and the value
   of the attribute would be the return value of the function.  This
   was only supported for a few attributes.  Now, say Attr="func()",
   and this will work for all fields.
 - Attributes of other types are unchanged, except that all attributes
   may be Lua expressions, eg. Width="SCREEN_WIDTH".
 - Attributes names ending with "Command" are special, like metrics.
   Prefix "%" to disable this.

This brings XML handling in line with metric handling.  (This is an intermediary
step; I have another idea that follows from this that should eliminate the annoying
"'foo'"/"@foo".)
2006-10-09 00:49:30 +00:00
Glenn Maynard 1a89ddfccd pointer to attributes 2006-10-03 00:07:01 +00:00
Glenn Maynard 5d6514a2c1 better debug 2006-10-02 22:54:43 +00:00
Glenn Maynard 9e4da8650f simplify 2006-10-02 22:53:32 +00:00
Glenn Maynard 83defce27b XML update 2006-10-02 22:52:57 +00:00
Glenn Maynard 4b26a19205 cleanup 2006-10-02 21:19:00 +00:00
Glenn Maynard c690fdcfe4 unify registration 2006-09-29 00:01:32 +00:00
Glenn Maynard 205c2329a2 XToString 2006-09-27 20:33:26 +00:00