File: ScrollingTextElement.h

package info (click to toggle)
freespace2 24.2.0%2Brepack-1
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid
  • size: 43,716 kB
  • sloc: cpp: 595,001; ansic: 21,741; python: 1,174; sh: 457; makefile: 248; xml: 181
file content (46 lines) | stat: -rw-r--r-- 978 bytes parent folder | download | duplicates (2)
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