From 816030e73aad13c39bc84ca6fdb814ba7131f19f Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Sun, 15 Apr 2012 22:50:28 +0200 Subject: menu/background: backgrounds get to know the parent component Backgrounds now know the parent control, they are painted in, to query the size. Backgrounds are not allowed to use glClear anymore, should only draw something during the extend of the parent control and should take care to do not modify the opengl cursor position. --- src/menu/background_color.hpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/menu/background_color.hpp') diff --git a/src/menu/background_color.hpp b/src/menu/background_color.hpp index d91edcdf..d1793744 100644 --- a/src/menu/background_color.hpp +++ b/src/menu/background_color.hpp @@ -27,6 +27,8 @@ #ifndef BACKGROUND_COLOR_HPP #define BACKGROUND_COLOR_HPP +#include + #include "background.hpp" #include "utils/rgb_color.hpp" @@ -35,14 +37,15 @@ namespace usdx class BackgroundColor : public Background { private: - RgbColor color; - + GLint vertices[8]; + GLubyte color[12]; protected: void draw(void); public: - BackgroundColor(void); - BackgroundColor(RgbColor &color); + BackgroundColor(const DrawableControl &control); + BackgroundColor(const DrawableControl &control, + const RgbColor &color); }; }; -- cgit v1.2.3