Updating scrollinglist copy constructor to include the selected sprite list index

This commit is contained in:
Don Honerbrink 2015-02-26 19:30:48 +00:00
parent 97635859d5
commit 510c85f6ad

View File

@ -70,13 +70,13 @@ ScrollingList::ScrollingList(Configuration &c,
{
}
ScrollingList::ScrollingList(const ScrollingList &copy)
ScrollingList::ScrollingList(const ScrollingList &copy)
: Component(copy)
, SpriteList(NULL)
, TweenEnterTime(0)
, Focus(false)
, FirstSpriteIndex(0)
, SelectedSpriteListIndex(0)
, SelectedSpriteListIndex(copy.SelectedSpriteListIndex)
, ScrollStopRequested(true)
, NotifyAllRequested(false)
, CurrentScrollDirection(ScrollDirectionIdle)
@ -100,24 +100,24 @@ ScrollingList::ScrollingList(const ScrollingList &copy)
if(copy.ScrollPoints)
{
ScrollPoints = new std::vector<ViewInfo *>();
for(unsigned int i = 0; i < copy.ScrollPoints->size(); ++i)
{
ViewInfo *v = new ViewInfo(*copy.ScrollPoints->at(i));
ScrollPoints->push_back(v);
}
}
for(unsigned int i = 0; i < copy.ScrollPoints->size(); ++i)
{
ViewInfo *v = new ViewInfo(*copy.ScrollPoints->at(i));
ScrollPoints->push_back(v);
}
}
if(copy.TweenPoints)
{
TweenPoints = new std::vector<AnimationEvents *>();
for(unsigned int i = 0; i < copy.TweenPoints->size(); ++i)
{
AnimationEvents *v = new AnimationEvents(*copy.TweenPoints->at(i));
TweenPoints->push_back(v);
}
}
for(unsigned int i = 0; i < copy.TweenPoints->size(); ++i)
{
AnimationEvents *v = new AnimationEvents(*copy.TweenPoints->at(i));
TweenPoints->push_back(v);
}
}
}
ScrollingList::~ScrollingList()
{
@ -689,11 +689,11 @@ bool ScrollingList::AllocateTexture(ComponentItemBinding *s)
Config.GetMediaPropertyAbsolutePath(GetCollectionName(), ImageType, false, imagePath);
t = imageBuild.CreateImage(imagePath, item->GetName(), ScaleX, ScaleY);
if(!t)
{
Config.GetMediaPropertyAbsolutePath(item->GetName(), ImageType, true, imagePath);
if(!t)
{
Config.GetMediaPropertyAbsolutePath(item->GetName(), ImageType, true, imagePath);
t = imageBuild.CreateImage(imagePath, ImageType, ScaleX, ScaleY);
}
}
if(!t && item->GetTitle() != item->GetFullTitle())
{