From 6ddaead44b87ae2244e570c3aa7dd2e2cc17d494 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Thu, 16 Sep 2021 22:28:21 -0600 Subject: [PATCH] NAT playground clearMessages --- projects/nat-flixel-playground/source/PlayState.kiss | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/projects/nat-flixel-playground/source/PlayState.kiss b/projects/nat-flixel-playground/source/PlayState.kiss index 2838f335..b044e224 100644 --- a/projects/nat-flixel-playground/source/PlayState.kiss +++ b/projects/nat-flixel-playground/source/PlayState.kiss @@ -76,15 +76,24 @@ (method handleChanges [:Archive archive :ChangeSet changeSet] + // TODO refresh the sprites/other UI elements for entries that changed data (doFor e changeSet (print (archive.fullString e)))) (prop &mut :Int messageY 0) -(prop :FlxGroup messages (new FlxGroup)) +(prop &mut :FlxGroup messages (new FlxGroup)) (method :Void displayMessage [message] (messages.add (new FlxText 0 messageY 0 message)) (+= messageY 8)) +// TODO add a UI way to call this +(method :Void clearMessages [] + (messages.kill) + (set messages (new FlxGroup)) + (set messageY 0)) + +// TODO add a way to scroll through messages/move the camera + (method :Void reportError [error] (let [text (new FlxText 0 messageY 0 error)] (text.setFormat null 8 FlxColor.RED)