Adjusted menus (#179)

* Adjusted sprites' offsets

* Cleaned title enter

* Fixed coop text

* Make descriptions actually work

* Oops - Descriptions pt2

* Credits pt1

wip

* Credits pt2

* Credits pt3

idk if i should remove anything else sensible aside the ip

* Credits pt4

i'll stop for this pr editing the credits menu
in the future i might improve it
This commit is contained in:
⍚~Nex
2023-07-08 23:46:32 -07:00
committed by GitHub
parent 039353befc
commit 575c54ec45
17 changed files with 222 additions and 224 deletions
+2 -1
View File
@@ -1,3 +1,4 @@
story mode
freeplay
options
options
donate
+4 -4
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<TextureAtlas imagePath="donate.png">
<!-- Created with Adobe Animate version 21.0.1.37179 -->
<!-- Created with Adobe Animate version 21.0.1.37179 and edited by Nex_isDumb -->
<!-- http://www.adobe.com/products/animate.html -->
<SubTexture name="donate basic0000" x="2" y="2" width="444" height="117" pivotX="10.5" pivotY="14.85"/>
<SubTexture name="donate basic0001" x="2" y="2" width="444" height="117"/>
@@ -11,7 +11,7 @@
<SubTexture name="donate basic0006" x="2" y="240" width="444" height="117"/>
<SubTexture name="donate basic0007" x="2" y="240" width="444" height="117"/>
<SubTexture name="donate basic0008" x="2" y="240" width="444" height="117"/>
<SubTexture name="donate white0000" x="2" y="359" width="590" height="157" pivotX="18.2" pivotY="23.95" frameX="0" frameY="-2" frameWidth="590" frameHeight="159"/>
<SubTexture name="donate white0001" x="2" y="518" width="587" height="154" frameX="-1" frameY="-5" frameWidth="590" frameHeight="159"/>
<SubTexture name="donate white0002" x="2" y="674" width="585" height="155" frameX="-3" frameY="0" frameWidth="590" frameHeight="159"/>
<SubTexture name="donate white0000" x="2" y="359" width="590" height="157" pivotX="18.2" pivotY="23.95" frameX="0" frameY="18" frameWidth="590" frameHeight="159"/>
<SubTexture name="donate white0001" x="2" y="518" width="587" height="154" frameX="-1" frameY="15" frameWidth="590" frameHeight="159"/>
<SubTexture name="donate white0002" x="2" y="674" width="585" height="155" frameX="-3" frameY="20" frameWidth="590" frameHeight="159"/>
</TextureAtlas>
+4 -4
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<TextureAtlas imagePath="freeplay.png">
<!-- Created with Adobe Animate version 21.0.1.37179 -->
<!-- Created with Adobe Animate version 21.0.1.37179 and edited by Nex_isDumb -->
<!-- http://www.adobe.com/products/animate.html -->
<SubTexture name="freeplay basic0000" x="2" y="2" width="484" height="122" pivotX="7.65" pivotY="10.55"/>
<SubTexture name="freeplay basic0001" x="2" y="2" width="484" height="122"/>
@@ -11,7 +11,7 @@
<SubTexture name="freeplay basic0006" x="2" y="250" width="484" height="122"/>
<SubTexture name="freeplay basic0007" x="2" y="250" width="484" height="122"/>
<SubTexture name="freeplay basic0008" x="2" y="250" width="484" height="122"/>
<SubTexture name="freeplay white0000" x="2" y="374" width="627" height="169" pivotX="15" pivotY="17.15" frameX="0" frameY="0" frameWidth="635" frameHeight="174"/>
<SubTexture name="freeplay white0001" x="2" y="545" width="632" height="170" frameX="-3" frameY="-1" frameWidth="635" frameHeight="174"/>
<SubTexture name="freeplay white0002" x="2" y="717" width="629" height="173" frameX="-4" frameY="-1" frameWidth="635" frameHeight="174"/>
<SubTexture name="freeplay white0000" x="2" y="374" width="627" height="169" pivotX="15" pivotY="17.15" frameX="0" frameY="20" frameWidth="635" frameHeight="174"/>
<SubTexture name="freeplay white0001" x="2" y="545" width="632" height="170" frameX="-3" frameY="19" frameWidth="635" frameHeight="174"/>
<SubTexture name="freeplay white0002" x="2" y="717" width="629" height="173" frameX="-4" frameY="19" frameWidth="635" frameHeight="174"/>
</TextureAtlas>
+4 -4
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<TextureAtlas imagePath="options.png">
<!-- Created with Adobe Animate version 21.0.1.37179 -->
<!-- Created with Adobe Animate version 21.0.1.37179 and edited by Nex_isDumb -->
<!-- http://www.adobe.com/products/animate.html -->
<SubTexture name="options basic0000" x="2" y="2" width="487" height="111" pivotX="14.15" pivotY="11.95"/>
<SubTexture name="options basic0001" x="2" y="2" width="487" height="111"/>
@@ -11,7 +11,7 @@
<SubTexture name="options basic0006" x="2" y="228" width="487" height="111"/>
<SubTexture name="options basic0007" x="2" y="228" width="487" height="111"/>
<SubTexture name="options basic0008" x="2" y="228" width="487" height="111"/>
<SubTexture name="options white0000" x="2" y="341" width="606" height="155" pivotX="18.2" pivotY="23.95" frameX="-2" frameY="-1" frameWidth="610" frameHeight="163"/>
<SubTexture name="options white0001" x="2" y="498" width="607" height="158" frameX="-3" frameY="-1" frameWidth="610" frameHeight="163"/>
<SubTexture name="options white0002" x="2" y="658" width="610" height="163"/>
<SubTexture name="options white0000" x="2" y="341" width="606" height="155" pivotX="18.2" pivotY="23.95" frameX="-2" frameY="19" frameWidth="610" frameHeight="163"/>
<SubTexture name="options white0001" x="2" y="498" width="607" height="158" frameX="-3" frameY="19" frameWidth="610" frameHeight="163"/>
<SubTexture name="options white0002" x="2" y="658" width="610" height="163" frameX="0" frameY="20" frameWidth="610" frameHeight="163"/>
</TextureAtlas>
+4 -4
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<TextureAtlas imagePath="story mode.png">
<!-- Created with Adobe Animate version 21.0.1.37179 -->
<!-- Created with Adobe Animate version 21.0.1.37179 and edited by Nex_isDumb -->
<!-- http://www.adobe.com/products/animate.html -->
<SubTexture name="story mode basic0000" x="2" y="2" width="615" height="122" pivotX="8.4" pivotY="9.8"/>
<SubTexture name="story mode basic0001" x="2" y="2" width="615" height="122"/>
@@ -11,7 +11,7 @@
<SubTexture name="story mode basic0006" x="2" y="250" width="615" height="122"/>
<SubTexture name="story mode basic0007" x="2" y="250" width="615" height="122"/>
<SubTexture name="story mode basic0008" x="2" y="250" width="615" height="122"/>
<SubTexture name="story mode white0000" x="2" y="374" width="796" height="173" pivotX="11.05" pivotY="17.15" frameX="0" frameY="-3" frameWidth="796" frameHeight="181"/>
<SubTexture name="story mode white0001" x="2" y="549" width="794" height="174" frameX="-2" frameY="-2" frameWidth="796" frameHeight="181"/>
<SubTexture name="story mode white0002" x="2" y="725" width="794" height="181" frameX="0" frameY="0" frameWidth="796" frameHeight="181"/>
<SubTexture name="story mode white0000" x="2" y="374" width="796" height="173" pivotX="11.05" pivotY="17.15" frameX="0" frameY="17" frameWidth="796" frameHeight="181"/>
<SubTexture name="story mode white0001" x="2" y="549" width="794" height="174" frameX="-2" frameY="18" frameWidth="796" frameHeight="181"/>
<SubTexture name="story mode white0002" x="2" y="725" width="794" height="181" frameX="0" frameY="20" frameWidth="796" frameHeight="181"/>
</TextureAtlas>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 994 KiB

After

Width:  |  Height:  |  Size: 845 KiB

+61 -59
View File
@@ -1,59 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<TextureAtlas imagePath="titleEnter.png">
<!-- Created with Adobe Animate version 20.0.0.17400 -->
<!-- http://www.adobe.com/products/animate.html -->
<SubTexture name="ENTER PRESSED0000" x="0" y="0" width="1477" height="79"/>
<SubTexture name="ENTER PRESSED0001" x="1487" y="0" width="1477" height="79"/>
<SubTexture name="ENTER PRESSED0002" x="0" y="0" width="1477" height="79"/>
<SubTexture name="ENTER PRESSED0003" x="1487" y="0" width="1477" height="79"/>
<SubTexture name="ENTER PRESSED0004" x="0" y="0" width="1477" height="79"/>
<SubTexture name="ENTER PRESSED0005" x="1487" y="0" width="1477" height="79"/>
<SubTexture name="ENTER PRESSED0006" x="1487" y="0" width="1477" height="79"/>
<SubTexture name="ENTER PRESSED0007" x="0" y="0" width="1477" height="79"/>
<SubTexture name="ENTER PRESSED0008" x="1487" y="0" width="1477" height="79"/>
<SubTexture name="Press Enter to Begin0000" x="0" y="89" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0001" x="1505" y="89" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0002" x="0" y="195" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0003" x="1505" y="195" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0004" x="0" y="301" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0005" x="1505" y="301" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0006" x="0" y="407" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0007" x="1505" y="407" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0008" x="0" y="513" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0009" x="1505" y="513" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0010" x="0" y="619" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0011" x="1505" y="619" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0012" x="0" y="725" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0013" x="1505" y="725" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0014" x="0" y="831" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0015" x="1505" y="831" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0016" x="0" y="937" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0017" x="1505" y="937" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0018" x="0" y="1043" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0019" x="1505" y="1043" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0020" x="0" y="1149" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0021" x="1505" y="1149" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0022" x="0" y="1255" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0023" x="0" y="1255" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0024" x="1505" y="1255" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0025" x="0" y="1149" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0026" x="0" y="1361" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0027" x="1505" y="1361" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0028" x="0" y="1467" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0029" x="1505" y="1467" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0030" x="0" y="1573" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0031" x="1505" y="1573" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0032" x="0" y="1679" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0033" x="1505" y="1679" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0034" x="0" y="1785" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0035" x="1505" y="1785" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0036" x="0" y="1891" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0037" x="1505" y="1891" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0038" x="0" y="1997" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0039" x="1505" y="1997" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0040" x="0" y="2103" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0041" x="1505" y="2103" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0042" x="0" y="2209" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0043" x="1505" y="2209" width="1495" height="96"/>
<SubTexture name="Press Enter to Begin0044" x="0" y="89" width="1495" height="96"/>
</TextureAtlas>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Created with Funkin Packer v0.0.4 https://neeeoo.github.io/funkin-packer/ and edited by Nex_isDumb
-->
<TextureAtlas imagePath="titleEnter.png" width="1012" height="2300">
<SubTexture name="ENTER PRESSED0000" x="3" y="3" width="1006" height="86" frameX="-25" frameY="-6" frameWidth="1075" frameHeight="100"/>
<SubTexture name="ENTER PRESSED0001" x="3" y="95" width="1006" height="86" frameX="-25" frameY="-6" frameWidth="1075" frameHeight="100"/>
<SubTexture name="ENTER PRESSED0002" x="3" y="3" width="1006" height="86" frameX="-25" frameY="-6" frameWidth="1075" frameHeight="100"/>
<SubTexture name="ENTER PRESSED0003" x="3" y="95" width="1006" height="86" frameX="-25" frameY="-6" frameWidth="1075" frameHeight="100"/>
<SubTexture name="ENTER PRESSED0004" x="3" y="3" width="1006" height="86" frameX="-25" frameY="-6" frameWidth="1075" frameHeight="100"/>
<SubTexture name="ENTER PRESSED0005" x="3" y="95" width="1006" height="86" frameX="-25" frameY="-6" frameWidth="1075" frameHeight="100"/>
<SubTexture name="ENTER PRESSED0006" x="3" y="95" width="1006" height="86" frameX="-25" frameY="-6" frameWidth="1075" frameHeight="100"/>
<SubTexture name="ENTER PRESSED0007" x="3" y="3" width="1006" height="86" frameX="-25" frameY="-6" frameWidth="1075" frameHeight="100"/>
<SubTexture name="ENTER PRESSED0008" x="3" y="95" width="1006" height="86" frameX="-25" frameY="-6" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0000" x="3" y="187" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0001" x="3" y="279" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0002" x="3" y="371" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0003" x="3" y="463" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0004" x="3" y="555" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0005" x="3" y="647" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0006" x="3" y="739" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0007" x="3" y="831" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0008" x="3" y="923" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0009" x="3" y="1015" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0010" x="3" y="1107" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0011" x="3" y="1199" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0012" x="3" y="1291" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0013" x="3" y="1383" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0014" x="3" y="1475" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0015" x="3" y="1567" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0016" x="3" y="1659" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0017" x="3" y="1751" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0018" x="3" y="1843" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0019" x="3" y="1935" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0020" x="3" y="2027" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0021" x="3" y="2119" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0022" x="3" y="2211" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0045" x="3" y="187" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0044" x="3" y="279" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0043" x="3" y="371" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0042" x="3" y="463" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0041" x="3" y="555" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0040" x="3" y="647" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0039" x="3" y="739" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0038" x="3" y="831" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0037" x="3" y="923" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0036" x="3" y="1015" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0035" x="3" y="1107" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0034" x="3" y="1199" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0033" x="3" y="1291" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0032" x="3" y="1383" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0031" x="3" y="1475" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0030" x="3" y="1567" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0029" x="3" y="1659" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0028" x="3" y="1751" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0027" x="3" y="1843" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0026" x="3" y="1935" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0025" x="3" y="2027" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0024" x="3" y="2119" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
<SubTexture name="Press Enter to Begin0023" x="3" y="2211" width="1006" height="86" frameX="-25" frameY="-7" frameWidth="1075" frameHeight="100"/>
</TextureAtlas>
+1 -1
View File
@@ -223,7 +223,7 @@ class FreeplayState extends MusicBeatState
}
scoreText.text = "PERSONAL BEST:" + lerpScore;
scoreBG.scale.set(Math.max(diffText.width, scoreText.width) + 8, (coopText.visible ? coopText.y + coopText.height : 66));
scoreBG.scale.set(Math.max(Math.max(diffText.width, scoreText.width), coopText.width) + 8, (coopText.visible ? coopText.y + coopText.height : 66));
scoreBG.updateHitbox();
scoreBG.x = FlxG.width - scoreBG.width;
+1 -3
View File
@@ -2,7 +2,7 @@ package funkin.menus;
import haxe.Json;
import funkin.backend.FunkinText;
// import funkin.menus.credits.CreditsMain;
import funkin.menus.credits.CreditsMain;
import flixel.FlxState;
import flixel.addons.transition.FlxTransitionableState;
import flixel.effects.FlxFlicker;
@@ -174,10 +174,8 @@ class MainMenuState extends MusicBeatState
trace("Freeplay Menu Selected");
case 'donate':
/*
FlxG.switchState(new CreditsMain());
trace("Credits Menu Selected");
*/
case 'options':
FlxG.switchState(new OptionsMenu());
+54 -119
View File
@@ -1,134 +1,69 @@
package funkin.menus.credits;
import funkin.backend.FunkinText;
import flixel.util.FlxColor;
import funkin.backend.shaders.CustomShader;
import funkin.options.type.TextOption;
import funkin.options.OptionsScreen;
import flixel.graphics.FlxGraphic;
import openfl.display.BitmapData;
import flixel.addons.transition.FlxTransitionableState;
import funkin.backend.system.github.GitHub;
import funkin.backend.system.github.GitHubContributor;
import funkin.menus.MainMenuState;
import funkin.options.type.PortraitOption;
using funkin.backend.utils.BitmapUtil;
using StringTools;
class CreditsCodename extends OptionsScreen {
public var contributorsSprites:Array<FlxSprite> = [];
public var contributorsAvatars:Array<FlxGraphic> = [];
public var contributorsColors:Array<FlxColor> = [];
public var avatarLoadListId:Int = 0;
public var contributors:Array<GitHubContributor>;
public var interpColor:FlxInterpolateColor;
public var errorMessage:String = "";
public override function create() {
contributors = GitHub.getContributors("YoshiCrafter29", "CodenameEngine", function(e) {
errorMessage = Std.string(e);
});
var totalContributions = 0;
for(c in contributors)
totalContributions += c.contributions;
options = [for(c in contributors) new TextOption(
c.login,
'Total Contributions: ${c.contributions} / ${totalContributions} (${FlxMath.roundDecimal(c.contributions / totalContributions * 100, 2)}%) - Select to open GitHub account',
function() {
// open the link
CoolUtil.openURL(c.html_url);
})];
super.create();
interpColor = new FlxInterpolateColor(bg.color);
}
public override function changeSelection(change:Int) {
if (contributors.length <= 0)
return;
super.changeSelection(change);
}
public override function createAdditional() {
if (contributors.length <= 0) {
var t = new FunkinText(0, 0, FlxG.width, 'Could not load engine contributors.\nMake sure you\'re connected to the Internet.\n\n${errorMessage}\n\nPress BACK to go back.', 40, true);
t.alignment = CENTER;
t.borderSize *= 1.75;
t.screenCenter();
var bg = new FlxSprite(0, 0).makeGraphic(1, 1, 0xFF000000);
bg.alpha = 0.5;
bg.scale.set(FlxG.width - 80, t.height + 40);
bg.updateHitbox();
bg.screenCenter();
add(bg);
add(t);
return;
}
for(k=>c in contributors) {
var spr = new FlxSprite(0, (OptionsScreen.optionHeight * (k+0.5)) - 48);
spr.antialiasing = true;
spr.setUnstretchedGraphicSize(96, 96, false);
spr.updateHitbox();
spr.shader = new CustomShader('engine/circleProfilePicture');
contributorsSprites.push(spr);
add(spr);
}
// asynchronous pfp loading
Main.execAsync(function() {
for(k=>c in contributors) {
var bytes = GitHub.__requestBytesOnGitHubServers('${c.avatar_url}&size=96');
var bmap = BitmapData.fromBytes(bytes);
var color = bmap.getMostPresentSaturatedColor();
contributorsAvatars.push(FlxG.bitmap.add(bmap, false, 'GITHUB-USER:${c.login}'));
contributorsColors.push(color);
if (destroyed) return;
}
});
class CreditsCodename extends funkin.options.OptionsScreen {
public override function new()
{
super("Codename Engine", "All the contributors of the engine! - Press RESET to update the list (One reset per 2 minutes).");
checkUpdate();
displayList();
}
public override function update(elapsed:Float) {
if (funkin.options.PlayerSettings.solo.controls.RESET && checkUpdate()) {
displayList();
updateMenuDesc();
}
super.update(elapsed);
if (contributors.length <= 0) {
if (controls.BACK)
exit();
return;
}
if (avatarLoadListId < contributorsAvatars.length) {
for(i in avatarLoadListId...contributorsAvatars.length) {
var v = contributorsSprites[i];
v.loadGraphic(contributorsAvatars[i]);
v.setUnstretchedGraphicSize(96, 96, false);
v.updateHitbox();
}
avatarLoadListId = contributorsAvatars.length;
}
for(k=>spr in contributorsSprites) {
var alpha = options[k];
spr.x = alpha.x - 10;
}
interpColor.fpsLerpTo(contributorsColors[curSelected], 0.0625);
bg.color = interpColor.color;
}
public override function destroy() {
super.destroy();
public function checkUpdate():Bool {
var curTime:Float = Date.now().getTime();
if(Options.lastUpdated != null && curTime < Options.lastUpdated + 120000) return false; // Fuck you Github rate limits - Nex_isDumb
Options.lastUpdated = curTime;
var error:Bool = false;
//Main.execAsync(function() {
var idk = GitHub.getContributors("FNF-CNE-Devs", "CodenameEngine", function(e) {
error = true;
var errMsg:String = ~/\d+.\d+.\d+.\d+/.replace(e.message, "[Your IP]"); // Removing sensitive stuff - Nex_isDumb
errMsg = 'Error while trying to download contributors list:\n$errMsg';
Logs.traceColored([Logs.logText(errMsg.replace('\n', ' '), RED)], ERROR);
funkin.backend.utils.NativeAPI.showMessageBox("Codename Engine Warning", errMsg, MSG_WARNING);
});
//});
if(error) return false;
Options.contributors = idk;
trace('List Updated!');
return true;
}
public override function exit() {
MusicBeatState.skipTransOut = true;
FlxG.switchState(new CreditsMain());
public function displayList() {
//if (curSelected > Options.contributors.length - 1) changeSelection(-(curSelected - (Options.contributors.length - 1)));
if (curSelected > Options.contributors.length - 1) curSelected = Options.contributors.length - 1;
changeSelection(0, true);
while (members.length > 0) {
members[0].destroy();
remove(members[0], true);
}
var totalContributions = 0;
for(c in Options.contributors) totalContributions += c.contributions;
for(c in Options.contributors) {
var opt:PortraitOption = new PortraitOption(
c.login,
'Total Contributions: ${c.contributions} / ${totalContributions} (${FlxMath.roundDecimal(c.contributions / totalContributions * 100, 2)}%) - Select to open GitHub account',
function() CoolUtil.openURL(c.html_url)
);
opt.loadFromGithub(c);
add(opt);
}
}
}
+25 -14
View File
@@ -3,23 +3,34 @@ package funkin.menus.credits;
import flixel.addons.transition.FlxTransitionableState;
import funkin.options.OptionsScreen;
import funkin.options.type.*;
import funkin.options.TreeMenu;
class CreditsMain extends TreeMenu {
var editable:Array<OptionCategory> = [];
var bg:FlxSprite;
class CreditsMain extends OptionsScreen {
public override function create() {
options = [
bg = new FlxSprite(-80).loadAnimatedGraphic(Paths.image('menus/menuBGBlue'));
// bg.scrollFactor.set();
bg.scale.set(1.15, 1.15);
bg.updateHitbox();
bg.screenCenter();
bg.scrollFactor.set();
bg.antialiasing = true;
add(bg);
var selectables:Array<OptionType> = [];
for (s in editable) selectables.push(new TextOption(s.name, s.desc, function() {
// TODO: Custom Credits
new TextOption("Codename Engine", "Select this to see all of the contributors of the engine!", function() {
MusicBeatState.skipTransIn = MusicBeatState.skipTransOut = true;
FlxG.switchState(new CreditsCodename());
}),
new TextOption("Friday Night Funkin'", "Select this to open the itch.io page of the original game to donate!", function() {
CoolUtil.openURL("https://ninja-muffin24.itch.io/funkin");
})
];
}));
selectables.push(new TextOption("Codename Engine", "Select this to see all the contributors of the engine!", function() {
optionsTree.add(Type.createInstance(CreditsCodename, []));
}));
selectables.push(new TextOption("Friday Night Funkin'", "Select this to open the itch.io page of the original game to donate!", function() {
CoolUtil.openURL("https://ninja-muffin24.itch.io/funkin");
}));
main = new OptionsScreen('Credits', 'The people who made this possible!', selectables);
super.create();
}
public override function exit() {
FlxG.switchState(new MainMenuState());
}
}
+2
View File
@@ -49,6 +49,8 @@ class Options
*/
public static var freeplayLastSong:String = null;
public static var freeplayLastDifficulty:String = "normal";
public static var contributors:Array<funkin.backend.system.github.GitHubContributor> = [];
public static var lastUpdated:Null<Float>;
// CHARTER
public static var charterMetronomeEnabled:Bool = false;
+11 -5
View File
@@ -54,15 +54,21 @@ class OptionsScreen extends FlxTypedSpriteGroup<OptionType> {
onClose(this);
}
public function changeSelection(sel:Int) {
if (members.length <= 0 || sel == 0) return;
public function changeSelection(sel:Int, force:Bool = false) {
if (members.length <= 0 || (sel == 0 && !force)) return;
CoolUtil.playMenuSFX(SCROLL);
curSelected = FlxMath.wrap(curSelected + sel, 0, members.length-1);
for(o in members)
members[curSelected].selected = true;
updateMenuDesc();
}
public function updateMenuDesc(?customTxt:String) {
if (parent.treeParent == null) return;
var text:String = members[curSelected].desc;
if (customTxt != null) text = customTxt;
parent.treeParent.updateDesc(text);
}
public dynamic function onClose(o:OptionsScreen) {}
+1
View File
@@ -2,6 +2,7 @@ package funkin.options;
class OptionsTree extends FlxTypedGroup<OptionsScreen> {
public var lastMenu:OptionsScreen;
public var treeParent:TreeMenu;
public override function new() {
super();
+10 -3
View File
@@ -43,6 +43,7 @@ class TreeMenu extends MusicBeatState {
optionsTree = new OptionsTree();
optionsTree.onMenuChange = onMenuChange;
optionsTree.onMenuClose = onMenuClose;
optionsTree.treeParent = this;
optionsTree.add(main);
@@ -72,12 +73,18 @@ class TreeMenu extends MusicBeatState {
t += '${o.name} > ';
pathLabel.text = t;
pathDesc.text = optionsTree.members.last().desc;
pathBG.scale.set(FlxG.width, pathDesc.y + pathDesc.height + 2);
pathBG.updateHitbox();
var idk:OptionsScreen = optionsTree.members.last();
if (idk.members.length > 0) updateDesc(idk.members[idk.curSelected].desc);
}
}
public function updateDesc(moreTxt:String = '') {
pathDesc.text = optionsTree.members.last().desc;
if (moreTxt != null && moreTxt.length > 0) pathDesc.text += '\n' + moreTxt;
pathBG.scale.set(FlxG.width, pathDesc.y + pathDesc.height + 2);
pathBG.updateHitbox();
}
public function exit() {
FlxG.switchState((lastState != null) ? Type.createInstance(lastState, []) : new MainMenuState());
}
@@ -0,0 +1,37 @@
package funkin.options.type;
import openfl.display.BitmapData;
import flixel.graphics.FlxGraphic;
import funkin.backend.shaders.CustomShader;
import funkin.backend.system.github.GitHubContributor;
import funkin.backend.system.github.GitHub;
class PortraitOption extends TextOption {
public var portrait:FlxSprite = null;
public function new(name:String, desc:String, callback:Void->Void, ?graphic:FlxGraphic, size:Int = 96) {
super(name, desc, callback);
if (graphic != null) addPortrait(graphic, size);
}
public function addPortrait(graphic:FlxGraphic, size:Int = 96) {
if (portrait == null) {
portrait = new FlxSprite();
portrait.antialiasing = true;
portrait.shader = new CustomShader('engine/circleProfilePicture');
add(portrait);
}
portrait.loadGraphic(graphic);
portrait.setUnstretchedGraphicSize(size, size, false);
portrait.updateHitbox();
portrait.setPosition(90 - portrait.width, 0);
}
public function loadFromGithub(user:GitHubContributor, size:Int = 96) {
//Main.execAsync(function() {
var bytes = GitHub.__requestBytesOnGitHubServers('${user.avatar_url}&size=$size');
var bmap = BitmapData.fromBytes(bytes);
addPortrait(FlxG.bitmap.add(bmap, false, 'GITHUB-USER:${user.login}'), size);
//});
}
}
+1 -3
View File
@@ -23,9 +23,7 @@ class TextOption extends OptionType {
public override function onSelect() {
super.onSelect();
CoolUtil.playMenuSFX(CONFIRM);
FlxFlicker.flicker(this, 1, Options.flashingMenu ? 0.06 : 0.15, true, false, function(t) {
});
FlxFlicker.flicker(this, 1, Options.flashingMenu ? 0.06 : 0.15, true, false);
selectCallback();
}
}