From 9cb1c6b0eabd5eb8dcb59ada53b2a498782a7dd8 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Wed, 14 Jul 2021 19:00:22 -0400 Subject: [PATCH] combo stuf in progress, lil cleanups --- Project.xml | 2 ++ source/ControlsSubState.hx | 12 ---------- source/TitleState.hx | 12 ++++++++++ source/ui/animDebugShit/DebugBoundingState.hx | 7 ++++-- source/ui/stageBuildShit/CharStage.hx | 9 ++++++++ source/ui/stageBuildShit/StageBuilderState.hx | 2 ++ source/ui/stageBuildShit/StagetoolBar.hx | 22 +++++++++++++++++++ 7 files changed, 52 insertions(+), 14 deletions(-) delete mode 100644 source/ControlsSubState.hx create mode 100644 source/ui/stageBuildShit/CharStage.hx create mode 100644 source/ui/stageBuildShit/StagetoolBar.hx diff --git a/Project.xml b/Project.xml index 6f763bb56..d3af27604 100644 --- a/Project.xml +++ b/Project.xml @@ -124,6 +124,8 @@ + + diff --git a/source/ControlsSubState.hx b/source/ControlsSubState.hx deleted file mode 100644 index f35d74cc8..000000000 --- a/source/ControlsSubState.hx +++ /dev/null @@ -1,12 +0,0 @@ -package; - -import flixel.FlxSprite; -import flixel.FlxSubState; - -class ControlsSubState extends FlxSubState -{ - public function new() - { - super(); - } -} diff --git a/source/TitleState.hx b/source/TitleState.hx index c55bfe542..201e57edf 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -41,6 +41,10 @@ import ui.stageBuildShit.StageBuilderState; using StringTools; +#if colyseus +import io.colyseus.Client; +import io.colyseus.Room; +#end #if discord_rpc import Discord.DiscordClient; #end @@ -160,6 +164,8 @@ class TitleState extends MusicBeatState FlxG.switchState(new StageBuilderState()); #elseif ANIMDEBUG FlxG.switchState(new ui.animDebugShit.DebugBoundingState()); + #elseif NETTEST + FlxG.switchState(new netTest.NetTest()); #else new FlxTimer().start(1, function(tmr:FlxTimer) { @@ -375,6 +381,12 @@ class TitleState extends MusicBeatState override function update(elapsed:Float) { + if (FlxG.keys.justPressed.Y) + { + FlxTween.tween(FlxG.stage.window, {x: FlxG.stage.window.x + 300}, 1.4, {ease: FlxEase.quadInOut, type: PINGPONG, startDelay: 0.35}); + FlxTween.tween(FlxG.stage.window, {y: FlxG.stage.window.y + 100}, 0.7, {ease: FlxEase.quadInOut, type: PINGPONG}); + } + /* FlxG.watch.addQuick('cur display', FlxG.stage.window.display.id); if (FlxG.keys.justPressed.Y) diff --git a/source/ui/animDebugShit/DebugBoundingState.hx b/source/ui/animDebugShit/DebugBoundingState.hx index ff5ffb582..c1b810a23 100644 --- a/source/ui/animDebugShit/DebugBoundingState.hx +++ b/source/ui/animDebugShit/DebugBoundingState.hx @@ -15,7 +15,6 @@ import flixel.text.FlxText; import flixel.util.FlxColor; import flixel.util.FlxSpriteUtil; import flixel.util.FlxTimer; -import js.html.FileList; import lime.utils.Assets as LimeAssets; import openfl.Assets; import openfl.events.Event; @@ -29,6 +28,9 @@ import openfl.utils.ByteArray; using StringTools; using flixel.util.FlxSpriteUtil; +#if web +import js.html.FileList; +#end #if sys import sys.io.File; #end @@ -67,7 +69,8 @@ class DebugBoundingState extends FlxState FlxG.cameras.add(hudCam, false); - bg = FlxGridOverlay.create(10, 10); + // bg = FlxGridOverlay.create(10, 10); + bg = new FlxSprite().makeGraphic(FlxG.width, FlxG.height, FlxColor.GREEN); bg.scrollFactor.set(); add(bg); diff --git a/source/ui/stageBuildShit/CharStage.hx b/source/ui/stageBuildShit/CharStage.hx new file mode 100644 index 000000000..a0e1ed062 --- /dev/null +++ b/source/ui/stageBuildShit/CharStage.hx @@ -0,0 +1,9 @@ +package ui.stageBuildShit; + +class CharStage extends SprStage +{ + public function new(x:Float, y:Float, dragShitFunc:SprStage->Void) + { + super(x, y, dragShitFunc); + } +} diff --git a/source/ui/stageBuildShit/StageBuilderState.hx b/source/ui/stageBuildShit/StageBuilderState.hx index 5539c5170..1ca1f6145 100644 --- a/source/ui/stageBuildShit/StageBuilderState.hx +++ b/source/ui/stageBuildShit/StageBuilderState.hx @@ -437,6 +437,7 @@ enum FOCUS { ATTRIBUTES; MOVEMENTS; + TOOLBAR; } enum TOOLS @@ -445,4 +446,5 @@ enum TOOLS MOVE; GRAB; GRABBING; + BOYFRIEND; } diff --git a/source/ui/stageBuildShit/StagetoolBar.hx b/source/ui/stageBuildShit/StagetoolBar.hx new file mode 100644 index 000000000..74337d64d --- /dev/null +++ b/source/ui/stageBuildShit/StagetoolBar.hx @@ -0,0 +1,22 @@ +package ui.stageBuildShit; + +import flixel.group.FlxGroup; + +class StagetoolBar extends FlxGroup +{ + var icons:Array = [SELECT, MOVE, GRAB, BOYFRIEND]; + var iconSprs:Array = ['cursorSelect', 'cursorGrab', 'cursorMove', 'toolbarBF']; + + public function new() + { + super(); + + for (icon in icons) + { + // switch (icon) + // { + // case SELECT: + // } + } + } +}