diff --git a/source/funkin/backend/utils/ClientPrefs.hx b/source/funkin/backend/utils/ClientPrefs.hx index 7eb18170..fcd5200c 100644 --- a/source/funkin/backend/utils/ClientPrefs.hx +++ b/source/funkin/backend/utils/ClientPrefs.hx @@ -88,6 +88,8 @@ import funkin.game.Init.Volume; public var showRatingStats:Bool = true; public var darkMode:Bool = false; + public var gayFurryStuff:Bool = false; + public var stats:Map = ['Max Misses' => 0, 'Max Score' => 0]; public var achievementsMap:Map = new Map(); diff --git a/source/funkin/backend/utils/native/MouseUtil.hx b/source/funkin/backend/utils/native/MouseUtil.hx index 2e071181..fb828c4c 100644 --- a/source/funkin/backend/utils/native/MouseUtil.hx +++ b/source/funkin/backend/utils/native/MouseUtil.hx @@ -1,32 +1,33 @@ package funkin.backend.utils.native; -import flixel.input.mouse.FlxMouseEvent; -import flixel.FlxSprite; +import flixel.input.mouse.*; -typedef MouseUtilStruc = { - // Mouse shit - var onClick:FlxSprite->Void; - var onHover:Void ->Void;//clicklmao +typedef MouseUtilStruc = +{ + // Mouse shit + var onClick:flixel.FlxSprite->Void; + var onHover:Void->Void; // clicklmao - // Selected Smth - var selectedSomethin:Bool; - var selectedSomethinMouse:Bool; -} + // Selected Smth + var selectedSomethin:Bool; + var selectedSomethinMouse:Bool; +} -class MouseUtil { - public static function MOUSESUPPORT(spr:FlxSprite, data:MouseUtilStruc) - { - if (ClientPrefs.data.mouseEvents && !ClientPrefs.data.lowQuality) - { - FlxMouseEvent.add(spr, null, data.onClick, function(_) - { - new FlxTimer().start(0.01, function(tmr:FlxTimer) data.selectedSomethinMouse = true); - - if (!data.selectedSomethin && data.selectedSomethinMouse) - { - data.onHover(); - } - }); - } - } -} \ No newline at end of file +class MouseUtil +{ + private static var globalManager:FlxMouseEventManager = new FlxMouseEventManager(); + + public static function MOUSESUPPORT(spr:flixel.FlxSprite, data:MouseUtilStruc) + { + if (ClientPrefs.data.mouseEvents && !ClientPrefs.data.lowQuality) + { + globalManager.add(spr, null, data.onClick, function(_) + { + new FlxTimer().start(0.01, function(tmr:FlxTimer) data.selectedSomethinMouse = true); + + if (!data.selectedSomethin && data.selectedSomethinMouse) + data.onHover(); + }); + } + } +} diff --git a/source/funkin/backend/utils/native/WindowUtil.hx b/source/funkin/backend/utils/native/WindowUtil.hx index e7b79081..1b2efaa8 100644 --- a/source/funkin/backend/utils/native/WindowUtil.hx +++ b/source/funkin/backend/utils/native/WindowUtil.hx @@ -2,7 +2,6 @@ package funkin.backend.utils.native; import lime.app.Application; - #if windows @:buildXml(' @@ -15,6 +14,9 @@ import lime.app.Application; #end class WindowUtil { + static var osInfo(get, never):String; + static var osVersion(get, never):String; + #if windows @:functionCode(' int darkMode = enable ? 1 : 0; @@ -27,21 +29,44 @@ class WindowUtil trace('Darkmode ${enable ? 'Enabled' : 'Disabled'}'); // Windows 10 support? - lime.app.Application.current.window.borderless = true; - lime.app.Application.current.window.borderless = false; + if (!osInfo.contains('11')){ + Application.current.window.borderless = true; + Application.current.window.borderless = false; + } + + trace(osInfo + ' ' + osVersion); } #end public static function setTitle(?s:String, ?normal:Bool = true) { - if (normal) - Application.current.window.title = Application.current.meta.get('name') + " - " + s; - else if (s == null) - Application.current.window.title = Application.current.meta.get('name'); - else - Application.current.window.title = s; + if (s == null) + { + if (normal) + Application.current.window.title = Application.current.meta.get('name') + " - " + s; + else + Application.current.window.title = s; + } } public static function resetTitle() Application.current.window.title = Application.current.meta.get('name'); + + // bro + + private static function get_osInfo() + { // stolen from twist engine lmao + if (lime.system.System.platformLabel != null + && lime.system.System.platformLabel != "" + && lime.system.System.platformVersion != null + && lime.system.System.platformVersion != "") + return lime.system.System.platformLabel.replace(lime.system.System.platformVersion, "").trim(); + else + trace('Unable to grab OS Label'); + + return null; + } + + private static inline function get_osVersion() + return lime.system.System.platformVersion; } diff --git a/source/funkin/game/FPS.hx b/source/funkin/game/FPS.hx index aa094860..bbcf6c9a 100644 --- a/source/funkin/game/FPS.hx +++ b/source/funkin/game/FPS.hx @@ -73,7 +73,7 @@ class FPS extends TextField if (currentCount != cacheCount) { - text = "FPS: " + currentFPS; + text = '${ClientPrefs.data.gayFurryStuff ? "owo's per seconds" : 'FPS'}: $currentFPS'; var memoryMegas:Float = 0; diff --git a/source/funkin/game/options/GameplaySettingsSubState.hx b/source/funkin/game/options/GameplaySettingsSubState.hx index 2564d2bf..32000bb7 100644 --- a/source/funkin/game/options/GameplaySettingsSubState.hx +++ b/source/funkin/game/options/GameplaySettingsSubState.hx @@ -214,6 +214,13 @@ class GameplaySettingsSubState extends BaseOptionsMenu option.changeValue = 0.1; addOption(option); + var option:Option = new Option('Furry Stuff', + 'erm, owo?', + 'gayFurryStuff', + 'bool', + false); + addOption(option); + super(); }