diff --git a/Preloader.hx b/Preloader.hx index 545b424b4..6d6240592 100644 --- a/Preloader.hx +++ b/Preloader.hx @@ -12,7 +12,7 @@ import openfl.display.Sprite; class Preloader extends FlxBasePreloader { - public function new(MinDisplayTime:Float = 3, ?AllowedURLs:Array) + public function new(MinDisplayTime:Float = 0, ?AllowedURLs:Array) { super(MinDisplayTime, AllowedURLs); } diff --git a/Project.xml b/Project.xml index d3af27604..fc0cf86e8 100644 --- a/Project.xml +++ b/Project.xml @@ -10,7 +10,7 @@ - + diff --git a/source/MainMenuState.hx b/source/MainMenuState.hx index 28c50dc11..3ae385080 100644 --- a/source/MainMenuState.hx +++ b/source/MainMenuState.hx @@ -8,6 +8,7 @@ import flixel.addons.transition.FlxTransitionableState; import flixel.effects.FlxFlicker; import flixel.graphics.frames.FlxAtlasFrames; import flixel.group.FlxGroup.FlxTypedGroup; +import flixel.input.touch.FlxTouch; import flixel.text.FlxText; import flixel.tweens.FlxEase; import flixel.tweens.FlxTween; @@ -249,6 +250,25 @@ class MainMenuState extends MusicBeatState override function update(elapsed:Float) { + if (FlxG.onMobile) + { + var touch:FlxTouch = FlxG.touches.getFirst(); + + if (touch != null) + { + for (item in menuItems) + { + if (touch.overlaps(item)) + { + if (menuItems.selectedIndex == item.ID && touch.justPressed) + menuItems.accept(); + else + menuItems.selectItem(item.ID); + } + } + } + } + // FlxG.camera.followLerp = CoolUtil.camLerpShit(0.06); if (FlxG.sound.music.volume < 0.8)