Permalink
Browse files

Add a rough stub for MediaPlayer.Stop

  • Loading branch information...
1 parent ead2d07 commit 3dfb137216da9f915680343ad09e1b4f60002b98 @kg kg committed Oct 5, 2012
Showing with 12 additions and 1 deletion.
  1. +11 −1 Libraries/JSIL.XNACore.js
  2. +1 −0 jsil.org/demos/GameType/GameType.html
View
@@ -1588,7 +1588,7 @@ JSIL.ImplementExternals("Microsoft.Xna.Framework.Media.MediaPlayer", function ($
}
);
- var playImpl = function (song) {
+ var playImpl = function MediaPlayer_Play (song) {
var oldInstance = Microsoft.Xna.Framework.Media.MediaPlayer.currentSong;
var newInstance = null;
@@ -1612,6 +1612,16 @@ JSIL.ImplementExternals("Microsoft.Xna.Framework.Media.MediaPlayer", function ($
playImpl
);
+ $.Method({Static:true , Public:true }, "Stop",
+ (new JSIL.MethodSignature(null, [], [])),
+ function MediaPlayer_Stop () {
+ if (Microsoft.Xna.Framework.Media.MediaPlayer.currentSong)
+ Microsoft.Xna.Framework.Media.MediaPlayer.currentSong.pause();
+
+ Microsoft.Xna.Framework.Media.MediaPlayer.currentSong = null;
+ }
+ );
+
$.Method({Static:true , Public:true }, "set_IsRepeating",
(new JSIL.MethodSignature(null, [$.Boolean], [])),
function set_IsRepeating (value) {
@@ -15,6 +15,7 @@
webgl2d: true,
xna: 4,
localStorage: true,
+ gamepad: true,
manifests: [
"GameType.exe",

0 comments on commit 3dfb137

Please sign in to comment.