Commit Graph

4 Commits

Author SHA1 Message Date
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 7c30f3d7fe Sprite cruft 2007-02-22 09:53:15 +00:00
Glenn Maynard 1d94399fe5 ActorMultiTexture: interface to render multitextured textures 2007-02-19 23:48:00 +00:00