aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/menu/menuBackground.cpp (renamed from src/menu/UMenuBackgroundNone.pas)66
-rw-r--r--src/menu/menuBackground.hpp5
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