diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2009-12-26 14:27:22 +0100 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2013-01-05 17:17:42 +0100 |
commit | 0e25625d4027ebf984489a07c3b9e9e47e25ce5d (patch) | |
tree | 2c672d1509168009962402a0e9b650d049b1660f /src | |
parent | 396d1c86bf39cd734566ff645bca401f50942aaa (diff) | |
download | usdx-0e25625d4027ebf984489a07c3b9e9e47e25ce5d.tar.gz usdx-0e25625d4027ebf984489a07c3b9e9e47e25ce5d.tar.xz usdx-0e25625d4027ebf984489a07c3b9e9e47e25ce5d.zip |
converted UMenuBackgroundNone
Diffstat (limited to 'src')
-rw-r--r-- | src/menu/menuBackground.cpp (renamed from src/menu/UMenuBackgroundNone.pas) | 66 | ||||
-rw-r--r-- | src/menu/menuBackground.hpp | 5 |
2 files changed, 23 insertions, 48 deletions
diff --git a/src/menu/UMenuBackgroundNone.pas b/src/menu/menuBackground.cpp index c64f3023..430ff0d1 100644 --- a/src/menu/UMenuBackgroundNone.pas +++ b/src/menu/menuBackground.cpp @@ -1,4 +1,5 @@ -{* UltraStar Deluxe - Karaoke Game +/* + * 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 @@ -21,50 +22,19 @@ * * $URL$ * $Id$ - *} - -unit UMenuBackgroundNone; - -interface - -{$IFDEF FPC} - {$MODE Delphi} -{$ENDIF} - -{$I switches.inc} - -uses - UThemes, - UMenuBackground; - -//TMenuBackgroundNone - Just no Background (e.g. for Overlays) -//-------- - -type - TMenuBackgroundNone = class (TMenuBackground) - private - - public - constructor Create(const ThemedSettings: TThemeBackground); override; - procedure Draw; override; - end; - -implementation -uses - gl, - glext, - UGraphic; - -constructor TMenuBackgroundNone.Create(const ThemedSettings: TThemeBackground); -begin - inherited; -end; - -procedure TMenuBackgroundNone.Draw; -begin - //Do just nothing in here! - If (ScreenAct = 1) then //Clear just once when in dual screen mode - glClear(GL_DEPTH_BUFFER_BIT); -end; - -end.
\ No newline at end of file + */ + +#include "menuBackground.hpp" +#include <GL/gl.h> + +int screen_act = 1; + +namespace usdx +{ + void MenuBackgroundNone::draw(void) + { + // clear just once when in dual screen mode + if (screen_act == 0) + glClear(GL_DEPTH_BUFFER_BIT); + } +}; diff --git a/src/menu/menuBackground.hpp b/src/menu/menuBackground.hpp index 9f3e76fa..d108eb99 100644 --- a/src/menu/menuBackground.hpp +++ b/src/menu/menuBackground.hpp @@ -49,6 +49,11 @@ namespace usdx MenuBackground(const MenuBackground&); MenuBackground& operator=(const MenuBackground&); }; + + class MenuBackgroundNone : MenuBackground + { + virtual void draw(void); + }; }; #endif |