mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2026-01-26 17:54:46 +01:00
Renamed scrollingText to reloadableScrollingText to allow for later scrollingText feature that loads from a fixed file, and to improve consistency in naming. This will require all themes that use scrollingText to replace the tag with reloadableScrollingText.
This commit is contained in:
parent
92b0ca41c3
commit
6dd0654bad
@ -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"
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
* along with RetroFE. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ScrollingText.h"
|
||||
#include "ReloadableScrollingText.h"
|
||||
#include "../ViewInfo.h"
|
||||
#include "../../Database/Configuration.h"
|
||||
#include "../../Utility/Log.h"
|
||||
@ -28,7 +28,7 @@
|
||||
#include <algorithm>
|
||||
|
||||
|
||||
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( );
|
||||
|
||||
@ -21,11 +21,11 @@
|
||||
#include <string>
|
||||
|
||||
|
||||
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( );
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user