This commit is contained in:
Cameron Taylor 2021-01-28 01:54:24 -05:00
commit 12f9cbe555
7 changed files with 150 additions and 4 deletions

32
.github/ISSUE_TEMPLATE/bug.md vendored Normal file
View file

@ -0,0 +1,32 @@
---
name: Bug Report
about: Report a bug or critical performance issue
title: 'Bug Report: '
labels: bug
---
# Please check for duplicates or similar issues, as well performing simple troubleshooting steps (such as clearing cookies, clearing AppData, trying another browser) before submitting an issue.
## Where are you playing the game?
### Web
- [ ] [Newgrounds](https://www.newgrounds.com/portal/view/770371)
- [ ] [Itch.io](https://ninja-muffin24.itch.io/funkin)
#### If you are using a web build, what browser are you using?
- [ ] Chrome, or a Chromium based broswer (Edge, Opera, etc.)
- [ ] Firefox, or a Gecko based broswer
- [ ] Safari
- [ ] Other, please specify:
### Local
- [ ] Windows x86
- [ ] Windows x86_64
- [ ] Linux
- [ ] macOS
## What version of the game are you using? Look in the bottom left corner of the main menu.
## Have you identified any steps to reproduce the bug? If so, please describe them below. Use images if possible.
## Please describe your issue. Provide extensive detail and images if possibe.

10
.github/ISSUE_TEMPLATE/enhancement.md vendored Normal file
View file

@ -0,0 +1,10 @@
---
name: Enhancement
about: Suggest a new feature
title: 'Enhancement: '
labels: enhancement
---
# Please check for duplicates or similar issues before creating this issue.
## What is your suggestion, and why should it be implemented?

10
.github/ISSUE_TEMPLATE/question.md vendored Normal file
View file

@ -0,0 +1,10 @@
---
name: Question
about: Ask a general question
title: 'Question: '
labels: question
---
# Please check for duplicates or similar issues before asking your question.
## What is your question?

12
.github/PULL_REQUEST_TEMPLATE/bug.md vendored Normal file
View file

@ -0,0 +1,12 @@
---
name: Bug Fix
about: Fix a bug or critical performance issue
title: 'Bug Fix: '
labels: bug
---
# Please check for duplicates or similar PRs before creating this issue.
## Does this PR close any issue(s)? If so, link them below.
## Breifly describe the issue(s) fixed.

View file

@ -0,0 +1,12 @@
---
name: Enhancement
about: Add a new feature
title: 'Enhancement: '
labels: enhancement
---
# Please check for duplicates or similar PRs before creating this issue.
## Does this PR close any issue(s)? If so, link them below.
## What do your change(s) add, and why should they be implemented?

View file

@ -22,7 +22,7 @@ class MainMenuState extends MusicBeatState
var menuItems:FlxTypedGroup<FlxSprite>; var menuItems:FlxTypedGroup<FlxSprite>;
#if !switch #if !switch
var optionShit:Array<String> = ['story mode', 'freeplay', 'donate']; var optionShit:Array<String> = ['story mode', 'freeplay', 'donate', 'options'];
#else #else
var optionShit:Array<String> = ['story mode', 'freeplay']; var optionShit:Array<String> = ['story mode', 'freeplay'];
#end #end

View file

@ -1,14 +1,29 @@
package; package;
import flash.text.TextField;
import flixel.FlxG; import flixel.FlxG;
import flixel.FlxSprite; import flixel.FlxSprite;
import flixel.addons.display.FlxGridOverlay;
import flixel.group.FlxGroup.FlxTypedGroup;
import flixel.math.FlxMath;
import flixel.text.FlxText;
import flixel.util.FlxColor; import flixel.util.FlxColor;
import lime.utils.Assets;
class OptionsMenu extends MusicBeatState class OptionsMenu extends MusicBeatState
{ {
var selector:FlxText;
var curSelected:Int = 0;
var controlsStrings:Array<String> = [];
private var grpControls:FlxTypedGroup<Alphabet>;
override function create() override function create()
{ {
var menuBG:FlxSprite = new FlxSprite().loadGraphic('assets/images/menuDesat.png'); var menuBG:FlxSprite = new FlxSprite().loadGraphic('assets/images/menuDesat.png');
controlsStrings = CoolUtil.coolTextFile('assets/data/controls.txt');
menuBG.color = 0xFFea71fd; menuBG.color = 0xFFea71fd;
menuBG.setGraphicSize(Std.int(menuBG.width * 1.1)); menuBG.setGraphicSize(Std.int(menuBG.width * 1.1));
menuBG.updateHitbox(); menuBG.updateHitbox();
@ -16,14 +31,69 @@ class OptionsMenu extends MusicBeatState
menuBG.antialiasing = true; menuBG.antialiasing = true;
add(menuBG); add(menuBG);
grpControls = new FlxTypedGroup<Alphabet>();
add(grpControls);
for (i in 0...controlsStrings.length)
{
if(controlsStrings[i].indexOf('set') != -1){
var controlLabel:Alphabet = new Alphabet(0, (70 * i) + 30, controlsStrings[i].substring(3)+': '+controlsStrings[i+1], true, false);
controlLabel.isMenuItem = true;
controlLabel.targetY = i;
grpControls.add(controlLabel);
}
// DONT PUT X IN THE FIRST PARAMETER OF new ALPHABET() !!
}
super.create(); super.create();
} }
override function update(elapsed:Float) override function update(elapsed:Float)
{ {
super.update(elapsed);
if (controls.BACK) if (controls.BACK)
FlxG.switchState(new MainMenuState()); FlxG.switchState(new MainMenuState());
if(controls.UP_P)
super.update(elapsed); changeSelection(-1);
if(controls.DOWN_P)
changeSelection(1);
} }
function changeSelection(change:Int = 0)
{
#if !switch
NGio.logEvent('Fresh');
#end
FlxG.sound.play('assets/sounds/scrollMenu' + TitleState.soundExt, 0.4);
curSelected += change;
if (curSelected < 0)
curSelected = controlsStrings.length - 1;
if (curSelected >= controlsStrings.length)
curSelected = 0;
// selector.y = (70 * curSelected) + 30;
var bullShit:Int = 0;
for (item in grpControls.members)
{
item.targetY = bullShit - curSelected;
bullShit++;
item.alpha = 0.6;
// item.setGraphicSize(Std.int(item.width * 0.8));
if (item.targetY == 0)
{
item.alpha = 1;
// item.setGraphicSize(Std.int(item.width));
}
}
}
} }