function VuBoxW5_Render(This_Mod: PWinAMPVisModule): integer;
var
LastTime: DWord;
tr: TRect;
SongName : PChar;
PlaylistPos : LongInt;
begin
if Active
then
begin
LastTime := ElapsedTime;
ElapsedTime := GetTickCount() - PluginStart;
ElapsedTime := (LastTime + ElapsedTime)
div 2;
if VisForm.DrawAboutScroll
then
with VisForm.Image1.Canvas, VisForm.Image1
do
begin
Brush.Color := clBlack;
Font.Color := $00CEFFCE;
Font.Style := [fsBold];
FillRect(ClipRect);
SetRect(tr, 0, 0, Width, 0);
DrawText(
Handle, SAboutText, -1, tr,
DT_CALCRECT
or DT_WORDBREAK
or DT_CENTER
or DT_NOPREFIX);
tr.Top := VisForm.aboutpos;
tr.Left := Round((Width - (tr.Right - tr.Left)) / 2);
tr.Right := tr.Left + tr.Right;
tr.Bottom := tr.Top + tr.Bottom;
DrawText(
Handle, SAboutText, -1, tr,
DT_WORDBREAK
or DT_CENTER
or DT_NOPREFIX);
end else
begin
glDraw(This_Mod);
// Display Song Name
PlaylistPos:= SendMessage(This_Mod^.hWNDParent, WM_USER, 0, 125);
SongName := Pointer(SendMessage(This_Mod^.hWNDParent, WM_USER, PlaylistPos, 212));
glColor3f(1,1,1);
glEnable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
glPrintBitmap(10 , 10, SongName, 1);
glDisable(GL_BLEND);
if HelpScreen
then VuBoxW5HelpScreen();
SwapBuffers(h_DC);
end;
if VisForm.DrawAboutScroll
then
with VisForm.Image1.Canvas, VisForm.Image1
do
begin
SetRect(tr, 0, 0, Width, 0);
DrawText(
Handle, SAboutText, -1, tr,
DT_CALCRECT
or DT_WORDBREAK
or DT_CENTER
or DT_NOPREFIX);
if (VisForm.aboutpos + (tr.Bottom - tr.Top)) <= 0
then
VisForm.DrawAboutScroll := False;
if VisForm.aboutpos > (Height
div 2)
then
Dec(VisForm.aboutpos, 4)
else if VisForm.aboutpos > (Height
div 3)
then
Dec(VisForm.aboutpos, 1)
else
Dec(VisForm.aboutpos, 4);
end;
if (keys[VK_ESCAPE])
then
begin
Active := False;
PostQuitMessage(0);
Result := 1;
exit;
end
else
ProcessKeys(This_Mod);
end;
Result := 0;
end;