TDME2  1.9.200
GUIPositionEffect.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <tdme/tdme.h>
9 
14 
15 /**
16  * GUI position effect
17  * @author Andreas Drewke
18  */
20 {
21 
22 public:
23  /**
24  * Reset effect state regarding position effect
25  * @param effectState effect state
26  */
27  inline static void resetEffectState(GUIEffectState* effectState) {
28  effectState->positionX = 0.0f;
29  effectState->positionY = 0.0f;
30  }
31 
32  // forbid class copy
34 
35  /**
36  * Public constructor
37  * @param guiNode GUI node
38  */
39  GUIPositionEffect(GUINode* guiNode);
40 
41  /**
42  * @return position X
43  */
44  inline float getPositionX() const {
46  }
47 
48  /**
49  * Set position X
50  * @param positionX position X
51  */
52  inline void setPositionX(float positionX) {
53  originalEndState.positionX = positionX;
54  }
55 
56  /**
57  * @return position Y
58  */
59  inline float getPositionY() const {
61  }
62 
63  /**
64  * Set position Y
65  * @param positionX position Y
66  */
67  inline void setPositionY(float positionY) {
68  originalEndState.positionY = positionY;
69  }
70 
71  /**
72  * @return start position X
73  */
74  inline float getStartPositionX() const {
76  }
77 
78  /**
79  * Set start position X
80  * @param positionX start position X
81  */
82  inline void setStartPositionX(float positionX) {
83  originalStartState.positionX = positionX;
84  }
85 
86  /**
87  * @return start position Y
88  */
89  inline float getStartPositionY() const {
91  }
92 
93  /**
94  * Set start position Y
95  * @param positionX start position Y
96  */
97  inline void setStartPositionY(float positionY) {
98  originalStartState.positionY = positionY;
99  }
100 
101  // overridden methods
102  void apply(GUIRenderer* guiRenderer) override;
103 
104 };
GUI effect base class.
Definition: GUIEffect.h:26
GUIEffectState originalEndState
Definition: GUIEffect.h:46
GUIEffectState originalStartState
Definition: GUIEffect.h:45
GUIPositionEffect(GUINode *guiNode)
Public constructor.
void setPositionY(float positionY)
Set position Y.
void apply(GUIRenderer *guiRenderer) override
Apply effect.
static void resetEffectState(GUIEffectState *effectState)
Reset effect state regarding position effect.
void setStartPositionX(float positionX)
Set start position X.
void setStartPositionY(float positionY)
Set start position Y.
void setPositionX(float positionX)
Set position X.
GUI node base class.
Definition: GUINode.h:64
#define FORBID_CLASS_COPY(CLASS)
Definition: tdme.h:6