gamepad input on every menu (i think)
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# @install: lix --silent download "gh://github.com/kiss-lang/kiss-flixel#6bfcf84328e5ced6dfc92cf140a97326cc592208" into kiss-flixel/0.0.0/github/6bfcf84328e5ced6dfc92cf140a97326cc592208
|
# @install: lix --silent download "gh://github.com/kiss-lang/kiss-flixel#bc5213d4d3335f46c0a83aba05f1ecb4be6bf4e0" into kiss-flixel/0.0.0/github/bc5213d4d3335f46c0a83aba05f1ecb4be6bf4e0
|
||||||
-lib flixel
|
-lib flixel
|
||||||
-lib flixel-addons
|
-lib flixel-addons
|
||||||
-lib flixel-ui
|
-lib flixel-ui
|
||||||
@@ -6,5 +6,5 @@
|
|||||||
-lib kiss-tools
|
-lib kiss-tools
|
||||||
-lib lime
|
-lib lime
|
||||||
-lib openfl
|
-lib openfl
|
||||||
-cp ${HAXE_LIBCACHE}/kiss-flixel/0.0.0/github/6bfcf84328e5ced6dfc92cf140a97326cc592208/src/
|
-cp ${HAXE_LIBCACHE}/kiss-flixel/0.0.0/github/bc5213d4d3335f46c0a83aba05f1ecb4be6bf4e0/src/
|
||||||
-D kiss-flixel=0.0.0
|
-D kiss-flixel=0.0.0
|
||||||
@@ -32,7 +32,7 @@ import kiss_flixel.SimpleWindow;
|
|||||||
import kiss_flixel.DebugLayer;
|
import kiss_flixel.DebugLayer;
|
||||||
import haxe.ds.Option;
|
import haxe.ds.Option;
|
||||||
import kiss_tools.KeyShortcutHandler;
|
import kiss_tools.KeyShortcutHandler;
|
||||||
import kiss_tools.FlxKeyShortcutHandler;
|
import kiss_flixel.FlxKeyShortcutHandler;
|
||||||
using flixel.util.FlxSpriteUtil;
|
using flixel.util.FlxSpriteUtil;
|
||||||
import openfl.display.BitmapData;
|
import openfl.display.BitmapData;
|
||||||
import openfl.display.BitmapDataChannel;
|
import openfl.display.BitmapDataChannel;
|
||||||
|
|||||||
@@ -108,8 +108,9 @@
|
|||||||
(resume)
|
(resume)
|
||||||
}]
|
}]
|
||||||
|
|
||||||
(set pauseMenu (new SimpleWindow "HISTORY" FlxColor.BLACK FlxColor.WHITE 0.6 0.9 true null null null ->:Void (_resume null)))
|
(set pauseMenu (new SimpleWindow "HISTORY" FlxColor.BLACK FlxColor.WHITE 0.6 0.9 true null null null "up" "down" ->:Void (_resume null)))
|
||||||
(pauseMenu.enableVerticalScrolling "up" "down")
|
(pauseMenu.enableVerticalScrolling)
|
||||||
|
(pauseMenu.enableGamepadInput true)
|
||||||
(pauseMenu.makeText "")
|
(pauseMenu.makeText "")
|
||||||
(doFor element history
|
(doFor element history
|
||||||
(case element
|
(case element
|
||||||
@@ -209,7 +210,11 @@
|
|||||||
true
|
true
|
||||||
""
|
""
|
||||||
"left"
|
"left"
|
||||||
"right")))
|
"right"
|
||||||
|
"up"
|
||||||
|
"down"
|
||||||
|
"enter"))
|
||||||
|
(pauseMenu.enableGamepadInput true))
|
||||||
|
|
||||||
(method :Void enterString [:String prompt :String->Void submit]
|
(method :Void enterString [:String prompt :String->Void submit]
|
||||||
(set pauseMenu
|
(set pauseMenu
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import hollywoo.Director;
|
|||||||
import hollywoo.Movie;
|
import hollywoo.Movie;
|
||||||
import hollywoo_flixel.ActorFlxSprite;
|
import hollywoo_flixel.ActorFlxSprite;
|
||||||
import kiss_flixel.SpriteTools;
|
import kiss_flixel.SpriteTools;
|
||||||
import kiss_tools.FlxKeyShortcutHandler;
|
import kiss_flixel.FlxKeyShortcutHandler;
|
||||||
import kiss_tools.JsonMap;
|
import kiss_tools.JsonMap;
|
||||||
import hollywoo.HFloat;
|
import hollywoo.HFloat;
|
||||||
import openfl.Assets;
|
import openfl.Assets;
|
||||||
|
|||||||
@@ -134,7 +134,7 @@
|
|||||||
(callPrivate tween "update" tweenElapsed)
|
(callPrivate tween "update" tweenElapsed)
|
||||||
(when tween.finished
|
(when tween.finished
|
||||||
(callPrivate tween "finish")))))
|
(callPrivate tween "finish")))))
|
||||||
(.update (cast (director.shortcutHandler) kiss_tools.FlxKeyShortcutHandler<Dynamic>)))
|
(.update (cast (director.shortcutHandler) kiss_flixel.FlxKeyShortcutHandler<Dynamic>)))
|
||||||
|
|
||||||
(prop &mut :FlxSprite _canvas null)
|
(prop &mut :FlxSprite _canvas null)
|
||||||
(method :FlxSprite canvas []
|
(method :FlxSprite canvas []
|
||||||
@@ -182,6 +182,9 @@
|
|||||||
(dictSet presetPositions (pos.stringify) true)))
|
(dictSet presetPositions (pos.stringify) true)))
|
||||||
|
|
||||||
(preload
|
(preload
|
||||||
|
(.enableGamepadInput
|
||||||
|
(cast (director.shortcutHandler) kiss_flixel.FlxKeyShortcutHandler<Dynamic>)
|
||||||
|
[=>flixel.input.gamepad.FlxGamepadInputID.START "escape"])
|
||||||
(set FlxDirector.anonProps 0)
|
(set FlxDirector.anonProps 0)
|
||||||
(set FlxG.sound.volume FlxDirector.masterVolume)
|
(set FlxG.sound.volume FlxDirector.masterVolume)
|
||||||
(unless uiCamera
|
(unless uiCamera
|
||||||
|
|||||||
Reference in New Issue
Block a user