Skip to content

Commit

Permalink
Merge pull request #7 from Geokureli/splash
Browse files Browse the repository at this point in the history
use default splash
  • Loading branch information
ninjamuffin99 authored Feb 15, 2024
2 parents 96668d4 + 8b30c0e commit 97279b9
Show file tree
Hide file tree
Showing 3 changed files with 301 additions and 275 deletions.
269 changes: 0 additions & 269 deletions source/FlxSplash.hx

This file was deleted.

14 changes: 8 additions & 6 deletions source/Main.hx
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
package;

import openfl.Lib;
import flixel.FlxG;
import flixel.FlxGame;
import flixel.input.keyboard.FlxKey;
import flixel.input.keyboard.FlxKeyList;
import openfl.events.KeyboardEvent;
import flixel.system.FlxSplash;
import lime.app.Event;
import lime.app.Application;
import flixel.FlxG;
import flixel.FlxGame;
import openfl.Lib;
import openfl.events.KeyboardEvent;
import openfl.display.Sprite;


class Main extends Sprite {
// Why can't Safari play .ogg in 2024.... :(
public static var SOUND_EXT:String = #if web ".mp3" #else ".ogg" #end;
Expand All @@ -28,12 +30,12 @@ class Main extends Sprite {
Application.current.window.element.style.setProperty("image-rendering", "pixelated");
#end

addChild(new FlxGame(480, 160, FlxSplash, framerate, framerate, true));
addChild(new FlxGame(480, 160, ()->new Splash(MenuState.new), framerate, framerate, true));

Lib.current.stage.addEventListener(openfl.events.KeyboardEvent.KEY_DOWN, (e:KeyboardEvent) -> {
if (e.keyCode == FlxKey.F) {
Lib.application.window.fullscreen = !Lib.application.window.fullscreen;
}
});
}
}
}
Loading

0 comments on commit 97279b9

Please sign in to comment.