diff options
author | brunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-02-21 21:28:52 +0000 |
---|---|---|
committer | brunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-02-21 21:28:52 +0000 |
commit | 754d71a59b7d07a12c7e7d198b7fdc3c9e1bdc5e (patch) | |
tree | 3212c14a900da8c4f62ce626633ed30901b30265 /Game/Code/Classes/UDraw.pas | |
parent | 69b1910acc77c177dba95d7375a668c07648093a (diff) | |
download | usdx-754d71a59b7d07a12c7e7d198b7fdc3c9e1bdc5e.tar.gz usdx-754d71a59b7d07a12c7e7d198b7fdc3c9e1bdc5e.tar.xz usdx-754d71a59b7d07a12c7e7d198b7fdc3c9e1bdc5e.zip |
moved and renamed DrawVolume to UDraw.DrawVolumeBar
added volume control to score screen, top screen and jumpto menu
fixed a bug with VocalRemover when pausing a song
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1 Challenge MOD@2137 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Classes/UDraw.pas')
-rw-r--r-- | Game/Code/Classes/UDraw.pas | 64 |
1 files changed, 61 insertions, 3 deletions
diff --git a/Game/Code/Classes/UDraw.pas b/Game/Code/Classes/UDraw.pas index 5b0a284c..d55448ad 100644 --- a/Game/Code/Classes/UDraw.pas +++ b/Game/Code/Classes/UDraw.pas @@ -30,6 +30,9 @@ procedure SingDrawLineBonus( const X, Y: Single; Color: TRGB; Alpha: Single; Tex //Draw Editor NoteLines
procedure EditDrawCzesc(Left, Top, Right: real; NrCzesci: integer; Space: integer);
+//Draw Volume Bar
+procedure DrawVolumeBar(x, y, w, h: Real; Volume: Integer);
+
type
TRecR = record
@@ -1457,8 +1460,6 @@ var R: Real;
G: Real;
B: Real;
- A: cardinal;
- I: Integer;
begin;
@@ -1535,7 +1536,7 @@ end; //PhrasenBonus - Line Bonus Mod
procedure SingDrawLineBonus( const X, Y: Single; Color: TRGB; Alpha: Single; Text: string; Age: Integer);
var
-Length, X2: Real; //Length of Text
+Length: Real; //Length of Text
Size: Integer; //Size of Popup
begin
if Alpha <> 0 then
@@ -1711,5 +1712,62 @@ begin glcolor4f(1,1,1,1);
end;
+procedure DrawVolumeBar(x, y, w, h: Real; Volume: Integer);
+const
+ step = 5;
+
+var
+ txt: PChar;
+ str: string;
+ I: integer;
+ num: integer;
+
+begin
+ num := round(100/step);
+
+ for I := 1 to num do
+ begin
+ if (I<=round(Volume/step)) then
+ begin
+ glColor4f(0.0, 0.8, 0.0, 0.8);
+ glEnable(GL_BLEND);
+ glbegin(gl_quads); + glVertex2f(x+(I-1)*(w/num), y); + glVertex2f(x+(I-1)*(w/num), y+h); + glVertex2f(x+(I)*(w/num)-2, y+h); + glVertex2f(x+(I)*(w/num)-2, y); + glEnd;
+ glDisable(GL_BLEND);
+ end else
+ begin
+ glColor4f(0.7, 0.7, 0.7, 0.6);
+ glEnable(GL_BLEND);
+ glbegin(gl_quads); + glVertex2f(x+(I-1)*(w/num), y); + glVertex2f(x+(I-1)*(w/num), y+h); + glVertex2f(x+(I)*(w/num)-2, y+h); + glVertex2f(x+(I)*(w/num)-2, y); + glEnd;
+ glDisable(GL_BLEND);
+ end;
+ end;
+
+ {
+ //print Text
+ str := IntToStr(MP3Volume)+ '%';
+
+ glColor4f(1, 1, 1, 1);
+
+ h := 8;
+ SetFontStyle(1); + SetFontItalic(false); + SetFontSize(h); + w := glTextWidth(PChar(str)); + + SetFontPos (x+2, y+2); + txt := Addr(str[1]); + glPrint(txt); }
+end;
+
end.
|