Remove useless indentation
This commit is contained in:
Vendored
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"editor.detectIndentation": false,
|
||||
"editor.insertSpaces": false,
|
||||
"editor.detectIndentation": false,
|
||||
"editor.insertSpaces": false,
|
||||
"files.associations": {
|
||||
"*.hx": "haxe",
|
||||
"*.hscript": "haxe",
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@ _**QOL = Quality of Life**_
|
||||
|
||||
<details>
|
||||
<summary><h2>Player QOL Features</h2></summary>
|
||||
|
||||
|
||||
- New input system
|
||||
- New accuracy and misses system, added to fix the base game UI.
|
||||
- New options, including:
|
||||
@@ -72,7 +72,7 @@ _**QOL = Quality of Life**_
|
||||
- Weeks are located in `data/weeks/weeks/`
|
||||
- If you need to rearrange the weeks in-game, you can use the `data/weeks/weeks.txt` file.
|
||||
- Editors for Charts and Characters (Stage coming soon)
|
||||
- Undos/Redos supported
|
||||
- Undos/Redos supported
|
||||
- Warning on closing unsaved work
|
||||
- Clean UI (for ocd freaks)
|
||||
- Mature Chart editor (Character editor rework soon)
|
||||
|
||||
+27
-27
@@ -1,30 +1,30 @@
|
||||
__ /
|
||||
/ _ _ |_ |_ . _
|
||||
\__) (- |_ |_ | | )
|
||||
|
||||
__
|
||||
|_ _ _ _ |
|
||||
| | (- (_| |( \/
|
||||
/
|
||||
|
||||
_ _ _
|
||||
(_) | ) (_|
|
||||
|
||||
__
|
||||
|_ _ . _| _ _ . _ |_ |_ _ _ |_
|
||||
| | | (_| (_| \/ | ) | (_) | ) |_ \/ (- (_| | )
|
||||
/ _/ /
|
||||
__ /
|
||||
/ _ _ |_ |_ . _
|
||||
\__) (- |_ |_ | | )
|
||||
|
||||
__
|
||||
|_ _ _ _ |
|
||||
| | (- (_| |( \/
|
||||
/
|
||||
|
||||
_ _ _
|
||||
(_) | ) (_|
|
||||
|
||||
__
|
||||
|_ _ . _| _ _ . _ |_ |_ _ _ |_
|
||||
| | | (_| (_| \/ | ) | (_) | ) |_ \/ (- (_| | )
|
||||
/ _/ /
|
||||
|
||||
HEY
|
||||
Thanks for downloadin Friday Night FUNKIN'
|
||||
If you downloaded this from any other place than ninja-muffin24.itch.io/FUNKIN
|
||||
You might be in DANGER!!!
|
||||
You might be in DANGER!!!
|
||||
|
||||
The Itch.io release is the only official source for the desktop (PC, Mac, Linux) versions of the game!
|
||||
As of right now, the game is FREE! If you paid for it, you got SCAMMED!
|
||||
|
||||
Now that that's out of the way....
|
||||
THANKS FOR DOWNLOADIN.
|
||||
THANKS FOR DOWNLOADIN.
|
||||
|
||||
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-
|
||||
PERMISSIONS XDDDD
|
||||
@@ -77,16 +77,16 @@ I love Tom Fulp.
|
||||
- Cameron ♪(´▽`)
|
||||
|
||||
##################################################################################
|
||||
|
||||
_ _ _____ _ _ ____ ____ ___ _ _ _ _ ____ ____
|
||||
| \ | | | ____| | | | | / ___| | _ \ / _ \ | | | | | \ | | | _ \ / ___|
|
||||
| \| | | _| | | /\ | | | | _ | |_) | | | | | | | | | | \| | | | | | \___ \
|
||||
|
||||
_ _ _____ _ _ ____ ____ ___ _ _ _ _ ____ ____
|
||||
| \ | | | ____| | | | | / ___| | _ \ / _ \ | | | | | \ | | | _ \ / ___|
|
||||
| \| | | _| | | /\ | | | | _ | |_) | | | | | | | | | | \| | | | | | \___ \
|
||||
| |\ | | |___ \ V V / | |_| | | _ < | |_| | | |_| | | |\ | | |_| | ___) |
|
||||
|_| \_| |_____| \_/\_/ \____| |_| \_\ \___/ \___/ |_| \_| |____/ |____/
|
||||
_ _ _ ___ ___ __ _ _ _ _ _
|
||||
|_ | | |_ |_) \_/ | |_| | |\ | /__ |_ |_ | | |_ |_) \_/ / \ |\ | |_
|
||||
|_| \_| |_____| \_/\_/ \____| |_| \_\ \___/ \___/ |_| \_| |____/ |____/
|
||||
_ _ _ ___ ___ __ _ _ _ _ _
|
||||
|_ | | |_ |_) \_/ | |_| | |\ | /__ |_ |_ | | |_ |_) \_/ / \ |\ | |_
|
||||
|_ \/ |_ | \ | | | | _|_ | \| \_| o |_)\/ |_ \/ |_ | \ | \_/ | \| |_ o
|
||||
/ /
|
||||
|
||||
/ /
|
||||
|
||||
##################################################################################
|
||||
i stole this from stamper.
|
||||
@@ -1,3 +1,3 @@
|
||||
//
|
||||
function update(elapsed:Float)
|
||||
if (FlxG.keys.justPressed.F5) FlxG.resetState();
|
||||
if (FlxG.keys.justPressed.F5) FlxG.resetState();
|
||||
@@ -35,8 +35,8 @@ function onNoteCreation(event) {
|
||||
note.updateHitbox();
|
||||
}
|
||||
|
||||
function onPostNoteCreation(event) {
|
||||
var splashes = event.note;
|
||||
function onPostNoteCreation(event) {
|
||||
var splashes = event.note;
|
||||
if (pixelSplashes)
|
||||
splashes.splash = "pixel-default";
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE codename-engine-splashes>
|
||||
<splashes sprite="game/splashes/default" alpha="0.6">
|
||||
<splashes sprite="game/splashes/default" alpha="0.6">
|
||||
<strum id="0"> <!-- LEFT -->
|
||||
<anim name="splashleft1" anim="note impact 1 purple" fps="24" x="0" y="0" />
|
||||
<anim name="splashleft2" anim="note impact 2 purple" fps="24" x="0" y="0" />
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!DOCTYPE codename-engine-splashes>
|
||||
<!--Pixel Splashes by APurples!!-->
|
||||
<splashes sprite="stages/school/ui/pixel-splashes" alpha="0.6" antialiasing="false" scale="3.5">
|
||||
<splashes sprite="stages/school/ui/pixel-splashes" alpha="0.6" antialiasing="false" scale="3.5">
|
||||
<strum id="0"> <!-- LEFT -->
|
||||
<anim name="splashleft1" anim="splash purple 1" fps="24" x="-1" y="-2" />
|
||||
<anim name="splashleft2" anim="splash purple 2" fps="24" x="-1" y="-2" />
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!DOCTYPE codename-engine-splashes>
|
||||
<!--Pixel Splashes by APurples!!-->
|
||||
<splashes sprite="stages/school/ui/pixel-secret-splashes" alpha="0.6" antialiasing="false" scale="3.5">
|
||||
<splashes sprite="stages/school/ui/pixel-secret-splashes" alpha="0.6" antialiasing="false" scale="3.5">
|
||||
<strum id="0"> <!-- LEFT -->
|
||||
<anim name="splashleft1" anim="splash purple 1" fps="24" x="-3"/>
|
||||
</strum>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE codename-engine-splashes>
|
||||
<splashes sprite="game/splashes/secret" alpha="0.6" scale="0.75">
|
||||
<splashes sprite="game/splashes/secret" alpha="0.6" scale="0.75">
|
||||
<strum id="0"> <!-- LEFT -->
|
||||
<anim name="splash purple" anim="splash purple" fps="24" x="0" y="0" />
|
||||
</strum>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!DOCTYPE codename-engine-stage>
|
||||
<stage zoom="0.8" name="mall" folder="stages/mall/" startCamPosY="450" startCamPosX="500">
|
||||
<sprite name="bg" x="-1000" y="-500" sprite="bgWalls" scroll="0.2"/>
|
||||
|
||||
|
||||
<high-memory>
|
||||
<sprite name="upperBoppers" x="-240" y="-90" sprite="upperBop" scroll="0.2" type="onbeat"/>
|
||||
</high-memory>
|
||||
@@ -9,7 +9,7 @@
|
||||
<sprite name="tree" x="370" y="-250" sprite="christmasTree" scroll="0.4"/>
|
||||
<sprite name="bottomBoppers" x="-300" y="140" sprite="bottomBop" scroll="0.9" type="onbeat" />
|
||||
<sprite name="fgSnow" x="-600" y="700" sprite="fgSnow"/>
|
||||
|
||||
|
||||
<high-memory>
|
||||
<sprite name="santa" x="-840" y="150" sprite="santa" type="onbeat"/>
|
||||
</high-memory>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<boyfriend x="810"/>
|
||||
|
||||
<!-- FOREGROUND TANKMANS -->
|
||||
|
||||
|
||||
<high-memory>
|
||||
<sprite name="tank0" x="-500" y="650" sprite="tank0" scrollx="1.7" scrolly="1.5" type="onbeat" beatInterval="2" zoomfactor="1.25"/>
|
||||
<sprite name="tank1" x="-300" y="750" sprite="tank1" scrollx="2" scrolly="0.2" type="onbeat" beatInterval="2" zoomfactor="1.25"/>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<SubTexture name="add-bottomleft" x="0" y="30" width="11" height="4"/>
|
||||
<SubTexture name="add-bottom" x="11" y="30" width="19" height="4"/>
|
||||
<SubTexture name="add-bottomright" x="30" y="30" width="18" height="4"/>
|
||||
|
||||
|
||||
<SubTexture name="edit-topleft" x="0" y="34" width="11" height="4"/>
|
||||
<SubTexture name="edit-top" x="11" y="34" width="19" height="4"/>
|
||||
<SubTexture name="edit-topright" x="30" y="34" width="18" height="4"/>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<SubTexture name="middleleft" x="0" y="1" width="1" height="21"/>
|
||||
<SubTexture name="middle" x="1" y="1" width="94" height="21"/>
|
||||
<SubTexture name="middleright" x="95" y="1" width="1" height="21"/>
|
||||
|
||||
|
||||
<SubTexture name="bottomleft" x="0" y="22" width="1" height="1"/>
|
||||
<SubTexture name="bottom" x="1" y="22" width="94" height="1"/>
|
||||
<SubTexture name="bottomright" x="95" y="22" width="1" height="1"/>
|
||||
|
||||
@@ -6,12 +6,12 @@ uniform vec2 blueOff;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 uv = getCamPos(openfl_TextureCoordv);
|
||||
vec4 col;
|
||||
col.r = textureCam(bitmap, uv + redOff).r;
|
||||
col.g = textureCam(bitmap, uv + greenOff).g;
|
||||
col.b = textureCam(bitmap, uv + blueOff).b;
|
||||
col.a = texture2D(bitmap, openfl_TextureCoordv).a;
|
||||
vec2 uv = getCamPos(openfl_TextureCoordv);
|
||||
vec4 col;
|
||||
col.r = textureCam(bitmap, uv + redOff).r;
|
||||
col.g = textureCam(bitmap, uv + greenOff).g;
|
||||
col.b = textureCam(bitmap, uv + blueOff).b;
|
||||
col.a = texture2D(bitmap, openfl_TextureCoordv).a;
|
||||
|
||||
gl_FragColor = col;
|
||||
gl_FragColor = col;
|
||||
}
|
||||
@@ -6,10 +6,10 @@ uniform float strength;
|
||||
|
||||
void main() {
|
||||
vec2 uv = getCamPos(openfl_TextureCoordv);
|
||||
vec3 col = pow(textureCam(bitmap, uv).rgb, vec3(1.0 / strength));
|
||||
vec3 col = pow(textureCam(bitmap, uv).rgb, vec3(1.0 / strength));
|
||||
|
||||
float vignette = mix(1.0, 1.0 - amount, distance(uv, vec2(0.5)));
|
||||
col = pow(mix(col * color, col, vignette), vec3(strength));
|
||||
float vignette = mix(1.0, 1.0 - amount, distance(uv, vec2(0.5)));
|
||||
col = pow(mix(col * color, col, vignette), vec3(strength));
|
||||
|
||||
gl_FragColor = vec4(col, 1.0);
|
||||
}
|
||||
@@ -3,9 +3,9 @@
|
||||
// Used in colorwheel
|
||||
|
||||
vec3 hsvToRgb(vec3 c) { //hsv.x = hue, hsv.y = saturation, hsv.z = value
|
||||
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
|
||||
vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
|
||||
return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
|
||||
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
|
||||
vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
|
||||
return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
|
||||
}
|
||||
|
||||
uniform float hue;
|
||||
|
||||
@@ -21,7 +21,7 @@ function postUpdate(elapsed) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// for(s in strumLines) {
|
||||
// for(i in 0...4) {
|
||||
// var n = s.members[i];
|
||||
@@ -29,7 +29,7 @@ function postUpdate(elapsed) {
|
||||
// n.angle = 180;
|
||||
// }
|
||||
// }
|
||||
|
||||
// if (curSection != null)
|
||||
// defaultCamZoom = curSection.mustHitSection ? 0.9 : 0.5;
|
||||
|
||||
// if (curSection != null)
|
||||
// defaultCamZoom = curSection.mustHitSection ? 0.9 : 0.5;
|
||||
}
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
package="com.yoshman29.codenameengine"
|
||||
version="0.1.0" company="Yoshman29" />
|
||||
|
||||
<!--
|
||||
<!--
|
||||
CHANGE THE SAVE PATH & NAME FOR YOUR MOD HERE!
|
||||
-->
|
||||
<app save-path="YoshiCrafter29/CodenameEngine" save-name="save-default" mod-saves="true" />
|
||||
|
||||
@@ -53,7 +53,7 @@ class MusicBeatTransition extends MusicBeatSubstate {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
super.create();
|
||||
}
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ class Paths
|
||||
}
|
||||
return getPath('images/$key.$ext', library);
|
||||
}
|
||||
|
||||
|
||||
inline static public function script(key:String, ?library:String, isAssetsPath:Bool = false) {
|
||||
var scriptPath = isAssetsPath ? key : getPath(key, library);
|
||||
if (!OpenFlAssets.exists(scriptPath)) {
|
||||
|
||||
@@ -13,7 +13,7 @@ class EventsData {
|
||||
public static var defaultEventsList:Array<String> = ["HScript Call", "Camera Movement", "Add Camera Zoom", "Camera Modulo Change", "Camera Flash", "BPM Change", "Scroll Speed Change", "Alt Animation Toggle", "Play Animation"];
|
||||
public static var defaultEventsParams:Map<String, Array<EventParamInfo>> = [
|
||||
"HScript Call" => [
|
||||
{name: "Function Name", type: TString, defValue: "myFunc"},
|
||||
{name: "Function Name", type: TString, defValue: "myFunc"},
|
||||
{name: "Function Parameters (String split with commas)", type: TString, defValue: ""}
|
||||
],
|
||||
"Camera Movement" => [{name: "Camera Target", type: TStrumLine, defValue: 0}],
|
||||
|
||||
@@ -5,7 +5,7 @@ package funkin.backend.scripting;
|
||||
*/
|
||||
class DummyScript extends Script {
|
||||
public var variables:Map<String, Dynamic> = [];
|
||||
|
||||
|
||||
public override function get(v:String) {return variables.get(v);}
|
||||
public override function set(v:String, v2:Dynamic) {return variables.set(v, v2);}
|
||||
public override function onCall(method:String, parameters:Array<Dynamic>):Dynamic {
|
||||
|
||||
@@ -41,7 +41,7 @@ class MainState extends FlxState {
|
||||
else if (addon.startsWith("[HIGH]")) _highPriorityAddons.insert(0, addon);
|
||||
else _noPriorityAddons.insert(0, addon);
|
||||
}
|
||||
for (addon in _lowPriorityAddons)
|
||||
for (addon in _lowPriorityAddons)
|
||||
Paths.assetsTree.addLibrary(ModsFolder.loadModLib('${ModsFolder.addonsPath}$addon', StringTools.ltrim(addon.substr("[LOW]".length))));
|
||||
}
|
||||
if (ModsFolder.currentModFolder != null)
|
||||
|
||||
@@ -13,7 +13,7 @@ class FlixelInfo extends FramerateCategory {
|
||||
var c:Int = 0;
|
||||
for(_ in FlxG.bitmap._cache.keys())
|
||||
c++;
|
||||
|
||||
|
||||
_text = 'State: ${Type.getClassName(Type.getClass(FlxG.state))}';
|
||||
_text += '\nObject Count: ${FlxG.state.members.length}';
|
||||
_text += '\nCamera Count: ${FlxG.cameras.list.length}';
|
||||
@@ -27,7 +27,7 @@ class FlixelInfo extends FramerateCategory {
|
||||
_text += '\nPoint Count: ${points._count}';
|
||||
#end
|
||||
}
|
||||
|
||||
|
||||
this.text.text = _text;
|
||||
super.__enterFrame(t);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import openfl.text.TextField;
|
||||
class MemoryCounter extends Sprite {
|
||||
public var memoryText:TextField;
|
||||
public var memoryPeakText:TextField;
|
||||
|
||||
|
||||
public var memory:Float = 0;
|
||||
public var memoryPeak:Float = 0;
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ class StatsInfo extends FramerateCategory {
|
||||
_text = "totalDC: " + Context3DStats.totalDrawCalls();
|
||||
_text += "\nstageDC: " + Context3DStats.contextDrawCalls(DrawCallContext.STAGE);
|
||||
_text += "\nstage3DDC: " + Context3DStats.contextDrawCalls(DrawCallContext.STAGE3D);
|
||||
|
||||
|
||||
this.text.text = _text;
|
||||
super.__enterFrame(t);
|
||||
}
|
||||
|
||||
@@ -179,12 +179,12 @@ class GitHub {
|
||||
return r;
|
||||
}
|
||||
private static function isRedirect(status:Int):Bool {
|
||||
switch (status) {
|
||||
switch (status) {
|
||||
// 301: Moved Permanently, 302: Found (Moved Temporarily), 307: Temporary Redirect, 308: Permanent Redirect - Nex
|
||||
case 301 | 302 | 307 | 308 :
|
||||
trace("Redirected with status code: " + status);
|
||||
case 301 | 302 | 307 | 308 :
|
||||
trace("Redirected with status code: " + status);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
private static function __parseGitHubException(obj:Dynamic):GitHubException {
|
||||
|
||||
@@ -21,14 +21,14 @@ class AsyncUpdater {
|
||||
public function new(releases:Array<GitHubRelease>) {
|
||||
this.releases = releases;
|
||||
}
|
||||
|
||||
|
||||
public function execute() {
|
||||
Main.execAsync(installUpdates);
|
||||
}
|
||||
#end
|
||||
|
||||
|
||||
#if windows
|
||||
|
||||
|
||||
#if windows
|
||||
public static var executableGitHubName:String = "update-windows.exe";
|
||||
public static var executableName:String = "CodenameEngine.exe";
|
||||
#end
|
||||
@@ -49,7 +49,7 @@ class AsyncUpdater {
|
||||
|
||||
public var lastTime:Float = 0;
|
||||
public var oldBytesLoaded:Float = 0;
|
||||
|
||||
|
||||
public function installUpdates() {
|
||||
prepareInstallationEnvironment();
|
||||
downloadFiles();
|
||||
@@ -64,7 +64,7 @@ class AsyncUpdater {
|
||||
progress.curFileName = e;
|
||||
trace('extracting file ${path}');
|
||||
var reader = ZipUtil.openZip(path);
|
||||
|
||||
|
||||
progress.curZipProgress = new ZipProgress();
|
||||
ZipUtil.uncompressZip(reader, './', null, progress.curZipProgress);
|
||||
// FileSystem.deleteFile(path);
|
||||
@@ -72,7 +72,7 @@ class AsyncUpdater {
|
||||
if (executableReplaced = FileSystem.exists('$path$executableName')) {
|
||||
progress.curFile = files.length;
|
||||
progress.curFileName = executableName;
|
||||
|
||||
|
||||
var progPath = Sys.programPath();
|
||||
var bakFile = '${Path.withoutExtension(progPath)}.bak';
|
||||
if (FileSystem.exists(bakFile))
|
||||
@@ -133,7 +133,7 @@ class AsyncUpdater {
|
||||
downloadStream.addEventListener(ProgressEvent.PROGRESS, function(e) {
|
||||
progress.bytesLoaded = e.bytesLoaded;
|
||||
progress.bytesTotal = e.bytesTotal;
|
||||
|
||||
|
||||
var curTime = Lib.getTimer();
|
||||
|
||||
progress.downloadSpeed = (e.bytesLoaded - oldBytesLoaded) / ((curTime - lastTime) / 1000);
|
||||
@@ -160,7 +160,7 @@ class AsyncUpdater {
|
||||
|
||||
public function prepareInstallationEnvironment() {
|
||||
progress.step = PREPARING;
|
||||
|
||||
|
||||
#if windows
|
||||
path = '${Sys.getEnv("TEMP")}\\Codename Engine\\Updater\\';
|
||||
#else
|
||||
|
||||
@@ -59,7 +59,7 @@ class UpdateScreen extends MusicBeatState {
|
||||
overSound = FlxG.sound.load(Paths.sound('gameOverEnd'));
|
||||
|
||||
updater.execute();
|
||||
|
||||
|
||||
FlxG.camera.addShader(rainbowShader = new CustomShader("engine/updaterShader"));
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ class UpdateScreen extends MusicBeatState {
|
||||
// update is done, play bf's anim
|
||||
FlxG.sound.music.stop();
|
||||
overSound.play();
|
||||
|
||||
|
||||
remove(generalProgress);
|
||||
remove(partProgress);
|
||||
generalProgress = FlxDestroyUtil.destroy(generalProgress);
|
||||
|
||||
@@ -11,7 +11,7 @@ using funkin.backend.system.github.GitHub;
|
||||
class UpdateUtil {
|
||||
public static final repoOwner:String = "YoshiCrafter29";
|
||||
public static final repoName:String = "CodenameTestRepo";
|
||||
|
||||
|
||||
public static function init() {
|
||||
// deletes old bak file if it exists
|
||||
#if sys
|
||||
@@ -22,11 +22,11 @@ class UpdateUtil {
|
||||
}
|
||||
|
||||
public static function checkForUpdates():UpdateCheckCallback {
|
||||
var curTag = 'v${Application.current.meta.get('version')}';
|
||||
var curTag = 'v${Application.current.meta.get('version')}';
|
||||
trace(curTag);
|
||||
|
||||
|
||||
var error = false;
|
||||
|
||||
|
||||
var newUpdates = __doReleaseFiltering(GitHub.getReleases(repoOwner, repoName, function(e) {
|
||||
error = true;
|
||||
}), curTag);
|
||||
@@ -35,7 +35,7 @@ class UpdateUtil {
|
||||
success: false,
|
||||
newUpdate: false
|
||||
};
|
||||
|
||||
|
||||
if (newUpdates.length <= 0) {
|
||||
return {
|
||||
success: true,
|
||||
|
||||
@@ -180,13 +180,13 @@ class XMLUtil {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new sprite based on a XML node.
|
||||
*/
|
||||
* Creates a new sprite based on a XML node.
|
||||
*/
|
||||
public static inline function createSpriteFromXML(node:Access, parentFolder:String = "", defaultAnimType:XMLAnimType = BEAT, ?cl:Class<FunkinSprite>, ?args:Array<Dynamic>):FunkinSprite {
|
||||
if(cl == null) cl = FunkinSprite;
|
||||
if(args == null) args = [];
|
||||
return loadSpriteFromXML(Type.createInstance(cl, args), node, parentFolder, defaultAnimType);
|
||||
}
|
||||
if(cl == null) cl = FunkinSprite;
|
||||
if(args == null) args = [];
|
||||
return loadSpriteFromXML(Type.createInstance(cl, args), node, parentFolder, defaultAnimType);
|
||||
}
|
||||
|
||||
public static function extractAnimFromXML(anim:Access, animType:XMLAnimType = NONE, loop:Bool = false):AnimData {
|
||||
var animData:AnimData = {
|
||||
|
||||
@@ -21,7 +21,7 @@ class SaveWarning {
|
||||
if (warningFunc != null) warningFunc(closingWindow);
|
||||
|
||||
if (FlxG.state != null && FlxG.state is UIState) {
|
||||
FlxG.state.openSubState(new UIWarningSubstate("Unsaved Changes!", "Your changes will be lost if you don't save them. (Can't be recovered)\n\n\nWould you like to Cancel?",
|
||||
FlxG.state.openSubState(new UIWarningSubstate("Unsaved Changes!", "Your changes will be lost if you don't save them. (Can't be recovered)\n\n\nWould you like to Cancel?",
|
||||
[
|
||||
{
|
||||
label: "Cancel",
|
||||
|
||||
@@ -52,7 +52,7 @@ class CharacterEditor extends UIState {
|
||||
WindowUtils.endfix = " (Character Editor)";
|
||||
SaveWarning.selectionClass = CharacterSelection;
|
||||
SaveWarning.saveFunc = () -> {_file_save(null);};
|
||||
|
||||
|
||||
topMenu = [
|
||||
{
|
||||
label: "File",
|
||||
|
||||
@@ -182,7 +182,7 @@ class CharacterInfoScreen extends UISubstateWindow {
|
||||
xml.set("sprite", spriteTextBox.label.text);
|
||||
if (iconColorWheel.colorChanged)
|
||||
xml.set("color", iconColorWheel.curColor.toHexString(false).replace("0x", "#"));
|
||||
for (val in customPropertiesButtonList.buttons.members)
|
||||
for (val in customPropertiesButtonList.buttons.members)
|
||||
xml.set(val.propertyText.label.text, val.valueText.label.text);
|
||||
|
||||
for (anim in character.animDatas)
|
||||
|
||||
@@ -99,7 +99,7 @@ class Charter extends UIState {
|
||||
WindowUtils.endfix = " (Chart Editor)";
|
||||
SaveWarning.selectionClass = CharterSelection;
|
||||
SaveWarning.saveFunc = () -> {_file_save(null);};
|
||||
|
||||
|
||||
topMenu = [
|
||||
{
|
||||
label: "File",
|
||||
@@ -501,7 +501,7 @@ class Charter extends UIState {
|
||||
|
||||
for(strL in PlayState.SONG.strumLines)
|
||||
createStrumline(strumLines.members.length, strL, false, false);
|
||||
|
||||
|
||||
// create notes
|
||||
notesGroup.autoSort = false;
|
||||
var noteCount:Int = 0;
|
||||
@@ -669,11 +669,11 @@ class Charter extends UIState {
|
||||
for (s in selection) {
|
||||
if (s.draggable) {
|
||||
var changePoint:FlxPoint = FlxPoint.get(verticalChange, horizontalChange);
|
||||
if (!FlxG.keys.pressed.SHIFT)
|
||||
if (!FlxG.keys.pressed.SHIFT)
|
||||
changePoint.x -= ((s.step + verticalChange) - quantStepRounded(s.step+verticalChange, verticalChange > 0 ? 0.35 : 0.65));
|
||||
|
||||
var boundedChange:FlxPoint = changePoint.clone();
|
||||
|
||||
|
||||
// Some maths, so cool bro -lunar (i dont know why i quopte my self here)
|
||||
if (s.step + changePoint.x < 0) boundedChange.x += Math.abs(s.step + changePoint.x);
|
||||
if (s.step + changePoint.x > __endStep-1) boundedChange.x -= (s.step + changePoint.x) - (__endStep-1);
|
||||
@@ -702,7 +702,7 @@ class Charter extends UIState {
|
||||
}
|
||||
case NONE:
|
||||
if (FlxG.mouse.justPressed)
|
||||
FlxG.mouse.getWorldPosition(charterCamera, dragStartPos);
|
||||
FlxG.mouse.getWorldPosition(charterCamera, dragStartPos);
|
||||
|
||||
if (gridBackdropDummy.hovered) {
|
||||
// AUTO DETECT
|
||||
@@ -711,11 +711,11 @@ class Charter extends UIState {
|
||||
|
||||
var id = Math.floor(mousePos.x / 40);
|
||||
var mouseOnGrid = id >= 0 && id < 4 * gridBackdrops.strumlinesAmount && mousePos.y >= 0;
|
||||
|
||||
|
||||
if (FlxG.mouse.justReleased) {
|
||||
for (n in selection) n.selected = false;
|
||||
selection = [];
|
||||
|
||||
|
||||
if (mouseOnGrid && mousePos.y > 0 && mousePos.y < (__endStep)*40) {
|
||||
var note = new CharterNote();
|
||||
note.updatePos(
|
||||
@@ -760,7 +760,7 @@ class Charter extends UIState {
|
||||
var change:Float = Math.max((mousePos.y-(FlxG.keys.pressed.SHIFT ? dragStartPos.y : quantStep(dragStartPos.y))) / 40, -n.susLength);
|
||||
n.tempSusLength = change;
|
||||
|
||||
if (!FlxG.keys.pressed.SHIFT)
|
||||
if (!FlxG.keys.pressed.SHIFT)
|
||||
n.tempSusLength -= (n.susLength + change) - quantStepRounded(n.susLength + change, change > 0 ? 0.35 : 0.65);
|
||||
@:privateAccess n.__susInstaLerp = FlxG.keys.pressed.SHIFT;
|
||||
});
|
||||
@@ -777,7 +777,7 @@ class Charter extends UIState {
|
||||
undoChanges.push({before: oldSusLen, after: n.susLength, note: n});
|
||||
});
|
||||
undos.addToUndo(CEditSustains(undoChanges));
|
||||
|
||||
|
||||
gridActionType = NONE;
|
||||
currentCursor = ARROW;
|
||||
}
|
||||
@@ -785,7 +785,7 @@ class Charter extends UIState {
|
||||
addEventSpr.selectable = !selectionBox.visible;
|
||||
|
||||
var inBoundsY:Bool = (mousePos.y > 0 && mousePos.y < (__endStep)*40);
|
||||
|
||||
|
||||
// Event Spr
|
||||
if (mousePos.x < 0 && mousePos.x > -addEventSpr.bWidth && gridActionType == NONE && inBoundsY) {
|
||||
addEventSpr.incorporeal = false;
|
||||
@@ -927,7 +927,7 @@ class Charter extends UIState {
|
||||
var i = 0;
|
||||
var toBeDeleted:Selection = [];
|
||||
for (note in notesGroup.members)
|
||||
if (note.strumLineID == strumLineID) {
|
||||
if (note.strumLineID == strumLineID) {
|
||||
undoNotes.push(buildNote(note));
|
||||
toBeDeleted.push(note);
|
||||
}
|
||||
@@ -1019,8 +1019,8 @@ class Charter extends UIState {
|
||||
|
||||
var buttonI:Int = 0;
|
||||
for (button in quantButtons) {
|
||||
button.visible = ((button.quant == quant) ||
|
||||
(button.quant == quants[FlxMath.wrap(quants.indexOf(quant)-1, 0, quants.length-1)]) ||
|
||||
button.visible = ((button.quant == quant) ||
|
||||
(button.quant == quants[FlxMath.wrap(quants.indexOf(quant)-1, 0, quants.length-1)]) ||
|
||||
(button.quant == quants[FlxMath.wrap(quants.indexOf(quant)+1, 0, quants.length-1)]));
|
||||
button.selectable = button.visible;
|
||||
if (!button.visible) continue;
|
||||
@@ -1039,7 +1039,7 @@ class Charter extends UIState {
|
||||
noteTypeText.y = Std.int((noteTopButton.bHeight - noteTypeText.height) / 2);
|
||||
}
|
||||
noteTypeText.text = '($noteType) ${noteTypes[noteType-1] == null ? "Default Note" : noteTypes[noteType-1]}';
|
||||
|
||||
|
||||
super.update(elapsed);
|
||||
|
||||
scrollBar.size = (FlxG.height / 40 / charterCamera.zoom);
|
||||
@@ -1245,7 +1245,7 @@ class Charter extends UIState {
|
||||
}
|
||||
selection = sObjects;
|
||||
_edit_copy(_); // to fix stupid bugs
|
||||
|
||||
|
||||
undos.addToUndo(CCreateSelection(sObjects.copy()));
|
||||
}
|
||||
|
||||
@@ -1263,7 +1263,7 @@ class Charter extends UIState {
|
||||
|
||||
function _edit_undo(_) {
|
||||
if (strumLines.isDragging || selectionDragging || subState != null) return;
|
||||
|
||||
|
||||
selection = [];
|
||||
var undo = undos.undo();
|
||||
switch(undo) {
|
||||
@@ -1286,7 +1286,7 @@ class Charter extends UIState {
|
||||
case CSelectionDrag(selectionDrags):
|
||||
for (s in selectionDrags)
|
||||
if (s.selectable.draggable) s.selectable.handleDrag(s.change * -1);
|
||||
|
||||
|
||||
selection = [for (s in selectionDrags) s.selectable];
|
||||
case CEditSustains(changes):
|
||||
for(n in changes)
|
||||
@@ -1466,7 +1466,7 @@ class Charter extends UIState {
|
||||
null
|
||||
];
|
||||
|
||||
for (_quant in quants)
|
||||
for (_quant in quants)
|
||||
newChilds.push({
|
||||
label: '${_quant}x Grid Snap',
|
||||
onSelect: (_) -> {setquant(_quant); buildSnapsUI();},
|
||||
@@ -1485,7 +1485,7 @@ class Charter extends UIState {
|
||||
|
||||
function _note_selectall(_) {
|
||||
selection = [for (note in notesGroup.members) note];
|
||||
}
|
||||
}
|
||||
|
||||
function _note_selectmeasure(_) {
|
||||
selection = [for (note in notesGroup.members)
|
||||
@@ -1614,7 +1614,7 @@ class Charter extends UIState {
|
||||
}
|
||||
notesGroup.sortNotes();
|
||||
for(n in notesGroup.members) {
|
||||
if (PlayState.SONG.strumLines[n.strumLineID] != null)
|
||||
if (PlayState.SONG.strumLines[n.strumLineID] != null)
|
||||
PlayState.SONG.strumLines[n.strumLineID].notes.push(buildNote(n));
|
||||
}
|
||||
buildEvents();
|
||||
@@ -1681,7 +1681,7 @@ class Charter extends UIState {
|
||||
newChanges[i] = CSelectionDrag([
|
||||
for (selectionDrag in selectionDrags)
|
||||
{
|
||||
selectable: __relinkSingleSelection(selectionDrag.selectable),
|
||||
selectable: __relinkSingleSelection(selectionDrag.selectable),
|
||||
change: selectionDrag.change
|
||||
}
|
||||
]);
|
||||
@@ -1725,7 +1725,7 @@ class Charter extends UIState {
|
||||
songPosition: Conductor.songPosition,
|
||||
playbackSpeed: playBackSlider.value,
|
||||
quantSelected: quant,
|
||||
noteTypeSelected: noteType,
|
||||
noteTypeSelected: noteType,
|
||||
strumlinesDraggable: strumLines.draggable,
|
||||
hitSounds: [for (strumLine in strumLines.members) strumLine.hitsounds],
|
||||
mutedVocals: [for (strumLine in strumLines.members) !(strumLine.vocals.volume > 0)],
|
||||
|
||||
@@ -46,7 +46,7 @@ class CharterBackdropGroup extends FlxTypedGroup<CharterBackdrop> {
|
||||
public override function update(elapsed:Float) {
|
||||
for (grid in members)
|
||||
grid.active = grid.visible = false;
|
||||
|
||||
|
||||
super.update(elapsed);
|
||||
|
||||
for (i => strumLine in strumLineGroup.members) {
|
||||
@@ -74,7 +74,6 @@ class CharterBackdropGroup extends FlxTypedGroup<CharterBackdrop> {
|
||||
grid.active = grid.visible = true;
|
||||
grid.updateSprites();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public var draggingObj:CharterBackdrop = null;
|
||||
@@ -135,7 +134,7 @@ class CharterBackdrop extends FlxTypedGroup<Dynamic> {
|
||||
beatSeparator = new FlxBackdrop(null, Y, 0, 0);
|
||||
beatSeparator.y = -1;
|
||||
beatSeparator.visible = Options.charterShowBeats;
|
||||
|
||||
|
||||
for(sep in [sectionSeparator, beatSeparator]) {
|
||||
sep.makeSolid(1, 1, -1);
|
||||
sep.alpha = 0.5;
|
||||
|
||||
@@ -51,7 +51,7 @@ class CharterEvent extends UISliceSprite implements ICharterSelectable {
|
||||
if (Assets.exists(Paths.pack('events/$name'))) {
|
||||
var packimg = Assets.getText(Paths.pack('events/$name')).split('________PACKSEP________')[3];
|
||||
if (isBase64 = (packimg != null))
|
||||
path = Assets.getText(Paths.pack('events/$name')).split('________PACKSEP________')[3];
|
||||
path = Assets.getText(Paths.pack('events/$name')).split('________PACKSEP________')[3];
|
||||
}
|
||||
var spr = new FlxSprite().loadGraphic(isBase64 ? openfl.display.BitmapData.fromBase64(path.trim(), 'UTF8') : path);
|
||||
return spr;
|
||||
|
||||
@@ -31,7 +31,7 @@ class CharterNote extends UISprite implements ICharterSelectable {
|
||||
|
||||
public function new() {
|
||||
super();
|
||||
|
||||
|
||||
antialiasing = true; ID = -1;
|
||||
loadGraphic(Paths.image('editors/charter/note'), true, 157, 154);
|
||||
animation.add("note", [for(i in 0...frames.frames.length) i], 0, true);
|
||||
@@ -154,7 +154,7 @@ class CharterNote extends UISprite implements ICharterSelectable {
|
||||
|
||||
if (strumLine != null) {
|
||||
sustainSpr.alpha = alpha = !strumLine.strumLine.visible ? (__passed ? 0.2 : 0.4) : (__passed ? 0.6 : 1);
|
||||
typeText.alpha = !strumLine.strumLine.visible ? (__passed ? 0.4 : 0.6) : (__passed ? 0.8 : 1);
|
||||
typeText.alpha = !strumLine.strumLine.visible ? (__passed ? 0.4 : 0.6) : (__passed ? 0.8 : 1);
|
||||
}
|
||||
|
||||
colorTransform.redMultiplier = colorTransform.greenMultiplier = colorTransform.blueMultiplier = selected ? 0.75 : 1;
|
||||
|
||||
@@ -64,7 +64,7 @@ class CharterNoteGroup extends FlxTypedGroup<CharterNote> {
|
||||
|
||||
if (autoSort && members.length != __lastSort)
|
||||
sortNotes();
|
||||
|
||||
|
||||
forEach((n) -> {
|
||||
if(n.exists && n.active) {
|
||||
n.cameras = n.__lastDrawCameras = cameras;
|
||||
|
||||
@@ -44,18 +44,18 @@ class CharterNoteHoverer extends CharterNote {
|
||||
if (Charter.instance.gridActionType == NOTE_DRAG) {
|
||||
var verticalChange:Float = (__mousePos.y - Charter.instance.dragStartPos.y) / 40;
|
||||
var horizontalChange:Int = CoolUtil.floorInt((__mousePos.x - (Std.int(Charter.instance.dragStartPos.x / 40) * 40)) / 40);
|
||||
|
||||
|
||||
for (s in Charter.selection) {
|
||||
if (s != null && s.draggable && s is CharterNote) {
|
||||
var draggingNote:CharterNote = cast(s, CharterNote);
|
||||
y = (draggingNote.step + verticalChange);
|
||||
if (!FlxG.keys.pressed.SHIFT)
|
||||
if (!FlxG.keys.pressed.SHIFT)
|
||||
y -= ((draggingNote.step + verticalChange)
|
||||
- Charter.instance.quantStepRounded(draggingNote.step+verticalChange, verticalChange > 0 ? 0.35 : 0.65));
|
||||
y *= 40;
|
||||
var newID:Int = Std.int(FlxMath.bound(draggingNote.fullID + horizontalChange, 0, (Charter.instance.strumLines.members.length*4)-1));
|
||||
x = (id=newID) * 40; y = FlxMath.bound(y, 0, (Charter.instance.__endStep*40) - height);
|
||||
|
||||
|
||||
angle = switch(animation.curAnim.curFrame = (draggingNote.id % 4)) {
|
||||
case 0: -90;
|
||||
case 1: 180;
|
||||
|
||||
@@ -108,7 +108,7 @@ class NoteTypeButton extends UIButton {
|
||||
var path:String = 'game/notes/default';
|
||||
if (Assets.exists(Paths.image('game/notes/${notetype}')))
|
||||
path = 'game/notes/${notetype}';
|
||||
|
||||
|
||||
noteSpr.frames = Paths.getFrames(path);
|
||||
noteSpr.animation.addByPrefix('scroll', 'green0');
|
||||
noteSpr.animation.play("scroll");
|
||||
|
||||
@@ -29,7 +29,7 @@ class CharterSelection extends EditorTreeMenu {
|
||||
for(s in freeplayList.songs) new EditorIconOption(s.name, "Press ACCEPT to choose a difficulty to edit.", s.icon, function() {
|
||||
curSong = s;
|
||||
var list:Array<OptionType> = [
|
||||
for(d in s.difficulties) if (d != "")
|
||||
for(d in s.difficulties) if (d != "")
|
||||
new TextOption(d, "Press ACCEPT to edit the chart for the selected difficulty", function() {
|
||||
FlxG.switchState(new Charter(s.name, d));
|
||||
})
|
||||
|
||||
@@ -79,7 +79,7 @@ class CharterStrumLineGroup extends FlxTypedGroup<CharterStrumline> {
|
||||
fixEvents();
|
||||
}
|
||||
|
||||
public inline function fixEvents() {
|
||||
public inline function fixEvents() {
|
||||
for (i in Charter.instance.eventsGroup.members) {
|
||||
for (j in i.events) {
|
||||
var paramTypes:Array<EventParamInfo> = EventsData.getEventParams(j.name);
|
||||
|
||||
@@ -63,7 +63,7 @@ class CharterStrumlineScreen extends UISubstateWindow {
|
||||
|
||||
var charFileList = Character.getList(true);
|
||||
if (charFileList.length == 0) charFileList = Character.getList(false);
|
||||
|
||||
|
||||
charactersList = new UIButtonList<CharacterButton>(15, title.y + title.height + 36, 250, 269, "", FlxPoint.get(250, 54), null, 0);
|
||||
charactersList.addButton.callback = () -> charactersList.add(new CharacterButton(0, 0, "New Char", charFileList, charactersList));
|
||||
charactersList.cameraSpacing = 0;
|
||||
@@ -142,7 +142,7 @@ class CharterStrumlineScreen extends UISubstateWindow {
|
||||
closeButton.color = 0xFFFF0000;
|
||||
|
||||
var suffixlist = ["NONE"];
|
||||
for (i in Paths.getFolderContent('songs/${Charter.__song.toLowerCase()}/song'))
|
||||
for (i in Paths.getFolderContent('songs/${Charter.__song.toLowerCase()}/song'))
|
||||
if (i.startsWith("Voices")) {
|
||||
i = haxe.io.Path.withoutExtension(i.substr("Voices".length));
|
||||
if (i == "") continue;
|
||||
|
||||
@@ -87,7 +87,7 @@ class UIAudioPlayer extends UIButton {
|
||||
playingSprite.animation.play(sound.playing ? "playing" : "paused");
|
||||
timeText.text = '${FlxStringUtil.formatTime(sound.time/1000, true)} / ${FlxStringUtil.formatTime(sound.length/1000)}';
|
||||
|
||||
if(timeBarPlayer.clipRect == null)
|
||||
if(timeBarPlayer.clipRect == null)
|
||||
timeBarPlayer.clipRect = new FlxRect(0, 0, timeBarPlayer.frameWidth, timeBarPlayer.frameHeight);
|
||||
|
||||
timeBarPlayer.clipRect.x = timeBarPlayer.frameWidth * (sound.time/sound.length);
|
||||
@@ -106,13 +106,13 @@ class UIAudioPlayer extends UIButton {
|
||||
|
||||
var spritePos:FlxPoint = sprite.getScreenPosition(FlxPoint.get(), __lastDrawCameras[0]);
|
||||
|
||||
if (((mousePos.x > (spritePos.x)) && (mousePos.x < (spritePos.x) + timeBar.barWidth))
|
||||
if (((mousePos.x > (spritePos.x)) && (mousePos.x < (spritePos.x) + timeBar.barWidth))
|
||||
&& ((mousePos.y > (spritePos.y)) && (mousePos.y < (spritePos.y) + timeBar.barHeight))) {
|
||||
if (FlxG.mouse.justPressed) {
|
||||
draggingObj = sprite;
|
||||
wasPlaying = draggingObj == timeBar ? sound.playing : false;
|
||||
}
|
||||
|
||||
|
||||
if (FlxG.mouse.pressed) {
|
||||
if (draggingObj == timeBar) {
|
||||
if (sound.playing) sound.pause();
|
||||
@@ -137,7 +137,7 @@ class UIAudioPlayer extends UIButton {
|
||||
super.destroy();
|
||||
|
||||
sound.stop();
|
||||
@:privateAccess sound.reset();
|
||||
@:privateAccess sound.reset();
|
||||
bytes = null;
|
||||
}
|
||||
}
|
||||
@@ -121,7 +121,6 @@ class UIButtonList<T:UIButton> extends UIWindow {
|
||||
if (dragCallback != null) dragCallback(cast button, button.ID, i);
|
||||
button.ID = i; // Ok back to normal :D
|
||||
}
|
||||
|
||||
}
|
||||
addButton.selectable = (hovered && !dragging);
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ class UIColorwheel extends UISliceSprite {
|
||||
}
|
||||
|
||||
inline function updateColorPickerSelector()
|
||||
colorPickerSelector.selector.setPosition(colorPicker.x + (colorPicker.width *saturation) - 8, colorPicker.y + (colorPicker.height + (colorPicker.height * -brightness))- 8);
|
||||
colorPickerSelector.selector.setPosition(colorPicker.x + (colorPicker.width *saturation) - 8, colorPicker.y + (colorPicker.height + (colorPicker.height * -brightness))- 8);
|
||||
|
||||
inline function updateColorPickerMouse(mousePos:FlxPoint) {
|
||||
saturation = mousePos.x/colorPicker.width; brightness = 1 + -(mousePos.y/colorPicker.height);
|
||||
|
||||
@@ -55,7 +55,7 @@ class UISliceSprite extends UISprite {
|
||||
frame = topleft;
|
||||
setPosition(x, y);
|
||||
__setSize(
|
||||
topleft.frame.width * Math.min(bWidth/(topleft.frame.width*2), 1),
|
||||
topleft.frame.width * Math.min(bWidth/(topleft.frame.width*2), 1),
|
||||
topleft.frame.height * Math.min(bHeight/(topleft.frame.height*2), 1)
|
||||
);
|
||||
super.drawSuper();
|
||||
@@ -72,7 +72,7 @@ class UISliceSprite extends UISprite {
|
||||
setPosition(x + bWidth - (topright.frame.width * Math.min(bWidth/(topright.frame.width*2), 1)), y);
|
||||
frame = topright;
|
||||
__setSize(
|
||||
topright.frame.width * Math.min(bWidth/(topright.frame.width*2), 1),
|
||||
topright.frame.width * Math.min(bWidth/(topright.frame.width*2), 1),
|
||||
topright.frame.height * Math.min(bHeight/(topright.frame.height*2), 1)
|
||||
);
|
||||
super.drawSuper();
|
||||
@@ -110,7 +110,7 @@ class UISliceSprite extends UISprite {
|
||||
frame = bottomleft;
|
||||
setPosition(x, y + bHeight - (bottomleft.frame.height * Math.min(bHeight/(bottomleft.frame.height*2), 1)));
|
||||
__setSize(
|
||||
bottomleft.frame.width * Math.min(bWidth/(bottomleft.frame.width*2), 1),
|
||||
bottomleft.frame.width * Math.min(bWidth/(bottomleft.frame.width*2), 1),
|
||||
bottomleft.frame.height * Math.min(bHeight/(bottomleft.frame.height*2), 1)
|
||||
);
|
||||
super.drawSuper();
|
||||
@@ -126,11 +126,11 @@ class UISliceSprite extends UISprite {
|
||||
// BOTTOM RIGHT
|
||||
frame = bottomright;
|
||||
setPosition(
|
||||
x + bWidth - (bottomright.frame.width * Math.min(bWidth/(bottomright.frame.width*2), 1)),
|
||||
x + bWidth - (bottomright.frame.width * Math.min(bWidth/(bottomright.frame.width*2), 1)),
|
||||
y + bHeight - (bottomright.frame.height * Math.min(bHeight/(bottomright.frame.height*2), 1))
|
||||
);
|
||||
__setSize(
|
||||
bottomright.frame.width * Math.min(bWidth/(bottomright.frame.width*2), 1),
|
||||
bottomright.frame.width * Math.min(bWidth/(bottomright.frame.width*2), 1),
|
||||
bottomright.frame.height * Math.min(bHeight/(bottomright.frame.height*2), 1)
|
||||
);
|
||||
super.drawSuper();
|
||||
|
||||
@@ -43,21 +43,21 @@ class UISlider extends UISprite {
|
||||
|
||||
makeGraphic(barWidth, 12, 0x00000000, true);
|
||||
this.drawRoundRect(0, 0, barWidth, 12, 8, 6, 0xFFC0C0C0);
|
||||
this.drawRoundRect(1, 1, barWidth-2, 12-2, 8, 5, 0xFF140013);
|
||||
this.drawRoundRect(1, 1, barWidth-2, 12-2, 8, 5, 0xFF140013);
|
||||
cursor = BUTTON;
|
||||
|
||||
progressbar = new UISprite(centered ? barWidth/2 : 0);
|
||||
progressbar = new UISprite(centered ? barWidth/2 : 0);
|
||||
progressbar.makeGraphic(barWidth, 8, 0x00000000, true);
|
||||
progressbar.drawRoundRect(2, 0, barWidth-4, 8, 8, 2, 0xFFFFFFFF);
|
||||
progressbar.origin.x = 0; progressbar.colorTransform.color = 0xFF67009B;
|
||||
members.push(progressbar);
|
||||
progressbar.origin.x = 0; progressbar.colorTransform.color = 0xFF67009B;
|
||||
members.push(progressbar);
|
||||
|
||||
this.value = value;
|
||||
visualProgress = __barProgress;
|
||||
|
||||
members.push(startText = new UIText(x, y, 0, Std.string(segments[0].start).replace("0.", ".")));
|
||||
members.push(endText = new UIText(x + (barWidth) + 8, y, 0, Std.string(segments[segments.length-1].end).replace("0.", ".")));
|
||||
|
||||
|
||||
for (i in 0...2) {
|
||||
var selectableBar:UISprite = new UISprite(x,y);
|
||||
selectableBar.loadGraphic(Paths.image("editors/ui/slider"));
|
||||
@@ -91,14 +91,14 @@ class UISlider extends UISprite {
|
||||
var visualProgress:Float = 0;
|
||||
|
||||
var __stepperWidth = 25;
|
||||
|
||||
|
||||
public override function update(elapsed:Float) {
|
||||
selectableHitbox.follow(this, 0, (height-selectableHitbox.height)/2);
|
||||
|
||||
__stepperWidth = valueStepper.label.text.length <= 0 ? 25 : Std.int(valueStepper.label.textField.width) + 12;
|
||||
valueStepper.bWidth = Std.int(FlxMath.lerp(valueStepper.bWidth, __stepperWidth, 1/2.25));
|
||||
valueStepper.follow(this, -startText.width-10 - valueStepper.bWidth - 4, (height-valueStepper.bHeight)/2);
|
||||
|
||||
|
||||
var lastBarProgress:Float = __barProgress;
|
||||
|
||||
if (selectableHitbox.hovered && FlxG.mouse.pressed) {
|
||||
@@ -111,13 +111,13 @@ class UISlider extends UISprite {
|
||||
if (onChange != null) onChange(@:bypassAccessor value = __calcValue(__barProgress));
|
||||
valueStepper.value = value;
|
||||
}
|
||||
|
||||
|
||||
visualProgress = FlxMath.lerp(visualProgress, __barProgress, 1/2.25);
|
||||
progressbar.follow(this, progressCentered ? barWidth/2 : 0, (height-progressbar.height)/2);
|
||||
progressbar.scale.x = FlxMath.bound(visualProgress-(progressCentered?0.5:0),-1,1);
|
||||
progressbar.colorTransform.color = FlxColor.interpolate(progressbar.colorTransform.color, selectableHitbox.hovered ? 0xFF7F00BF : 0xFF67009B, 1/14);
|
||||
|
||||
selectableBar.follow(this, (visualProgress * barWidth) - (selectableBar.width/2), (height-selectableBar.height)/2); selectableBarHighlight.follow(selectableBar);
|
||||
selectableBar.follow(this, (visualProgress * barWidth) - (selectableBar.width/2), (height-selectableBar.height)/2); selectableBarHighlight.follow(selectableBar);
|
||||
selectableBarHighlight.alpha = FlxMath.lerp(selectableBarHighlight.alpha, selectableHitbox.hovered ? 0.1: 0, 1/14);
|
||||
|
||||
startText.follow(this, -startText.width-10, (height/2) - (startText.height/2));
|
||||
@@ -128,13 +128,13 @@ class UISlider extends UISprite {
|
||||
|
||||
private function __calcValue(progress:Float):Float {
|
||||
var totalProgress:Float = 0;
|
||||
for (segment in segments) {
|
||||
if (progress < totalProgress + segment.size) {
|
||||
var relativeProgress = (progress - totalProgress) / segment.size;
|
||||
return FlxMath.remapToRange(relativeProgress, 0, 1, segment.start, segment.end);
|
||||
}
|
||||
totalProgress += segment.size;
|
||||
}
|
||||
for (segment in segments) {
|
||||
if (progress < totalProgress + segment.size) {
|
||||
var relativeProgress = (progress - totalProgress) / segment.size;
|
||||
return FlxMath.remapToRange(relativeProgress, 0, 1, segment.start, segment.end);
|
||||
}
|
||||
totalProgress += segment.size;
|
||||
}
|
||||
return segments[segments.length-1].end;
|
||||
}
|
||||
|
||||
@@ -142,14 +142,14 @@ class UISlider extends UISprite {
|
||||
if (value >= segments[segments.length-1].end) return 1;
|
||||
if (value <= segments[0].start) return 0;
|
||||
|
||||
var totalProgress:Float = 0;
|
||||
for (segment in segments) {
|
||||
if (value >= segment.start && value <= segment.end) {
|
||||
var relativeProgress = FlxMath.remapToRange(value, segment.start, segment.end, 0, 1);
|
||||
return totalProgress + relativeProgress * segment.size;
|
||||
}
|
||||
totalProgress += segment.size;
|
||||
}
|
||||
var totalProgress:Float = 0;
|
||||
for (segment in segments) {
|
||||
if (value >= segment.start && value <= segment.end) {
|
||||
var relativeProgress = FlxMath.remapToRange(value, segment.start, segment.end, 0, 1);
|
||||
return totalProgress + relativeProgress * segment.size;
|
||||
}
|
||||
totalProgress += segment.size;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -649,7 +649,7 @@ class PlayState extends MusicBeatState
|
||||
var strLine = new StrumLine(chars,
|
||||
startingPos,
|
||||
strumLine.strumScale == null ? 1 : strumLine.strumScale,
|
||||
strumLine.type == 2 || (!coopMode && !((strumLine.type == 1 && !opponentMode) || (strumLine.type == 0 && opponentMode))),
|
||||
strumLine.type == 2 || (!coopMode && !((strumLine.type == 1 && !opponentMode) || (strumLine.type == 0 && opponentMode))),
|
||||
strumLine.type != 1, coopMode ? (strumLine.type == 1 ? controlsP1 : controlsP2) : controls,
|
||||
strumLine.vocalsSuffix
|
||||
);
|
||||
@@ -758,7 +758,7 @@ class PlayState extends MusicBeatState
|
||||
SaveWarning.selectionClass = CharterSelection;
|
||||
SaveWarning.warningFunc = saveWarn;
|
||||
SaveWarning.saveFunc = () -> {
|
||||
@:privateAccess Chart.save('${Paths.getAssetsRoot()}/songs/${Charter.__song.toLowerCase()}',
|
||||
@:privateAccess Chart.save('${Paths.getAssetsRoot()}/songs/${Charter.__song.toLowerCase()}',
|
||||
PlayState.SONG, Charter.__diff.toLowerCase(), {saveMetaInChart: false, saveEventsInChart: true});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ class ScriptedCutscene extends Cutscene {
|
||||
script.call("destroy");
|
||||
super.destroy();
|
||||
}
|
||||
|
||||
|
||||
// VIDEOS
|
||||
#if REGION
|
||||
public function startVideo(path:String, ?callback:Void->Void) {
|
||||
|
||||
@@ -119,7 +119,7 @@ class FreeplayState extends MusicBeatState
|
||||
DiscordUtil.changePresence("In the Menus", null);
|
||||
|
||||
super.create();
|
||||
|
||||
|
||||
// LOAD CHARACTERS
|
||||
|
||||
bg = new FlxSprite(0, 0).loadAnimatedGraphic(Paths.image('menus/menuDesat'));
|
||||
|
||||
@@ -19,25 +19,25 @@ class GitarooPause extends MusicBeatState
|
||||
if (FlxG.sound.music != null)
|
||||
FlxG.sound.music.stop();
|
||||
|
||||
var bg:FlxSprite = new FlxSprite().loadAnimatedGraphic(Paths.image('menus/pauseAlt//pauseBG'));
|
||||
var bg:FlxSprite = new FlxSprite().loadAnimatedGraphic(Paths.image('menus/pauseAlt/pauseBG'));
|
||||
add(bg);
|
||||
|
||||
var bf:FlxSprite = new FlxSprite(0, 30);
|
||||
bf.frames = Paths.getFrames('menus/pauseAlt//bfLol');
|
||||
bf.frames = Paths.getFrames('menus/pauseAlt/bfLol');
|
||||
bf.animation.addByPrefix('lol', "funnyThing", 13);
|
||||
bf.animation.play('lol');
|
||||
add(bf);
|
||||
bf.screenCenter(X);
|
||||
|
||||
replayButton = new FlxSprite(FlxG.width * 0.28, FlxG.height * 0.7);
|
||||
replayButton.frames = Paths.getFrames('menus/pauseAlt//pauseUI');
|
||||
replayButton.frames = Paths.getFrames('menus/pauseAlt/pauseUI');
|
||||
replayButton.animation.addByPrefix('selected', 'bluereplay', 0, false);
|
||||
replayButton.animation.appendByPrefix('selected', 'yellowreplay');
|
||||
replayButton.animation.play('selected');
|
||||
add(replayButton);
|
||||
|
||||
cancelButton = new FlxSprite(FlxG.width * 0.58, replayButton.y);
|
||||
cancelButton.frames = Paths.getFrames('menus/pauseAlt//pauseUI');
|
||||
cancelButton.frames = Paths.getFrames('menus/pauseAlt/pauseUI');
|
||||
cancelButton.animation.addByPrefix('selected', 'bluecancel', 0, false);
|
||||
cancelButton.animation.appendByPrefix('selected', 'cancelyellow');
|
||||
cancelButton.animation.play('selected');
|
||||
|
||||
@@ -118,7 +118,6 @@ class MainMenuState extends MusicBeatState
|
||||
FlxG.switchState(new TitleState());
|
||||
|
||||
#if MOD_SUPPORT
|
||||
// make it customisable
|
||||
if (controls.SWITCHMOD) {
|
||||
openSubState(new ModSwitchMenu());
|
||||
persistentUpdate = false;
|
||||
|
||||
@@ -161,7 +161,7 @@ class PauseSubState extends MusicBeatSubstate
|
||||
else {
|
||||
PlayState.resetSongInfos();
|
||||
if (Charter.instance != null) Charter.instance.__clearStatics();
|
||||
|
||||
|
||||
CoolUtil.playMenuSong();
|
||||
FlxG.switchState(PlayState.isStoryMode ? new StoryMenuState() : new FreeplayState());
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ class PlaytestingWarningSubstate extends MusicBeatSubstate
|
||||
|
||||
if (controls.RIGHT_P) changeSelection(1);
|
||||
if (controls.LEFT_P) changeSelection(-1);
|
||||
|
||||
|
||||
for (i => option in options) {
|
||||
option.x = FlxG.width * ((1+i)/4) - (option.fieldWidth/2);
|
||||
switch(i) {
|
||||
|
||||
@@ -276,7 +276,6 @@ class StoryMenuState extends MusicBeatState {
|
||||
}
|
||||
|
||||
public function addCharacter(charName:String) {
|
||||
|
||||
var char:Access = null;
|
||||
try {
|
||||
char = new Access(Xml.parse(Assets.getText(Paths.xml('weeks/characters/$charName'))).firstElement());
|
||||
@@ -307,7 +306,7 @@ class StoryMenuState extends MusicBeatState {
|
||||
} else {
|
||||
weeksFound = [for(c in Paths.getFolderContent('data/weeks/weeks/', false, source)) if (Path.extension(c).toLowerCase() == "xml") Path.withoutExtension(c)];
|
||||
}
|
||||
|
||||
|
||||
if (weeksFound.length > 0) {
|
||||
for(s in weeksFound)
|
||||
weeks.push(s);
|
||||
|
||||
@@ -34,7 +34,7 @@ class TitleState extends MusicBeatState
|
||||
MusicBeatState.skipTransIn = true;
|
||||
|
||||
startIntro();
|
||||
|
||||
|
||||
super.create();
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class OptionsMenu extends TreeMenu {
|
||||
}
|
||||
}
|
||||
})]);
|
||||
|
||||
|
||||
var xmlPath = Paths.xml("config/options");
|
||||
for(source in [funkin.backend.assets.AssetsLibraryList.AssetSource.SOURCE, funkin.backend.assets.AssetsLibraryList.AssetSource.MODS]) {
|
||||
if (Paths.assetsTree.existsSpecific(xmlPath, "TEXT", source)) {
|
||||
@@ -75,13 +75,13 @@ class OptionsMenu extends TreeMenu {
|
||||
} catch(e) {
|
||||
Logs.trace('Error while parsing options.xml: ${Std.string(e)}', ERROR);
|
||||
}
|
||||
|
||||
|
||||
if (access != null)
|
||||
for(o in parseOptionsFromXML(access))
|
||||
main.add(o);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override function exit() {
|
||||
@@ -123,7 +123,7 @@ class OptionsMenu extends TreeMenu {
|
||||
Logs.trace("A choice option requires an \"id\" for option saving.", WARNING);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
var optionOptions:Array<Dynamic> = [];
|
||||
var optionDisplayOptions:Array<String> = [];
|
||||
|
||||
@@ -131,10 +131,10 @@ class OptionsMenu extends TreeMenu {
|
||||
optionOptions.push(choice.att.value);
|
||||
optionDisplayOptions.push(choice.att.name);
|
||||
}
|
||||
|
||||
|
||||
if(optionOptions.length > 0)
|
||||
options.push(new ArrayOption(name, desc, optionOptions, optionDisplayOptions, node.att.id, null, FlxG.save.data));
|
||||
|
||||
|
||||
case "menu":
|
||||
options.push(new TextOption(name + " >", desc, function() {
|
||||
optionsTree.add(new OptionsScreen(name, desc, parseOptionsFromXML(node)));
|
||||
|
||||
@@ -71,7 +71,7 @@ class OptionsScreen extends FlxTypedSpriteGroup<OptionType> {
|
||||
|
||||
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);
|
||||
|
||||
@@ -52,10 +52,10 @@ class KeybindSetting extends FlxTypedSpriteGroup<FlxSprite> {
|
||||
var min = Math.min(icon.scale.x, icon.scale.y);
|
||||
icon.scale.set(min, min);
|
||||
add(icon);
|
||||
|
||||
|
||||
title.setPosition(100, 0);
|
||||
}
|
||||
|
||||
|
||||
setPosition(x, y);
|
||||
}
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@ class KeybindsOptions extends MusicBeatSubstate {
|
||||
|
||||
if (canSelect) {
|
||||
changeSelection((controls.UP_P ? -1 : 0) + (controls.DOWN_P ? 1 : 0));
|
||||
|
||||
|
||||
if (controls.BACK) {
|
||||
MusicBeatState.skipTransIn = true;
|
||||
if (isSubState)
|
||||
|
||||
@@ -107,7 +107,7 @@ class NativeWindow
|
||||
|
||||
#if (!macro && lime_cffi)
|
||||
handle = NativeCFFI.lime_window_create(parent.application.__backend.handle, width, height, flags, title);
|
||||
|
||||
|
||||
#if (DARK_MODE_WINDOW && !macro)
|
||||
funkin.backend.utils.NativeAPI.setDarkMode(title, true);
|
||||
#end
|
||||
|
||||
Reference in New Issue
Block a user