diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2012-04-15 22:50:28 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2013-01-13 22:40:52 +0100 |
commit | 816030e73aad13c39bc84ca6fdb814ba7131f19f (patch) | |
tree | ead3c4c691b3db7f396982327307c5da6ca99855 /src/menu/background_color.hpp | |
parent | e0e9997a5e92ce2a31f0ff4d139109be4434105b (diff) | |
download | usdx-816030e73aad13c39bc84ca6fdb814ba7131f19f.tar.gz usdx-816030e73aad13c39bc84ca6fdb814ba7131f19f.tar.xz usdx-816030e73aad13c39bc84ca6fdb814ba7131f19f.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | src/menu/background_color.hpp | 11 |
1 files changed, 7 insertions, 4 deletions
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 <GL/gl.h> + #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); }; }; |