33#pragma once
44
55#include < cstdint>
6- #include < shared_mutex>
7- #include < string>
86
97#include " coord/pixel.h"
108#include " curve/continuous.h"
11- #include " time/time .h"
9+ #include " renderer/stages/render_entity .h"
1210
1311
1412namespace openage ::renderer::hud {
1513
1614/* *
1715 * Render entity for pushing drag selection updates to the HUD renderer.
1816 */
19- class HudDragRenderEntity {
17+ class HudDragRenderEntity final : public renderer::RenderEntity {
2018public:
2119 /* *
2220 * Create a new render entity for drag selection in the HUD.
@@ -36,13 +34,6 @@ class HudDragRenderEntity {
3634 void update (const coord::input drag_pos,
3735 const time::time_t time = 0.0 );
3836
39- /* *
40- * Get the time of the last update.
41- *
42- * @return Time of last update.
43- */
44- time::time_t get_update_time ();
45-
4637 /* *
4738 * Get the position of the dragged corner.
4839 *
@@ -57,31 +48,7 @@ class HudDragRenderEntity {
5748 */
5849 const coord::input &get_drag_start ();
5950
60- /* *
61- * Check whether the render entity has received new updates.
62- *
63- * @return true if updates have been received, else false.
64- */
65- bool is_changed ();
66-
67- /* *
68- * Clear the update flag by setting it to false.
69- */
70- void clear_changed_flag ();
71-
7251private:
73- /* *
74- * Flag for determining if the render entity has been updated by the
75- * corresponding gamestate entity. Set to true every time \p update()
76- * is called.
77- */
78- bool changed;
79-
80- /* *
81- * Time of the last update call.
82- */
83- time::time_t last_update;
84-
8552 /* *
8653 * Position of the dragged corner.
8754 */
@@ -91,10 +58,5 @@ class HudDragRenderEntity {
9158 * Position of the start corner.
9259 */
9360 coord::input drag_start;
94-
95- /* *
96- * Mutex for protecting threaded access.
97- */
98- std::shared_mutex mutex;
9961};
10062} // namespace openage::renderer::hud
0 commit comments