ported over charter multikey and other stuff

Co-Authored-By: Ne_Eo <NeeEoo@users.noreply.github.com>
This commit is contained in:
TheZoroForce240
2024-08-03 14:34:01 +01:00
co-authored by Ne_Eo
parent d0bf0aa323
commit 00dde96956
16 changed files with 223 additions and 72 deletions
+8
View File
@@ -168,6 +168,14 @@ class Chart {
base.events = base.events.concat(extraEvents);
#end
/**
* Set defaults on strum lines
*/
for(strumLine in base.strumLines) {
if(strumLine.keyCount == null)
strumLine.keyCount = 4;
}
return base;
}
+1
View File
@@ -42,6 +42,7 @@ typedef ChartStrumLine = {
var ?strumScale:Float;
var ?scrollSpeed:Float;
var ?vocalsSuffix:String;
var ?keyCount:Int; // default=4
var ?strumLinePos:Float; // Backwards compatability
}
@@ -4,7 +4,7 @@ final class AmountEvent extends CancellableEvent {
/**
* Amount
*/
public var amount:Int;
public var amount:Null<Int>;
/**
* Shows whether or not psych users complained about this class
+7
View File
@@ -839,6 +839,13 @@ class CoolUtil
return file.file;
}
@:noUsing public static function getClosestAngle(angle:Float, targetAngle:Float):Float {
var diff:Float = angle - targetAngle;
if (diff < -180) diff += 360;
else if (diff > 180) diff -= 360;
return angle - diff;
}
public static function sortAlphabetically(array:Array<String>, ?lowercase:Bool=false) {
array.sort(function(a1, a2):Int {
if(lowercase) {