dialog history feature
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# @install: lix --silent download "gh://github.com/kiss-lang/hollywoo#b50ef1ef706c0dc126f078a8706195123c1d745a" into hollywoo/0.0.0/github/b50ef1ef706c0dc126f078a8706195123c1d745a
|
||||
# @run: haxelib run-dir hollywoo "${HAXE_LIBCACHE}/hollywoo/0.0.0/github/b50ef1ef706c0dc126f078a8706195123c1d745a"
|
||||
# @install: lix --silent download "gh://github.com/kiss-lang/hollywoo#74132ee232e93d6a2485e17ba9997938790e7b71" into hollywoo/0.0.0/github/74132ee232e93d6a2485e17ba9997938790e7b71
|
||||
# @run: haxelib run-dir hollywoo "${HAXE_LIBCACHE}/hollywoo/0.0.0/github/74132ee232e93d6a2485e17ba9997938790e7b71"
|
||||
-lib kiss
|
||||
-lib kiss-tools
|
||||
-cp ${HAXE_LIBCACHE}/hollywoo/0.0.0/github/b50ef1ef706c0dc126f078a8706195123c1d745a/src/
|
||||
-cp ${HAXE_LIBCACHE}/hollywoo/0.0.0/github/74132ee232e93d6a2485e17ba9997938790e7b71/src/
|
||||
-D hollywoo=0.0.0
|
@@ -1,4 +1,4 @@
|
||||
# @install: lix --silent download "gh://github.com/kiss-lang/kiss-flixel#fe4001404dbed0a2b6419f16e0469f1de88518e1" into kiss-flixel/0.0.0/github/fe4001404dbed0a2b6419f16e0469f1de88518e1
|
||||
# @install: lix --silent download "gh://github.com/kiss-lang/kiss-flixel#b84eca61bf3e0bf89bd75ca8906063319d75f83e" into kiss-flixel/0.0.0/github/b84eca61bf3e0bf89bd75ca8906063319d75f83e
|
||||
-lib flixel
|
||||
-lib flixel-addons
|
||||
-lib flixel-ui
|
||||
@@ -6,5 +6,5 @@
|
||||
-lib kiss-tools
|
||||
-lib lime
|
||||
-lib openfl
|
||||
-cp ${HAXE_LIBCACHE}/kiss-flixel/0.0.0/github/fe4001404dbed0a2b6419f16e0469f1de88518e1/src/
|
||||
-cp ${HAXE_LIBCACHE}/kiss-flixel/0.0.0/github/b84eca61bf3e0bf89bd75ca8906063319d75f83e/src/
|
||||
-D kiss-flixel=0.0.0
|
@@ -88,6 +88,37 @@
|
||||
("Quit to Desktop" (Sys.exit 0))
|
||||
(never otherwise))))
|
||||
|
||||
(method :Void showDialogHistory [:Array<HistoryElement<ActorFlxSprite>> history :Continuation resume]
|
||||
// register tab and escape to resume (and register escape to pause and tab to history when resuming lol)
|
||||
(let [_resume
|
||||
->cc {
|
||||
(pauseMenu.hide)
|
||||
(sh.registerItem "{tab} show history" ->cc (showDialogHistory flxMovie.dialogHistory cc) true)
|
||||
(sh.registerItem "{escape} pause" ->cc (showPauseMenu cc) true)
|
||||
(resume)
|
||||
}]
|
||||
|
||||
(set pauseMenu (new SimpleWindow "HISTORY" FlxColor.BLACK FlxColor.WHITE 0.6 0.9 true null null null ->:Void (_resume null)))
|
||||
(pauseMenu.enableVerticalScrolling "up" "down")
|
||||
(pauseMenu.makeText "")
|
||||
(doFor element history
|
||||
(case element
|
||||
((Sound caption)
|
||||
(pauseMenu.makeText "<${caption}>")
|
||||
(pauseMenu.makeText ""))
|
||||
((Dialog speaker _type _wryly text)
|
||||
(pauseMenu.makeText speaker)
|
||||
(pauseMenu.makeWrappedText text)
|
||||
(pauseMenu.makeText ""))
|
||||
((Super text)
|
||||
(pauseMenu.makeText text)
|
||||
(pauseMenu.makeText ""))
|
||||
(never otherwise)))
|
||||
(pauseMenu.scrollToBottom)
|
||||
(sh.registerItem "{tab} resume" _resume true)
|
||||
(sh.registerItem "{escape} resume" _resume true))
|
||||
(pauseMenu.show))
|
||||
|
||||
(method :Void showSet [:FlxSprite setSprite :SceneTime time :ScenePerspective perspective :Appearance appearance :FlxCamera camera :Continuation cc]
|
||||
(case appearance
|
||||
(FirstAppearance
|
||||
|
Reference in New Issue
Block a user