mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-07-18 18:13:08 +00:00
FlxActions/Controls.hx stuf for Android keys
This commit is contained in:
parent
f40b3a8fe3
commit
d77a983ff2
|
@ -12,7 +12,7 @@ import openfl.display.Sprite;
|
||||||
|
|
||||||
class Preloader extends FlxBasePreloader
|
class Preloader extends FlxBasePreloader
|
||||||
{
|
{
|
||||||
public function new(MinDisplayTime:Float = 3, ?AllowedURLs:Array<String>)
|
public function new(MinDisplayTime:Float = 0, ?AllowedURLs:Array<String>)
|
||||||
{
|
{
|
||||||
super(MinDisplayTime, AllowedURLs);
|
super(MinDisplayTime, AllowedURLs);
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<!--The flixel preloader is not accurate in Chrome. You can use it regularly if you embed the swf into a html file
|
<!--The flixel preloader is not accurate in Chrome. You can use it regularly if you embed the swf into a html file
|
||||||
or you can set the actual size of your file manually at "FlxPreloaderBase-onUpdate-bytesTotal"-->
|
or you can set the actual size of your file manually at "FlxPreloaderBase-onUpdate-bytesTotal"-->
|
||||||
<!-- <app preloader="Preloader" resizable="true" /> -->
|
<!-- <app preloader="Preloader" resizable="true" /> -->
|
||||||
<app preloader="flixel.system.FlxPreloader" />
|
<app preloader="Preloader" />
|
||||||
|
|
||||||
<!--Minimum without FLX_NO_GAMEPAD: 11.8, without FLX_NO_NATIVE_CURSOR: 11.2-->
|
<!--Minimum without FLX_NO_GAMEPAD: 11.8, without FLX_NO_NATIVE_CURSOR: 11.2-->
|
||||||
<set name="SWF_VERSION" value="11.8" />
|
<set name="SWF_VERSION" value="11.8" />
|
||||||
|
|
|
@ -8,6 +8,7 @@ import flixel.addons.transition.FlxTransitionableState;
|
||||||
import flixel.effects.FlxFlicker;
|
import flixel.effects.FlxFlicker;
|
||||||
import flixel.graphics.frames.FlxAtlasFrames;
|
import flixel.graphics.frames.FlxAtlasFrames;
|
||||||
import flixel.group.FlxGroup.FlxTypedGroup;
|
import flixel.group.FlxGroup.FlxTypedGroup;
|
||||||
|
import flixel.input.touch.FlxTouch;
|
||||||
import flixel.text.FlxText;
|
import flixel.text.FlxText;
|
||||||
import flixel.tweens.FlxEase;
|
import flixel.tweens.FlxEase;
|
||||||
import flixel.tweens.FlxTween;
|
import flixel.tweens.FlxTween;
|
||||||
|
@ -249,6 +250,25 @@ class MainMenuState extends MusicBeatState
|
||||||
|
|
||||||
override function update(elapsed:Float)
|
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);
|
// FlxG.camera.followLerp = CoolUtil.camLerpShit(0.06);
|
||||||
|
|
||||||
if (FlxG.sound.music.volume < 0.8)
|
if (FlxG.sound.music.volume < 0.8)
|
||||||
|
|
Loading…
Reference in a new issue