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