mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2026-02-17 06:42:44 +01:00
Created Copy constructor for TweenSets (for reuse). Prepare for component copy constructor.
This commit is contained in:
parent
c74ddfb582
commit
6c4dfcb9af
@ -19,6 +19,21 @@
|
||||
TweenSets::TweenSets()
|
||||
{
|
||||
}
|
||||
TweenSets::TweenSets(TweenSets ©)
|
||||
{
|
||||
std::map<std::string, std::map<int, TweenAttributes *> >::iterator it;
|
||||
|
||||
for(it = copy.TweenMap.begin(); it != copy.TweenMap.end(); it++)
|
||||
{
|
||||
std::map<int, TweenAttributes *>::iterator it2;
|
||||
|
||||
for(it2 = (it->second).begin(); it2 != (it->second).end(); it2++)
|
||||
{
|
||||
TweenMap[it->first][it2->first] = it2->second;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
TweenSets::~TweenSets()
|
||||
{
|
||||
|
||||
@ -24,6 +24,7 @@ class TweenSets
|
||||
{
|
||||
public:
|
||||
TweenSets();
|
||||
TweenSets(TweenSets ©);
|
||||
~TweenSets();
|
||||
typedef std::vector<std::vector<Tween *> *> TweenAttributes;
|
||||
|
||||
|
||||
@ -56,7 +56,6 @@ public:
|
||||
void SetScrollActive(bool scrollActive);
|
||||
|
||||
protected:
|
||||
std::string CollectionName;
|
||||
Item *GetSelectedItem();
|
||||
enum AnimationState
|
||||
{
|
||||
@ -84,20 +83,20 @@ protected:
|
||||
bool HighlightExitComplete;
|
||||
bool NewItemSelectedSinceEnter;
|
||||
private:
|
||||
|
||||
bool Animate(bool loop);
|
||||
bool IsTweenSequencingComplete();
|
||||
void ResetTweenSequence(std::vector<ViewInfo *> *tweens);
|
||||
|
||||
TweenSets *Tweens;
|
||||
TweenSets::TweenAttributes *CurrentTweens;
|
||||
unsigned int CurrentTweenIndex;
|
||||
|
||||
bool CurrentTweenComplete;
|
||||
ViewInfo BaseViewInfo;
|
||||
|
||||
float ElapsedTweenTime;
|
||||
Tween *TweenInst;
|
||||
Item *SelectedItem;
|
||||
bool ScrollActive;
|
||||
SDL_Texture *BackgroundTexture;
|
||||
|
||||
unsigned int CurrentTweenIndex;
|
||||
bool CurrentTweenComplete;
|
||||
std::string CollectionName;
|
||||
ViewInfo BaseViewInfo;
|
||||
float ElapsedTweenTime;
|
||||
bool ScrollActive;
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user