Moved implementations from header files to cpp files. Removed unused functions.

This commit is contained in:
Don Honerbrink 2015-02-17 16:39:13 -06:00
parent 86200ad731
commit 1f8441a0ce
5 changed files with 34 additions and 45 deletions

View File

@ -86,7 +86,6 @@ private:
bool Animate(bool loop);
bool IsTweenSequencingComplete();
void ResetTweenSequence(std::vector<ViewInfo *> *tweens);
TweenSets *Tweens;
TweenSets::TweenAttributes *CurrentTweens;

View File

@ -50,5 +50,3 @@ private:
std::map<unsigned int, GlyphInfoBuild *> Atlas;
SDL_Texture *Texture;
};

View File

@ -92,6 +92,28 @@ Page::~Page()
}
}
bool Page::IsMenusFull()
{
return (MenuDepth > Menus.size());
}
void Page::SetLoadSound(Sound *chunk)
{
LoadSoundChunk = chunk;
}
void Page::SetUnloadSound(Sound *chunk)
{
UnloadSoundChunk = chunk;
}
void Page::SetHighlightSound(Sound *chunk)
{
HighlightSoundChunk = chunk;
}
void Page::SetSelectSound(Sound *chunk)
{
SelectSoundChunk = chunk;
}
void Page::OnNewItemSelected(Item *item)
{
SelectedItem = item;
@ -108,6 +130,10 @@ void Page::PushMenu(ScrollingList *s)
}
}
unsigned int Page::GetMenuDepth()
{
return MenuDepth;
}
void Page::SetStatusTextComponent(Text *t)
{
@ -580,4 +606,3 @@ void Page::LaunchExit()
}
}
}

View File

@ -45,40 +45,20 @@ public:
virtual ~Page();
virtual void OnNewItemSelected(Item *);
bool PushCollection(CollectionInfo *collection);
bool IsMenusFull()
{
return (MenuDepth > Menus.size());
}
bool PopCollection();
void PushMenu(ScrollingList *s);
void SetLoadSound(Sound *chunk)
{
LoadSoundChunk = chunk;
}
void SetUnloadSound(Sound *chunk)
{
UnloadSoundChunk = chunk;
}
void SetHighlightSound(Sound *chunk)
{
HighlightSoundChunk = chunk;
}
void SetSelectSound(Sound *chunk)
{
SelectSoundChunk = chunk;
}
bool IsMenusFull();
void SetLoadSound(Sound *chunk);
void SetUnloadSound(Sound *chunk);
void SetHighlightSound(Sound *chunk);
void SetSelectSound(Sound *chunk);
bool AddComponent(Component *c);
void PageScroll(ScrollDirection direction);
void Start();
void StartComponents();
void Stop();
void SetScrolling(ScrollDirection direction);
unsigned int GetMenuDepth()
{
return MenuDepth;
}
unsigned int GetMenuDepth();
Item *GetSelectedItem();
Item *GetPendingSelectedItem();
void RemoveSelectedItem();

View File

@ -45,9 +45,9 @@ private:
SDL_Color FontColor;
std::string Font;
int FontSize;
FontCache *FC; //todo: don't need Font itself, just need cache instances
void LoadReloadableImages(rapidxml::xml_node<> *layout, std::string tagName, Page *page);
FontCache *FC;
void LoadReloadableImages(rapidxml::xml_node<> *layout, std::string tagName, Page *page);
float GetVerticalAlignment(rapidxml::xml_attribute<> *attribute, float valueIfNull);
float GetHorizontalAlignment(rapidxml::xml_attribute<> *attribute, float valueIfNull);
void BuildViewInfo(rapidxml::xml_node<> *componentXml, ViewInfo *info, rapidxml::xml_node<> *defaultXml = NULL);
@ -58,22 +58,9 @@ private:
ScrollingList * BuildMenu(rapidxml::xml_node<> *menuXml);
void BuildCustomMenu(ScrollingList *menu, rapidxml::xml_node<> *menuXml, rapidxml::xml_node<> *itemDefaults);
void BuildVerticalMenu(ScrollingList *menu, rapidxml::xml_node<> *menuXml, rapidxml::xml_node<> *itemDefaults);
int ParseMenuPosition(std::string strIndex);
rapidxml::xml_attribute<> *FindAttribute(rapidxml::xml_node<> *componentXml, std::string attribute, rapidxml::xml_node<> *defaultXml);
void GetTweenAttributes(rapidxml::xml_node<> *node, std::vector<std::vector<Tween *> *> *TweenAttributes);
void GetTweenSets(rapidxml::xml_node<> *node, std::vector<Tween *> &tweens);
void LoadLayoutXml();
void LoadAnimations(std::string keyPrefix, Component &component, ViewInfo *defaults);
std::vector<ViewInfo *> * BuildTweenPoints(std::string iteratorPrefix, ViewInfo *defaults);
Component * LoadComponent(std::string keyPrefix);
ScrollingList * LoadMenu();
ViewInfo * CreateMenuItemInfo(rapidxml::xml_node<> *component, rapidxml::xml_node<> *defaults, float y);
void LoadListItems(std::string keyPrefix, std::vector<ViewInfo *> *tweenPointList, ViewInfo *defaults, int &selectedItemIndex);
void UpdateViewInfoFromTag(std::string keyPrefix, ViewInfo *p, ViewInfo *defaults);
};