diff --git a/RetroFE/Source/CMakeLists.txt b/RetroFE/Source/CMakeLists.txt index 30c1d15..4332ed3 100644 --- a/RetroFE/Source/CMakeLists.txt +++ b/RetroFE/Source/CMakeLists.txt @@ -115,7 +115,7 @@ set(RETROFE_HEADERS "${RETROFE_DIR}/Source/Graphics/Component/ImageBuilder.h" "${RETROFE_DIR}/Source/Graphics/Component/ReloadableMedia.h" "${RETROFE_DIR}/Source/Graphics/Component/ReloadableText.h" - "${RETROFE_DIR}/Source/Graphics/Component/ScrollingText.h" + "${RETROFE_DIR}/Source/Graphics/Component/ReloadableScrollingText.h" "${RETROFE_DIR}/Source/Graphics/Component/ScrollingList.h" "${RETROFE_DIR}/Source/Graphics/Component/Text.h" "${RETROFE_DIR}/Source/Graphics/Component/VideoComponent.h" @@ -172,7 +172,7 @@ set(RETROFE_SOURCES "${RETROFE_DIR}/Source/Graphics/Component/Text.cpp" "${RETROFE_DIR}/Source/Graphics/Component/ReloadableMedia.cpp" "${RETROFE_DIR}/Source/Graphics/Component/ReloadableText.cpp" - "${RETROFE_DIR}/Source/Graphics/Component/ScrollingText.cpp" + "${RETROFE_DIR}/Source/Graphics/Component/ReloadableScrollingText.cpp" "${RETROFE_DIR}/Source/Graphics/Component/ScrollingList.cpp" "${RETROFE_DIR}/Source/Graphics/Component/VideoBuilder.cpp" "${RETROFE_DIR}/Source/Graphics/Component/VideoComponent.cpp" diff --git a/RetroFE/Source/Graphics/Component/ScrollingText.cpp b/RetroFE/Source/Graphics/Component/ReloadableScrollingText.cpp similarity index 96% rename from RetroFE/Source/Graphics/Component/ScrollingText.cpp rename to RetroFE/Source/Graphics/Component/ReloadableScrollingText.cpp index e926f03..55297a7 100644 --- a/RetroFE/Source/Graphics/Component/ScrollingText.cpp +++ b/RetroFE/Source/Graphics/Component/ReloadableScrollingText.cpp @@ -14,7 +14,7 @@ * along with RetroFE. If not, see . */ -#include "ScrollingText.h" +#include "ReloadableScrollingText.h" #include "../ViewInfo.h" #include "../../Database/Configuration.h" #include "../../Utility/Log.h" @@ -28,7 +28,7 @@ #include -ScrollingText::ScrollingText(Configuration &config, bool systemMode, bool layoutMode, std::string type, std::string textFormat, std::string alignment, Page &p, int displayOffset, Font *font, float scaleX, float scaleY, std::string direction, float scrollingSpeed, float startPosition, float startTime, float endTime ) +ReloadableScrollingText::ReloadableScrollingText(Configuration &config, bool systemMode, bool layoutMode, std::string type, std::string textFormat, std::string alignment, Page &p, int displayOffset, Font *font, float scaleX, float scaleY, std::string direction, float scrollingSpeed, float startPosition, float startTime, float endTime ) : Component(p) , config_(config) , systemMode_(systemMode) @@ -56,12 +56,12 @@ ScrollingText::ScrollingText(Configuration &config, bool systemMode, bool layout } -ScrollingText::~ScrollingText( ) +ReloadableScrollingText::~ReloadableScrollingText( ) { } -void ScrollingText::update(float dt) +void ReloadableScrollingText::update(float dt) { if (waitEndTime_ > 0) @@ -94,14 +94,14 @@ void ScrollingText::update(float dt) } -void ScrollingText::freeGraphicsMemory( ) +void ReloadableScrollingText::freeGraphicsMemory( ) { Component::freeGraphicsMemory( ); text_.clear( ); } -void ScrollingText::reloadTexture( ) +void ReloadableScrollingText::reloadTexture( ) { if (direction_ == "horizontal") @@ -200,7 +200,7 @@ void ScrollingText::reloadTexture( ) } -void ScrollingText::loadText( std::string collection, std::string type, std::string basename, bool systemMode ) +void ReloadableScrollingText::loadText( std::string collection, std::string type, std::string basename, bool systemMode ) { std::string textPath = ""; @@ -262,7 +262,7 @@ void ScrollingText::loadText( std::string collection, std::string type, std::str } -void ScrollingText::draw( ) +void ReloadableScrollingText::draw( ) { Component::draw( ); diff --git a/RetroFE/Source/Graphics/Component/ScrollingText.h b/RetroFE/Source/Graphics/Component/ReloadableScrollingText.h similarity index 82% rename from RetroFE/Source/Graphics/Component/ScrollingText.h rename to RetroFE/Source/Graphics/Component/ReloadableScrollingText.h index 4d1cc92..7524b7a 100644 --- a/RetroFE/Source/Graphics/Component/ScrollingText.h +++ b/RetroFE/Source/Graphics/Component/ReloadableScrollingText.h @@ -21,11 +21,11 @@ #include -class ScrollingText : public Component +class ReloadableScrollingText : public Component { public: - ScrollingText(Configuration &config, bool systemMode, bool layoutMode, std::string type, std::string textFormat, std::string alignment, Page &page, int displayOffset, Font *font, float scaleX, float scaleY, std::string direction, float scrollingSpeed, float startPosition, float startTime, float endTime ); - virtual ~ScrollingText( ); + ReloadableScrollingText(Configuration &config, bool systemMode, bool layoutMode, std::string type, std::string textFormat, std::string alignment, Page &page, int displayOffset, Font *font, float scaleX, float scaleY, std::string direction, float scrollingSpeed, float startPosition, float startTime, float endTime ); + virtual ~ReloadableScrollingText( ); void update(float dt); void draw( ); void freeGraphicsMemory( ); diff --git a/RetroFE/Source/Graphics/PageBuilder.cpp b/RetroFE/Source/Graphics/PageBuilder.cpp index 3a28fa7..06e2981 100644 --- a/RetroFE/Source/Graphics/PageBuilder.cpp +++ b/RetroFE/Source/Graphics/PageBuilder.cpp @@ -22,7 +22,7 @@ #include "Component/Text.h" #include "Component/ReloadableText.h" #include "Component/ReloadableMedia.h" -#include "Component/ScrollingText.h" +#include "Component/ReloadableScrollingText.h" #include "Component/ScrollingList.h" #include "Component/Video.h" #include "Animate/AnimationEvents.h" @@ -431,10 +431,10 @@ bool PageBuilder::buildComponents(xml_node<> *layout, Page *page) } - loadReloadableImages(layout, "reloadableImage", page); - loadReloadableImages(layout, "reloadableVideo", page); - loadReloadableImages(layout, "reloadableText", page); - loadReloadableImages(layout, "scrollingText", page); + loadReloadableImages(layout, "reloadableImage", page); + loadReloadableImages(layout, "reloadableVideo", page); + loadReloadableImages(layout, "reloadableText", page); + loadReloadableImages(layout, "reloadableScrollingText", page); return true; } @@ -479,9 +479,9 @@ void PageBuilder::loadReloadableImages(xml_node<> *layout, std::string tagName, { Logger::write(Logger::ZONE_ERROR, "Layout", "Image component in layout does not specify a source image file"); } - if(!type && tagName == "scrollingText") + if(!type && tagName == "reloadableScrollingText") { - Logger::write(Logger::ZONE_ERROR, "Layout", "Scroling Text component in layout does not specify a type"); + Logger::write(Logger::ZONE_ERROR, "Layout", "Reloadable scroling text component in layout does not specify a type"); } @@ -560,7 +560,7 @@ void PageBuilder::loadReloadableImages(xml_node<> *layout, std::string tagName, c = new ReloadableText(type->value(), *page, config_, font, layoutKey, timeFormat, textFormat, singlePrefix, singlePostfix, pluralPrefix, pluralPostfix, scaleX_, scaleY_); } } - else if(tagName == "scrollingText") + else if(tagName == "reloadableScrollingText") { if(type) { @@ -600,7 +600,7 @@ void PageBuilder::loadReloadableImages(xml_node<> *layout, std::string tagName, { alignment = alignmentXml->value(); } - c = new ScrollingText(config_, systemMode, layoutMode, type->value(), textFormat, alignment, *page, selectedOffset, font, scaleX_, scaleY_, direction, scrollingSpeed, startPosition, startTime, endTime); + c = new ReloadableScrollingText(config_, systemMode, layoutMode, type->value(), textFormat, alignment, *page, selectedOffset, font, scaleX_, scaleY_, direction, scrollingSpeed, startPosition, startTime, endTime); } } else