1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2025-03-24 19:09:21 +00:00

UI and menu bullshit

This commit is contained in:
Cameron Taylor 2020-10-30 14:18:26 -07:00
parent d583d16628
commit fcdd82dfdb
28 changed files with 242 additions and 1 deletions

View file

@ -41,6 +41,8 @@
<assets path="assets/sounds" include="*.mp3" if="web" />
<assets path="assets/sounds" include="*.ogg" unless="web" />
<assets path="assets/fonts/vcr.ttf" embed="true" />
<!-- _______________________________ Libraries ______________________________ -->

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

BIN
assets/fonts/vcr.ttf Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

View file

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<TextureAtlas imagePath="campaign_menu_UI_assets.png">
<!-- Created with Adobe Animate version 20.0.0.17400 -->
<!-- http://www.adobe.com/products/animate.html -->
<SubTexture name="EASY0000" x="0" y="0" width="196" height="65"/>
<SubTexture name="HARD0000" x="206" y="0" width="211" height="67"/>
<SubTexture name="NORMAL0000" x="427" y="0" width="308" height="67"/>
<SubTexture name="WEEK1 select0000" x="0" y="77" width="360" height="89"/>
<SubTexture name="WEEK1 select0001" x="370" y="77" width="360" height="89"/>
<SubTexture name="arrow left0000" x="740" y="77" width="48" height="85"/>
<SubTexture name="arrow push left0000" x="798" y="77" width="42" height="75"/>
<SubTexture name="arrow push right0000" x="850" y="77" width="41" height="74"/>
<SubTexture name="arrow right0000" x="901" y="77" width="47" height="85"/>
<SubTexture name="lock0000" x="0" y="176" width="67" height="93"/>
<SubTexture name="week 2 CANNOT select0000" x="77" y="176" width="361" height="87" frameX="-10" frameY="0" frameWidth="383" frameHeight="87"/>
<SubTexture name="week 2 CANNOT select0001" x="448" y="176" width="361" height="87" frameX="0" frameY="0" frameWidth="383" frameHeight="87"/>
<SubTexture name="week 2 CANNOT select0002" x="0" y="279" width="362" height="87" frameX="-21" frameY="0" frameWidth="383" frameHeight="87"/>
<SubTexture name="week 2 CANNOT select0003" x="448" y="176" width="361" height="87" frameX="-7" frameY="0" frameWidth="383" frameHeight="87"/>
<SubTexture name="week 2 CANNOT select0004" x="77" y="176" width="361" height="87" frameX="-11" frameY="0" frameWidth="383" frameHeight="87"/>
<SubTexture name="week 2 CANNOT select0005" x="77" y="176" width="361" height="87" frameX="-11" frameY="0" frameWidth="383" frameHeight="87"/>
<SubTexture name="week2 select0000" x="77" y="176" width="361" height="87" frameX="0" frameY="0" frameWidth="383" frameHeight="87"/>
<SubTexture name="week2 select0001" x="372" y="279" width="361" height="87"/>
</TextureAtlas>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

View file

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<TextureAtlas imagePath="campaign_menu_UI_characters.png">
<!-- Created with Adobe Animate version 20.0.0.17400 -->
<!-- http://www.adobe.com/products/animate.html -->
<SubTexture name="BF idle dance white0000" x="0" y="0" width="406" height="392" frameX="-1" frameY="-20" frameWidth="411" frameHeight="412"/>
<SubTexture name="BF idle dance white0001" x="0" y="0" width="406" height="392" frameX="-1" frameY="-20" frameWidth="411" frameHeight="412"/>
<SubTexture name="BF idle dance white0002" x="416" y="0" width="408" height="393" frameX="0" frameY="-19" frameWidth="411" frameHeight="412"/>
<SubTexture name="BF idle dance white0003" x="416" y="0" width="408" height="393" frameX="0" frameY="-19" frameWidth="411" frameHeight="412"/>
<SubTexture name="BF idle dance white0004" x="834" y="0" width="405" height="398" frameX="-3" frameY="-14" frameWidth="411" frameHeight="412"/>
<SubTexture name="BF idle dance white0005" x="834" y="0" width="405" height="398" frameX="-3" frameY="-14" frameWidth="411" frameHeight="412"/>
<SubTexture name="BF idle dance white0006" x="1249" y="0" width="410" height="411" frameX="-1" frameY="-1" frameWidth="411" frameHeight="412"/>
<SubTexture name="BF idle dance white0007" x="1249" y="0" width="410" height="411" frameX="-1" frameY="-1" frameWidth="411" frameHeight="412"/>
<SubTexture name="BF idle dance white0008" x="1669" y="0" width="408" height="412" frameX="-2" frameY="0" frameWidth="411" frameHeight="412"/>
<SubTexture name="BF idle dance white0009" x="1669" y="0" width="408" height="412" frameX="-2" frameY="0" frameWidth="411" frameHeight="412"/>
<SubTexture name="BF idle dance white0010" x="1669" y="0" width="408" height="412" frameX="-2" frameY="0" frameWidth="411" frameHeight="412"/>
<SubTexture name="BF idle dance white0011" x="1669" y="0" width="408" height="412" frameX="-2" frameY="0" frameWidth="411" frameHeight="412"/>
<SubTexture name="BF idle dance white0012" x="1669" y="0" width="408" height="412" frameX="-2" frameY="0" frameWidth="411" frameHeight="412"/>
<SubTexture name="BF idle dance white0013" x="1669" y="0" width="408" height="412" frameX="-2" frameY="0" frameWidth="411" frameHeight="412"/>
<SubTexture name="Dad idle dance BLACK LINE0000" x="2087" y="0" width="429" height="759" frameX="0" frameY="-8" frameWidth="429" frameHeight="767"/>
<SubTexture name="Dad idle dance BLACK LINE0001" x="2087" y="0" width="429" height="759" frameX="0" frameY="-8" frameWidth="429" frameHeight="767"/>
<SubTexture name="Dad idle dance BLACK LINE0002" x="2526" y="0" width="424" height="757" frameX="-2" frameY="-10" frameWidth="429" frameHeight="767"/>
<SubTexture name="Dad idle dance BLACK LINE0003" x="2526" y="0" width="424" height="757" frameX="-2" frameY="-10" frameWidth="429" frameHeight="767"/>
<SubTexture name="Dad idle dance BLACK LINE0004" x="2960" y="0" width="423" height="759" frameX="-3" frameY="-8" frameWidth="429" frameHeight="767"/>
<SubTexture name="Dad idle dance BLACK LINE0005" x="2960" y="0" width="423" height="759" frameX="-3" frameY="-8" frameWidth="429" frameHeight="767"/>
<SubTexture name="Dad idle dance BLACK LINE0006" x="3393" y="0" width="419" height="766" frameX="-5" frameY="-1" frameWidth="429" frameHeight="767"/>
<SubTexture name="Dad idle dance BLACK LINE0007" x="3393" y="0" width="419" height="766" frameX="-5" frameY="-1" frameWidth="429" frameHeight="767"/>
<SubTexture name="Dad idle dance BLACK LINE0008" x="3822" y="0" width="419" height="767" frameX="-6" frameY="0" frameWidth="429" frameHeight="767"/>
<SubTexture name="Dad idle dance BLACK LINE0009" x="3822" y="0" width="419" height="767" frameX="-6" frameY="0" frameWidth="429" frameHeight="767"/>
<SubTexture name="Dad idle dance BLACK LINE0010" x="4251" y="0" width="419" height="767" frameX="-6" frameY="0" frameWidth="429" frameHeight="767"/>
<SubTexture name="Dad idle dance BLACK LINE0011" x="4251" y="0" width="419" height="767" frameX="-6" frameY="0" frameWidth="429" frameHeight="767"/>
<SubTexture name="Dad idle dance BLACK LINE0012" x="4251" y="0" width="419" height="767" frameX="-6" frameY="0" frameWidth="429" frameHeight="767"/>
<SubTexture name="Dad idle dance BLACK LINE0013" x="4251" y="0" width="419" height="767" frameX="-6" frameY="0" frameWidth="429" frameHeight="767"/>
<SubTexture name="GF Dancing Beat WHITE0000" x="4680" y="0" width="699" height="634" frameX="-2" frameY="-14" frameWidth="703" frameHeight="648"/>
<SubTexture name="GF Dancing Beat WHITE0001" x="5389" y="0" width="703" height="634" frameX="0" frameY="-14" frameWidth="703" frameHeight="648"/>
<SubTexture name="GF Dancing Beat WHITE0002" x="6102" y="0" width="703" height="632" frameX="0" frameY="-16" frameWidth="703" frameHeight="648"/>
<SubTexture name="GF Dancing Beat WHITE0003" x="6815" y="0" width="699" height="632" frameX="-2" frameY="-16" frameWidth="703" frameHeight="648"/>
<SubTexture name="GF Dancing Beat WHITE0004" x="0" y="777" width="699" height="635" frameX="-2" frameY="-13" frameWidth="703" frameHeight="648"/>
<SubTexture name="GF Dancing Beat WHITE0005" x="709" y="777" width="699" height="635" frameX="-2" frameY="-13" frameWidth="703" frameHeight="648"/>
<SubTexture name="GF Dancing Beat WHITE0006" x="1418" y="777" width="699" height="637" frameX="-2" frameY="-11" frameWidth="703" frameHeight="648"/>
<SubTexture name="GF Dancing Beat WHITE0007" x="2127" y="777" width="699" height="648" frameX="-2" frameY="0" frameWidth="703" frameHeight="648"/>
<SubTexture name="GF Dancing Beat WHITE0008" x="2127" y="777" width="699" height="648" frameX="-2" frameY="0" frameWidth="703" frameHeight="648"/>
<SubTexture name="GF Dancing Beat WHITE0009" x="2127" y="777" width="699" height="648" frameX="-2" frameY="0" frameWidth="703" frameHeight="648"/>
<SubTexture name="GF Dancing Beat WHITE0010" x="2836" y="777" width="699" height="648" frameX="-2" frameY="0" frameWidth="703" frameHeight="648"/>
<SubTexture name="GF Dancing Beat WHITE0011" x="2836" y="777" width="699" height="648" frameX="-2" frameY="0" frameWidth="703" frameHeight="648"/>
<SubTexture name="GF Dancing Beat WHITE0012" x="2836" y="777" width="699" height="648" frameX="-2" frameY="0" frameWidth="703" frameHeight="648"/>
<SubTexture name="GF Dancing Beat WHITE0013" x="3545" y="777" width="699" height="648" frameX="-2" frameY="0" frameWidth="703" frameHeight="648"/>
<SubTexture name="GF Dancing Beat WHITE0014" x="3545" y="777" width="699" height="648" frameX="-2" frameY="0" frameWidth="703" frameHeight="648"/>
<SubTexture name="GF Dancing Beat WHITE0015" x="4254" y="777" width="699" height="636" frameX="-2" frameY="-12" frameWidth="703" frameHeight="648"/>
<SubTexture name="GF Dancing Beat WHITE0016" x="4963" y="777" width="703" height="636" frameX="0" frameY="-12" frameWidth="703" frameHeight="648"/>
<SubTexture name="GF Dancing Beat WHITE0017" x="5676" y="777" width="703" height="636" frameX="0" frameY="-12" frameWidth="703" frameHeight="648"/>
<SubTexture name="GF Dancing Beat WHITE0018" x="6389" y="777" width="699" height="636" frameX="-2" frameY="-12" frameWidth="703" frameHeight="648"/>
<SubTexture name="GF Dancing Beat WHITE0019" x="7098" y="777" width="699" height="637" frameX="-2" frameY="-11" frameWidth="703" frameHeight="648"/>
<SubTexture name="GF Dancing Beat WHITE0020" x="0" y="1435" width="699" height="637" frameX="-2" frameY="-11" frameWidth="703" frameHeight="648"/>
<SubTexture name="GF Dancing Beat WHITE0021" x="709" y="1435" width="699" height="638" frameX="-2" frameY="-10" frameWidth="703" frameHeight="648"/>
<SubTexture name="GF Dancing Beat WHITE0022" x="1418" y="1435" width="699" height="643" frameX="-2" frameY="-5" frameWidth="703" frameHeight="648"/>
<SubTexture name="GF Dancing Beat WHITE0023" x="1418" y="1435" width="699" height="643" frameX="-2" frameY="-5" frameWidth="703" frameHeight="648"/>
<SubTexture name="GF Dancing Beat WHITE0024" x="1418" y="1435" width="699" height="643" frameX="-2" frameY="-5" frameWidth="703" frameHeight="648"/>
<SubTexture name="GF Dancing Beat WHITE0025" x="2127" y="1435" width="699" height="642" frameX="-2" frameY="-6" frameWidth="703" frameHeight="648"/>
<SubTexture name="GF Dancing Beat WHITE0026" x="2127" y="1435" width="699" height="642" frameX="-2" frameY="-6" frameWidth="703" frameHeight="648"/>
<SubTexture name="GF Dancing Beat WHITE0027" x="2127" y="1435" width="699" height="642" frameX="-2" frameY="-6" frameWidth="703" frameHeight="648"/>
<SubTexture name="GF Dancing Beat WHITE0028" x="2836" y="1435" width="699" height="642" frameX="-2" frameY="-6" frameWidth="703" frameHeight="648"/>
<SubTexture name="GF Dancing Beat WHITE0029" x="2836" y="1435" width="699" height="642" frameX="-2" frameY="-6" frameWidth="703" frameHeight="648"/>
<SubTexture name="spooky dance idle BLACK LINES0000" x="3545" y="1435" width="381" height="549" frameX="-50" frameY="0" frameWidth="492" frameHeight="549"/>
<SubTexture name="spooky dance idle BLACK LINES0001" x="3545" y="1435" width="381" height="549" frameX="-50" frameY="0" frameWidth="492" frameHeight="549"/>
<SubTexture name="spooky dance idle BLACK LINES0002" x="3936" y="1435" width="379" height="541" frameX="-55" frameY="-8" frameWidth="492" frameHeight="549"/>
<SubTexture name="spooky dance idle BLACK LINES0003" x="3936" y="1435" width="379" height="541" frameX="-55" frameY="-8" frameWidth="492" frameHeight="549"/>
<SubTexture name="spooky dance idle BLACK LINES0004" x="4325" y="1435" width="357" height="484" frameX="-79" frameY="-61" frameWidth="492" frameHeight="549"/>
<SubTexture name="spooky dance idle BLACK LINES0005" x="4325" y="1435" width="357" height="484" frameX="-79" frameY="-61" frameWidth="492" frameHeight="549"/>
<SubTexture name="spooky dance idle BLACK LINES0006" x="4692" y="1435" width="354" height="494" frameX="-78" frameY="-52" frameWidth="492" frameHeight="549"/>
<SubTexture name="spooky dance idle BLACK LINES0007" x="4692" y="1435" width="354" height="494" frameX="-78" frameY="-52" frameWidth="492" frameHeight="549"/>
<SubTexture name="spooky dance idle BLACK LINES0008" x="5056" y="1435" width="492" height="532" frameX="0" frameY="-16" frameWidth="492" frameHeight="549"/>
<SubTexture name="spooky dance idle BLACK LINES0009" x="5056" y="1435" width="492" height="532" frameX="0" frameY="-16" frameWidth="492" frameHeight="549"/>
<SubTexture name="spooky dance idle BLACK LINES0010" x="5558" y="1435" width="481" height="524" frameX="-7" frameY="-20" frameWidth="492" frameHeight="549"/>
<SubTexture name="spooky dance idle BLACK LINES0011" x="5558" y="1435" width="481" height="524" frameX="-7" frameY="-20" frameWidth="492" frameHeight="549"/>
<SubTexture name="spooky dance idle BLACK LINES0012" x="4325" y="1435" width="357" height="484" frameX="-79" frameY="-61" frameWidth="492" frameHeight="549"/>
<SubTexture name="spooky dance idle BLACK LINES0013" x="4325" y="1435" width="357" height="484" frameX="-79" frameY="-61" frameWidth="492" frameHeight="549"/>
<SubTexture name="spooky dance idle BLACK LINES0014" x="4692" y="1435" width="354" height="494" frameX="-78" frameY="-52" frameWidth="492" frameHeight="549"/>
<SubTexture name="spooky dance idle BLACK LINES0015" x="4692" y="1435" width="354" height="494" frameX="-78" frameY="-52" frameWidth="492" frameHeight="549"/>
</TextureAtlas>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

35
source/MenuItem.hx Normal file
View file

@ -0,0 +1,35 @@
package;
import flixel.FlxSprite;
import flixel.graphics.frames.FlxAtlasFrames;
import flixel.group.FlxSpriteGroup;
class MenuItem extends FlxSpriteGroup
{
public function new(x:Float, y:Float, week:Int = 0, unlocked:Bool = false)
{
super(x, y);
var tex = FlxAtlasFrames.fromSparrow(AssetPaths.campaign_menu_UI_assets__png, AssetPaths.campaign_menu_UI_assets__xml);
var week:FlxSprite = new FlxSprite();
week.frames = tex;
week.animation.addByPrefix('week0', "WEEK1 select", 24);
week.animation.addByPrefix('week1', "week2 select", 24);
add(week);
week.animation.play('week' + week);
week.updateHitbox();
if (!unlocked)
{
week.alpha = 0.6;
var lock:FlxSprite = new FlxSprite(week.frameWidth + 5);
lock.frames = tex;
lock.animation.addByPrefix('lock', 'lock');
lock.animation.play('lock');
add(lock);
}
}
}

102
source/StoryMenuState.hx Normal file
View file

@ -0,0 +1,102 @@
package;
import flixel.FlxG;
import flixel.FlxSprite;
import flixel.graphics.frames.FlxAtlasFrames;
import flixel.text.FlxText;
using StringTools;
class StoryMenuState extends MusicBeatState
{
var scoreText:FlxText;
var weekData:Array<Dynamic> = [['Tutorial', 'Bopeebo', 'Fresh', 'Dad Battle'], ['Spookeez', 'South', 'Monster']];
var curWeek:Int = 0;
var txtTracklist:FlxText;
override function create()
{
scoreText = new FlxText(10, 10, 0, "SCORE: 49324858", 36);
scoreText.setFormat("VCR OSD Mono", 32);
add(scoreText);
var rankText:FlxText = new FlxText(0, 10);
rankText.text = 'RANK: GREAT';
rankText.setFormat("assets/fonts/vcr.ttf", 32);
rankText.size = scoreText.size;
rankText.screenCenter(X);
add(rankText);
var ui_tex = FlxAtlasFrames.fromSparrow(AssetPaths.campaign_menu_UI_assets__png, AssetPaths.campaign_menu_UI_assets__xml);
var yellowBG:FlxSprite = new FlxSprite(0, 56).makeGraphic(FlxG.width, 400, 0xFFF9CF51);
for (i in 0...weekData.length)
{
var unlocked:Bool = true;
if (i == 1)
unlocked = false;
var weekThing:MenuItem = new MenuItem(0, yellowBG.y + yellowBG.height + 10, i, unlocked);
add(weekThing);
}
add(yellowBG);
txtTracklist = new FlxText(FlxG.width * 0.05, yellowBG.x + yellowBG.height + 100, 0, "Tracks", 32);
txtTracklist.alignment = CENTER;
txtTracklist.font = rankText.font;
txtTracklist.color = 0xFFe55777;
add(txtTracklist);
updateText();
super.create();
}
override function update(elapsed:Float)
{
// scoreText.setFormat('VCR OSD Mono', 32);
// scoreText.text = "Score SHIT";
// FlxG.watch.addQuick('font', scoreText.font);
if (controls.UP_P)
changeWeek(-1);
if (controls.DOWN_P)
changeWeek(1);
super.update(elapsed);
}
function changeWeek(change:Int = 0):Void
{
curWeek += change;
if (curWeek >= weekData.length)
curWeek = 0;
if (curWeek < 0)
curWeek = weekData.length - 1;
updateText();
}
function updateText()
{
txtTracklist.text = "Tracks\n";
var stringThing:Array<String> = weekData[curWeek];
for (i in stringThing)
{
txtTracklist.text += "\n" + i;
}
txtTracklist.text.toUpperCase();
txtTracklist.screenCenter(X);
txtTracklist.x -= FlxG.width * 0.35;
}
}

View file

@ -41,7 +41,7 @@ class TitleState extends MusicBeatState
super.create();
#if SKIP_TO_PLAYSTATE
FlxG.switchState(new FreeplayState());
FlxG.switchState(new StoryMenuState());
#else
startIntro();
#end