1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
#pragma once
// Our Assert conflicts with the definitions inside libRocket
#pragma push_macro("Assert")
#undef Assert
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wshadow"
#endif
#include <Rocket/Core/Element.h>
#include <Rocket/Core/Geometry.h>
#include <Rocket/Core/Texture.h>
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
#pragma pop_macro("Assert")
namespace scpui {
namespace elements {
using namespace Rocket::Core;
class ScrollingTextElement : public Rocket::Core::Element {
public:
ScrollingTextElement(const String& tag_in);
~ScrollingTextElement() override;
protected:
void OnAttributeChange(const AttributeNameList& changed_attributes) override;
void OnBeforeRender() override;
void OnAfterRender() override;
void OnChildAdd(Element* child) override;
void OnChildRemove(Element* child) override;
float _duration = 1.5f;
float _animation_start_time = -1.0f;
};
} // namespace elements
} // namespace scpui
|