Add FEATURE_NAUGHTYNESS and turn it off for mobile builds
This commit is contained in:
committed by
EliteMasterEric
parent
075f03235d
commit
e8cd87c1f1
@@ -401,6 +401,12 @@ class Project extends HXProject
|
||||
*/
|
||||
static final FEATURE_MOBILE_IAR:FeatureFlag = "FEATURE_MOBILE_IAR";
|
||||
|
||||
/**
|
||||
* `-DFEATURE_NAUGHTYNESS`
|
||||
* If this feature flag is enabled, naughtyness will be a toggleable option in the Options Menu.
|
||||
*/
|
||||
static final FEATURE_NAUGHTYNESS:FeatureFlag = "FEATURE_NAUGHTYNESS";
|
||||
|
||||
//
|
||||
// CONFIGURATION FUNCTIONS
|
||||
//
|
||||
@@ -758,6 +764,9 @@ class Project extends HXProject
|
||||
// Should be true only on mobile builds.
|
||||
FEATURE_TOUCH_CONTROLS.apply(this, isMobile());
|
||||
|
||||
// Should be true on everything other than mobile.
|
||||
FEATURE_NAUGHTYNESS.apply(this, !isMobile());
|
||||
|
||||
// Should be true only on mobile release builds. Remember you can add the flag manually for testing.
|
||||
FEATURE_MOBILE_ADVERTISEMENTS.apply(this, (isMobile() && isRelease() && envConfig != null));
|
||||
FEATURE_MOBILE_IAP.apply(this, (isMobile() && isRelease() && envConfig != null));
|
||||
|
||||
@@ -56,7 +56,11 @@ class Preferences
|
||||
|
||||
static function get_naughtyness():Bool
|
||||
{
|
||||
#if NO_FEATURE_NAUGHTYNESS
|
||||
return false;
|
||||
#else
|
||||
return Save?.instance?.options?.naughtyness;
|
||||
#end
|
||||
}
|
||||
|
||||
static function set_naughtyness(value:Bool):Bool
|
||||
|
||||
@@ -108,9 +108,11 @@ class PreferencesMenu extends Page<OptionsState.OptionsMenuPageName>
|
||||
*/
|
||||
function createPrefItems():Void
|
||||
{
|
||||
#if FEATURE_NAUGHTYNESS
|
||||
createPrefItemCheckbox('Naughtyness', 'If enabled, raunchy content (such as swearing, etc.) will be displayed.', function(value:Bool):Void {
|
||||
Preferences.naughtyness = value;
|
||||
}, Preferences.naughtyness);
|
||||
#end
|
||||
createPrefItemCheckbox('Downscroll', 'If enabled, this will make the notes move downwards.', function(value:Bool):Void {
|
||||
Preferences.downscroll = value;
|
||||
}, Preferences.downscroll,
|
||||
|
||||
Reference in New Issue
Block a user