diff --git a/RetroFE/Source/Graphics/Component/Component.h b/RetroFE/Source/Graphics/Component/Component.h index 8f96c42..de42121 100644 --- a/RetroFE/Source/Graphics/Component/Component.h +++ b/RetroFE/Source/Graphics/Component/Component.h @@ -86,7 +86,6 @@ private: bool Animate(bool loop); bool IsTweenSequencingComplete(); - void ResetTweenSequence(std::vector *tweens); TweenSets *Tweens; TweenSets::TweenAttributes *CurrentTweens; diff --git a/RetroFE/Source/Graphics/Font.h b/RetroFE/Source/Graphics/Font.h index 12b02af..a9d0561 100644 --- a/RetroFE/Source/Graphics/Font.h +++ b/RetroFE/Source/Graphics/Font.h @@ -50,5 +50,3 @@ private: std::map Atlas; SDL_Texture *Texture; }; - - diff --git a/RetroFE/Source/Graphics/Page.cpp b/RetroFE/Source/Graphics/Page.cpp index ae4528e..3f3305e 100644 --- a/RetroFE/Source/Graphics/Page.cpp +++ b/RetroFE/Source/Graphics/Page.cpp @@ -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() } } } - diff --git a/RetroFE/Source/Graphics/Page.h b/RetroFE/Source/Graphics/Page.h index 4221585..d60a299 100644 --- a/RetroFE/Source/Graphics/Page.h +++ b/RetroFE/Source/Graphics/Page.h @@ -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(); diff --git a/RetroFE/Source/Graphics/PageBuilder.h b/RetroFE/Source/Graphics/PageBuilder.h index 300815f..cb575f6 100644 --- a/RetroFE/Source/Graphics/PageBuilder.h +++ b/RetroFE/Source/Graphics/PageBuilder.h @@ -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 *> *TweenAttributes); void GetTweenSets(rapidxml::xml_node<> *node, std::vector &tweens); - - - void LoadLayoutXml(); - void LoadAnimations(std::string keyPrefix, Component &component, ViewInfo *defaults); - std::vector * 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 *tweenPointList, ViewInfo *defaults, int &selectedItemIndex); - void UpdateViewInfoFromTag(std::string keyPrefix, ViewInfo *p, ViewInfo *defaults); };