From 322b798413826681915eca1960f081cbc4dd302c Mon Sep 17 00:00:00 2001 From: whiteshark0 Date: Mon, 13 Oct 2008 14:14:32 +0000 Subject: Abstraction of the menus background 5 different bg types: none(fallback), colored, texture, video, and fade(for overlays) Some sideeffect is 5 mb less memory usage, don't know for which reasons :P git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1446 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/menu/UMenuBackground.pas | 85 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 src/menu/UMenuBackground.pas (limited to 'src/menu/UMenuBackground.pas') diff --git a/src/menu/UMenuBackground.pas b/src/menu/UMenuBackground.pas new file mode 100644 index 00000000..762faf34 --- /dev/null +++ b/src/menu/UMenuBackground.pas @@ -0,0 +1,85 @@ +{* 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$ + *} + +unit UMenuBackground; + +interface + +{$IFDEF FPC} + {$MODE Delphi} +{$ENDIF} + +{$I switches.inc} + +uses + SysUtils, + UThemes; + +//TMenuBackground - abstraction class for MenuBackgrounds +//this is a class, not an interface because of the constructors +//and destructors +//-------- + +type + EMenuBackgroundError = class(Exception); + TMenuBackground = class + Constructor Create(const ThemedSettings: TThemeBackground); virtual; + Procedure OnShow; virtual; + Procedure Draw; virtual; + Procedure OnFinish; virtual; + Destructor Destroy; virtual; + end; + cMenuBackground = class of TMenuBackground; + +implementation + +Constructor TMenuBackground.Create(const ThemedSettings: TThemeBackground); +begin + inherited Create; +end; + +Destructor TMenuBackground.Destroy; +begin + inherited; +end; + + +Procedure TMenuBackground.OnShow; +begin + +end; + +Procedure TMenuBackground.OnFinish; +begin + +end; + + +Procedure TMenuBackground.Draw; +begin + +end; + +end. -- cgit v1.2.3 From e60c0d3e29be2c77e7ab8deca6c37d0b07ebf085 Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Sat, 18 Oct 2008 21:13:16 +0000 Subject: style adjustments. no code change. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1456 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/menu/UMenuBackground.pas | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'src/menu/UMenuBackground.pas') diff --git a/src/menu/UMenuBackground.pas b/src/menu/UMenuBackground.pas index 762faf34..6a73b621 100644 --- a/src/menu/UMenuBackground.pas +++ b/src/menu/UMenuBackground.pas @@ -45,39 +45,37 @@ uses type EMenuBackgroundError = class(Exception); TMenuBackground = class - Constructor Create(const ThemedSettings: TThemeBackground); virtual; - Procedure OnShow; virtual; - Procedure Draw; virtual; - Procedure OnFinish; virtual; - Destructor Destroy; virtual; + constructor Create(const ThemedSettings: TThemeBackground); virtual; + procedure OnShow; virtual; + procedure Draw; virtual; + procedure OnFinish; virtual; + destructor Destroy; virtual; end; cMenuBackground = class of TMenuBackground; implementation -Constructor TMenuBackground.Create(const ThemedSettings: TThemeBackground); +constructor TMenuBackground.Create(const ThemedSettings: TThemeBackground); begin inherited Create; end; -Destructor TMenuBackground.Destroy; +destructor TMenuBackground.Destroy; begin inherited; end; - -Procedure TMenuBackground.OnShow; +procedure TMenuBackground.OnShow; begin end; -Procedure TMenuBackground.OnFinish; +procedure TMenuBackground.OnFinish; begin end; - -Procedure TMenuBackground.Draw; +procedure TMenuBackground.Draw; begin end; -- cgit v1.2.3 From 6585afce2ccd8e7c5ccb3bb3599d4723b00a0433 Mon Sep 17 00:00:00 2001 From: tobigun Date: Tue, 28 Oct 2008 20:16:05 +0000 Subject: some compiler warnings/hints removed git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1485 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/menu/UMenuBackground.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/menu/UMenuBackground.pas') diff --git a/src/menu/UMenuBackground.pas b/src/menu/UMenuBackground.pas index 6a73b621..c85f0806 100644 --- a/src/menu/UMenuBackground.pas +++ b/src/menu/UMenuBackground.pas @@ -49,7 +49,7 @@ type procedure OnShow; virtual; procedure Draw; virtual; procedure OnFinish; virtual; - destructor Destroy; virtual; + destructor Destroy; override; end; cMenuBackground = class of TMenuBackground; -- cgit v1.2.3 From 917901e8e33438c425aef50a0a7417f32d77b760 Mon Sep 17 00:00:00 2001 From: s_alexander Date: Mon, 9 Nov 2009 00:27:55 +0000 Subject: merged unicode branch (r1931) into trunk git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1939 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/menu/UMenuBackground.pas | 166 +++++++++++++++++++++---------------------- 1 file changed, 83 insertions(+), 83 deletions(-) (limited to 'src/menu/UMenuBackground.pas') diff --git a/src/menu/UMenuBackground.pas b/src/menu/UMenuBackground.pas index c85f0806..0e2e63a6 100644 --- a/src/menu/UMenuBackground.pas +++ b/src/menu/UMenuBackground.pas @@ -1,83 +1,83 @@ -{* 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$ - *} - -unit UMenuBackground; - -interface - -{$IFDEF FPC} - {$MODE Delphi} -{$ENDIF} - -{$I switches.inc} - -uses - SysUtils, - UThemes; - -//TMenuBackground - abstraction class for MenuBackgrounds -//this is a class, not an interface because of the constructors -//and destructors -//-------- - -type - EMenuBackgroundError = class(Exception); - TMenuBackground = class - constructor Create(const ThemedSettings: TThemeBackground); virtual; - procedure OnShow; virtual; - procedure Draw; virtual; - procedure OnFinish; virtual; - destructor Destroy; override; - end; - cMenuBackground = class of TMenuBackground; - -implementation - -constructor TMenuBackground.Create(const ThemedSettings: TThemeBackground); -begin - inherited Create; -end; - -destructor TMenuBackground.Destroy; -begin - inherited; -end; - -procedure TMenuBackground.OnShow; -begin - -end; - -procedure TMenuBackground.OnFinish; -begin - -end; - -procedure TMenuBackground.Draw; -begin - -end; - -end. +{* 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$ + *} + +unit UMenuBackground; + +interface + +{$IFDEF FPC} + {$MODE Delphi} +{$ENDIF} + +{$I switches.inc} + +uses + SysUtils, + UThemes; + +//TMenuBackground - abstraction class for MenuBackgrounds +//this is a class, not an interface because of the constructors +//and destructors +//-------- + +type + EMenuBackgroundError = class(Exception); + TMenuBackground = class + constructor Create(const ThemedSettings: TThemeBackground); virtual; + procedure OnShow; virtual; + procedure Draw; virtual; + procedure OnFinish; virtual; + destructor Destroy; override; + end; + cMenuBackground = class of TMenuBackground; + +implementation + +constructor TMenuBackground.Create(const ThemedSettings: TThemeBackground); +begin + inherited Create; +end; + +destructor TMenuBackground.Destroy; +begin + inherited; +end; + +procedure TMenuBackground.OnShow; +begin + +end; + +procedure TMenuBackground.OnFinish; +begin + +end; + +procedure TMenuBackground.Draw; +begin + +end; + +end. -- cgit v1.2.3