Move: Utility from ActorUtil to ScreenNetBase
This commit is contained in:
@@ -322,14 +322,6 @@ void AutoActor::LoadAndSetName( const CString &sScreenName, const CString &sActo
|
|||||||
m_pActor->SetName( sActorName );
|
m_pActor->SetName( sActorName );
|
||||||
}
|
}
|
||||||
|
|
||||||
void UtilSetQuadInit( Actor& actor, const CString &sClassName )
|
|
||||||
{
|
|
||||||
UtilSetXYAndOnCommand( actor, sClassName );
|
|
||||||
actor.SetDiffuse( THEME->GetMetricC( sClassName, actor.m_sName + "Color" ) );
|
|
||||||
actor.SetWidth( THEME->GetMetricF( sClassName, actor.m_sName + "Width" ) );
|
|
||||||
actor.SetHeight( THEME->GetMetricF( sClassName, actor.m_sName + "Height" ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (c) 2003-2004 Chris Danford
|
* (c) 2003-2004 Chris Danford
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|||||||
@@ -10,8 +10,6 @@
|
|||||||
#define OFF_COMMAND( actor ) UtilOffCommand( actor, m_sName )
|
#define OFF_COMMAND( actor ) UtilOffCommand( actor, m_sName )
|
||||||
#define SET_XY_AND_ON_COMMAND( actor ) UtilSetXYAndOnCommand( actor, m_sName )
|
#define SET_XY_AND_ON_COMMAND( actor ) UtilSetXYAndOnCommand( actor, m_sName )
|
||||||
#define COMMAND( actor, command_name ) UtilCommand( actor, m_sName, command_name )
|
#define COMMAND( actor, command_name ) UtilCommand( actor, m_sName, command_name )
|
||||||
#define SET_QUAD_INIT( actor ) UtilSetQuadInit( actor, m_sName );
|
|
||||||
|
|
||||||
|
|
||||||
void UtilSetXY( Actor& actor, const CString &sClassName );
|
void UtilSetXY( Actor& actor, const CString &sClassName );
|
||||||
inline void UtilSetXY( Actor* pActor, const CString &sClassName ) { UtilSetXY( *pActor, sClassName ); }
|
inline void UtilSetXY( Actor* pActor, const CString &sClassName ) { UtilSetXY( *pActor, sClassName ); }
|
||||||
@@ -26,7 +24,6 @@ inline void UtilSetXYAndOnCommand( Actor& actor, const CString &sClassName )
|
|||||||
UtilSetXY( actor, sClassName );
|
UtilSetXY( actor, sClassName );
|
||||||
UtilOnCommand( actor, sClassName );
|
UtilOnCommand( actor, sClassName );
|
||||||
}
|
}
|
||||||
void UtilSetQuadInit( Actor& actor, const CString &sClassName );
|
|
||||||
|
|
||||||
/* convenience */
|
/* convenience */
|
||||||
inline void UtilCommand( Actor* pActor, const CString &sClassName, const CString &sCommandName ) { if(pActor) UtilCommand( *pActor, sClassName, sCommandName ); }
|
inline void UtilCommand( Actor* pActor, const CString &sClassName, const CString &sCommandName ) { if(pActor) UtilCommand( *pActor, sClassName, sCommandName ); }
|
||||||
|
|||||||
@@ -257,6 +257,14 @@ void ScreenNetSelectBase::UpdateUsers()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void UtilSetQuadInit( Actor& actor, const CString &sClassName )
|
||||||
|
{
|
||||||
|
UtilSetXYAndOnCommand( actor, sClassName );
|
||||||
|
actor.SetDiffuse( THEME->GetMetricC( sClassName, actor.m_sName + "Color" ) );
|
||||||
|
actor.SetWidth( THEME->GetMetricF( sClassName, actor.m_sName + "Width" ) );
|
||||||
|
actor.SetHeight( THEME->GetMetricF( sClassName, actor.m_sName + "Height" ) );
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -36,6 +36,10 @@ private:
|
|||||||
vector <BitmapText> m_textUsers;
|
vector <BitmapText> m_textUsers;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//Eventually we won't be using quads in this method.
|
||||||
|
#define SET_QUAD_INIT( actor ) UtilSetQuadInit( actor, m_sName );
|
||||||
|
void UtilSetQuadInit( Actor& actor, const CString &sClassName );
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user