aboutsummaryrefslogtreecommitdiffstats
path: root/src/menu/background_color.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/menu/background_color.hpp')
-rw-r--r--src/menu/background_color.hpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/menu/background_color.hpp b/src/menu/background_color.hpp
index 7913fe30..4ba040cb 100644
--- a/src/menu/background_color.hpp
+++ b/src/menu/background_color.hpp
@@ -29,6 +29,7 @@
#include "background.hpp"
#include "utils/rgb_color.hpp"
+#include "utils/dimension.hpp"
namespace usdx
{
@@ -37,6 +38,19 @@ namespace usdx
private:
GLint vertices[8];
RgbColor color;
+
+ /**
+ * Cache for the size of the parent component, to be able to detect
+ * changes.
+ */
+ Dimension<int> size;
+
+ /**
+ * Update the vertices for drawing the background, if the size if the
+ * parent component changes.
+ */
+ void updateVertices();
+
protected:
void draw(void);