00001
00002
00003
#ifndef ACTORFRAME_H
00004
#define ACTORFRAME_H
00005
00006
#include "Actor.h"
00007
00008 #define LUA_ActorFrame_METHODS( T ) \
00009
LUA_Actor_METHODS( T ) \
00010
static int propagate( T* p, lua_State *L ) { p->SetPropagateCommands( BArg(1) ); return 0; } \
00011
00012 #define LUA_ActorFrame_METHODS_MAP( T ) \
00013
LUA_Actor_METHODS_MAP( T ) \
00014
LUA_METHOD_MAP( T, propagate ) \
00015
00016 class ActorFrame :
public Actor
00017 {
00018
public:
00019
ActorFrame();
00020
virtual ~ActorFrame();
00021
00022
void LoadFromNode(
const CString& sDir,
const XNode* pNode );
00023
00024
virtual void AddChild(
Actor* pActor );
00025
virtual void RemoveChild(
Actor* pActor );
00026
void MoveToTail(
Actor* pActor );
00027
void MoveToHead(
Actor* pActor );
00028
void SortByDrawOrder();
00029
00030 void DeleteChildrenWhenDone(
bool bDelete=
true ) {
m_bDeleteChildren = bDelete; }
00031
void DeleteAllChildren();
00032
00033
00034
00035
00036
void PushSelf( lua_State *L );
00037
void RunCommandsOnChildren(
const ActorCommands& cmds );
00038 void RunCommandsOnChildren(
const apActorCommands& cmds ) { RunCommandsOnChildren( *cmds ); }
00039
00040
virtual void Update(
float fDeltaTime );
00041
virtual void DrawPrimitives();
00042
00043
virtual void SetDiffuse(
RageColor c );
00044
virtual void SetDiffuseAlpha(
float f );
00045
00046
virtual void SetZTestMode( ZTestMode mode );
00047
virtual void SetZWrite(
bool b );
00048
virtual void FinishTweening();
00049
virtual void HurryTweening(
float factor );
00050
00051
void SetPropagateCommands(
bool b );
00052
00053
00054
virtual float GetTweenTimeLeft() const;
00055
00056 virtual
void GainFocus(
float fRate,
bool bRewindMovie,
bool bLoop );
00057 virtual
void LoseFocus();
00058 virtual
void PlayCommand( const CString &sCommandName );
00059 virtual
void RunCommands( const
ActorCommands& cmds );
00060 void RunCommands( const
apActorCommands& cmds ) {
ActorFrame::RunCommands( *cmds ); }
00061
00062
protected:
00063 vector<Actor*>
m_SubActors;
00064 bool m_bPropagateCommands;
00065 bool m_bDeleteChildren;
00066 };
00067
00068
#endif
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093