More work on alphabet editor

This commit is contained in:
Ne_Eo
2024-11-03 23:59:52 +01:00
parent bb1538c78f
commit a36fc62c0a
4 changed files with 211 additions and 117 deletions
+5 -2
View File
@@ -66,13 +66,16 @@ class MainState extends FlxState {
if(Framerate.isLoaded)
Framerate.instance.reload();
if (betaWarningShown)
FlxG.switchState(new funkin.editors.alphabet.AlphabetEditor("bold"));
/*if (betaWarningShown)
FlxG.switchState(new TitleState());
else {
FlxG.switchState(new BetaWarningState());
betaWarningShown = true;
}
}*/
#if sys
CoolUtil.safeAddAttributes('./.temp/', NativeAPI.FileAttribute.HIDDEN);
#end
}
}
+12 -1
View File
@@ -78,7 +78,7 @@ class CoolUtil
/**
* Applies the % operator, but without any negatives.
*
*
* @param dividend The intial value. The left side of the equation.
* @param divisor What to modulo by. The right side of the equation.
* @return A positive reminder of `dividend / divisor`.
@@ -87,6 +87,17 @@ class CoolUtil
return ((dividend % divisor) + divisor) % divisor;
}
/**
* Applies the % operator, but without any negatives. But it's an int.
*
* @param dividend The intial value. The left side of the equation.
* @param divisor What to modulo by. The right side of the equation.
* @return A positive reminder of `dividend / divisor`.
*/
public static inline function positiveModuloInt(dividend:Int, divisor:Int) {
return ((dividend % divisor) + divisor) % divisor;
}
/**
* Shortcut to parse JSON from an Asset path
* @param assetPath Path to the JSON asset.