Răsfoiți Sursa

fixed samples compilation (close #232)

Nicolas Cannasse 8 ani în urmă
părinte
comite
ff822aa242
2 a modificat fișierele cu 2 adăugiri și 7 ștergeri
  1. 1 1
      samples/Cursor.hx
  2. 1 6
      samples/Sound.hx

+ 1 - 1
samples/Cursor.hx

@@ -11,7 +11,7 @@ class Cursor extends hxd.App {
 		bmp.line(0, 31, 31, 31, 0xFFFF0000);
 		bmp.line(31, 0, 31, 31, 0xFF00FF00);
 
-		var cursors : Array<hxd.System.Cursor> = [Default,Button,Move,TextInput,Hide,Custom([bmp],0.,16,16)];
+		var cursors : Array<hxd.System.Cursor> = [Default,Button,Move,TextInput,Hide,Custom(new hxd.System.CustomCursor([bmp],0.,16,16))];
 		var pos = 0;
 		for( c in cursors ) {
 			var i = new h2d.Interactive(100, 20, s2d);

+ 1 - 6
samples/Sound.hx

@@ -21,12 +21,7 @@ class Sound extends hxd.App {
 	var music : hxd.snd.Channel;
 
 	override function init() {
-		var res = if( hxd.res.Sound.supportedFormat(Mp3) )
-			hxd.Res.music_loop_mp3
-		else if( hxd.res.Sound.supportedFormat(OggVorbis) )
-			hxd.Res.music_loop_ogg;
-		else
-			null;
+		var res = if( hxd.res.Sound.supportedFormat(Mp3) || hxd.res.Sound.supportedFormat(OggVorbis) ) hxd.Res.music_loop else null;
 		if( res != null ) {
 			trace("Playing "+res);
 			music = res.play(true);