From 88b52ab5482624ede9c1c26de9364aa394a74edb Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sat, 16 Jan 2021 23:15:29 -0500 Subject: [PATCH] cool heads --- CHANGELOG.md | 1 + source/ChartingState.hx | 36 ++++++++++++++++++++++++++++++++++++ source/TitleState.hx | 4 ++++ 3 files changed, 41 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e6908860..3b0289f89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Q and E changes sustain lengths in note editor - Other charting editor workflow improvements - More hair physics +- Heads appear at top of chart editor to help show which side ur charting for ### Removed - Removed APE ### Fixed diff --git a/source/ChartingState.hx b/source/ChartingState.hx index 7de9b8387..62ed05591 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -79,6 +79,9 @@ class ChartingState extends MusicBeatState var vocals:FlxSound; + var leftIcon:HealthIcon; + var rightIcon:HealthIcon; + override function create() { curSection = lastSection; @@ -86,6 +89,20 @@ class ChartingState extends MusicBeatState gridBG = FlxGridOverlay.create(GRID_SIZE, GRID_SIZE, GRID_SIZE * 8, GRID_SIZE * 16); add(gridBG); + leftIcon = new HealthIcon('bf'); + rightIcon = new HealthIcon('dad'); + leftIcon.scrollFactor.set(1, 1); + rightIcon.scrollFactor.set(1, 1); + + leftIcon.setGraphicSize(0, 45); + rightIcon.setGraphicSize(0, 45); + + add(leftIcon); + add(rightIcon); + + leftIcon.setPosition(0, -100); + rightIcon.setPosition(gridBG.width / 2, -100); + var gridBlackLine:FlxSprite = new FlxSprite(gridBG.x + gridBG.width / 2).makeGraphic(2, Std.int(gridBG.height), FlxColor.BLACK); add(gridBlackLine); @@ -388,6 +405,9 @@ class ChartingState extends MusicBeatState { case 'Must hit section': _song.notes[curSection].mustHitSection = check.checked; + + updateHeads(); + case 'Change BPM': _song.notes[curSection].changeBPM = check.checked; FlxG.log.add('changed bpm shit'); @@ -758,6 +778,22 @@ class ChartingState extends MusicBeatState check_altAnim.checked = sec.altAnim; check_changeBPM.checked = sec.changeBPM; stepperSectionBPM.value = sec.bpm; + + updateHeads(); + } + + function updateHeads():Void + { + if (check_mustHitSection.checked) + { + leftIcon.animation.play('bf'); + rightIcon.animation.play('dad'); + } + else + { + leftIcon.animation.play('dad'); + rightIcon.animation.play('bf'); + } } function updateNoteUI():Void diff --git a/source/TitleState.hx b/source/TitleState.hx index b15ee2f41..73bbb7534 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -113,6 +113,10 @@ class TitleState extends MusicBeatState transIn = FlxTransitionableState.defaultTransIn; transOut = FlxTransitionableState.defaultTransOut; + // HAD TO MODIFY SOME BACKEND SHIT + // IF THIS PR IS HERE IF ITS ACCEPTED UR GOOD TO GO + // https://github.com/HaxeFlixel/flixel-addons/pull/348 + // var music:FlxSound = new FlxSound(); // music.loadStream('assets/music/freakyMenu' + TitleState.soundExt); // FlxG.sound.list.add(music);