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.cpp | |
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 'src/menu/background.cpp')
-rw-r--r-- | src/menu/background.cpp | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/menu/background.cpp b/src/menu/background.cpp new file mode 100644 index 00000000..ad528039 --- /dev/null +++ b/src/menu/background.cpp @@ -0,0 +1,44 @@ +/* + * UltraStar Deluxe - Karaoke Game + * + * UltraStar Deluxe is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + */ + +#include "background.hpp" + +namespace usdx +{ + Background::Background(const DrawableControl &control) : + parent(control) + { + } + + Background::~Background() + { + } + + const DrawableControl &Background::get_parent(void) const + { + return parent; + } +}; |