aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/lib/JEDI-SDLv1.0/smpeg/Demos/MpegPlayer/Main.pas
diff options
context:
space:
mode:
Diffstat (limited to 'Game/Code/lib/JEDI-SDLv1.0/smpeg/Demos/MpegPlayer/Main.pas')
-rw-r--r--Game/Code/lib/JEDI-SDLv1.0/smpeg/Demos/MpegPlayer/Main.pas91
1 files changed, 91 insertions, 0 deletions
diff --git a/Game/Code/lib/JEDI-SDLv1.0/smpeg/Demos/MpegPlayer/Main.pas b/Game/Code/lib/JEDI-SDLv1.0/smpeg/Demos/MpegPlayer/Main.pas
new file mode 100644
index 00000000..5c2bd4f5
--- /dev/null
+++ b/Game/Code/lib/JEDI-SDLv1.0/smpeg/Demos/MpegPlayer/Main.pas
@@ -0,0 +1,91 @@
+unit Main;
+
+interface
+
+{$IFDEF UNIX}
+{$DEFINE CLX}
+{$ELSE}
+{$DEFINE VCL}
+{$ENDIF}
+
+uses
+ SysUtils,
+ Classes,
+{$IFDEF CLX}
+ Types,
+ QGraphics,
+ QControls,
+ QForms,
+ QDialogs,
+ QExtCtrls,
+ QStdCtrls,
+{$ENDIF}
+{$IFDEF VCL}
+ Forms,
+ Graphics,
+ Dialogs,
+ StdCtrls,
+ Controls,
+ ExtCtrls,
+{$ENDIF}
+ sdlmpegpanel;
+
+type
+ TForm1 = class( TForm )
+ Panel1 : TPanel;
+ Panel2 : TPanel;
+ Button1 : TButton;
+ Button2 : TButton;
+ Button3 : TButton;
+ Panel3 : TPanel;
+ CheckBox1 : TCheckBox;
+ OpenDialog: TOpenDialog;
+ SDLMPEGPanel: TSDLMPEGPanel;
+ procedure Button1Click( Sender : TObject );
+ procedure Button2Click( Sender : TObject );
+ procedure Button3Click( Sender : TObject );
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ Form1 : TForm1;
+
+implementation
+
+{$IFDEF WIN32}
+{$R *.dfm}
+{$ENDIF}
+
+{$IFDEF UNIX}
+{$R *.xfm}
+{$ENDIF}
+
+procedure TForm1.Button1Click( Sender : TObject );
+begin
+ with OpenDialog do
+ begin
+ if Execute then
+ begin
+ SDLMPEGPanel.MPEGFile := FileName;
+ SDLMPEGPanel.Sound := CheckBox1.Checked;
+ SDLMPEGPanel.Play;
+ end;
+ end;
+end;
+
+procedure TForm1.Button2Click( Sender : TObject );
+begin
+ SDLMPEGPanel.Pause;
+end;
+
+procedure TForm1.Button3Click( Sender : TObject );
+begin
+ SDLMPEGPanel.Stop;
+end;
+
+end.
+
+ \ No newline at end of file