diff --git a/source/ModchartState.hx b/source/ModchartState.hx index aea76e3..f1815c9 100644 --- a/source/ModchartState.hx +++ b/source/ModchartState.hx @@ -543,6 +543,26 @@ class ModchartState Application.current.window.y = y; }); + Lua_helper.add_callback(lua,"getWindowX",function() { + return Application.current.window.x; + }); + + Lua_helper.add_callback(lua,"getWindowY",function() { + return Application.current.window.y; + }); + + Lua_helper.add_callback(lua,"resizeWindow",function(Width:Int,Height:Int) { + Application.current.window.resize(Width,Height); + }); + + Lua_helper.add_callback(lua,"getScreenWidth",function() { + return Application.current.window.displayMode.width; + }); + + Lua_helper.add_callback(lua,"getScreenHeight",function() { + return Application.current.window.displayMode.height; + }); + // tweens diff --git a/source/Options.hx b/source/Options.hx index da7a9c6..2e4cae4 100644 --- a/source/Options.hx +++ b/source/Options.hx @@ -330,14 +330,14 @@ class FPSCapOption extends Option override function right():Bool { if (FlxG.save.data.fpsCap >= 290) { - FlxG.save.data.fpsCap = 800; // set it really high lol, I mean. if you hit that cap, it really doesn't do much lol. + FlxG.save.data.fpsCap = 290; (cast (Lib.current.getChildAt(0), Main)).setFPSCap(290); } else FlxG.save.data.fpsCap = FlxG.save.data.fpsCap + 10; (cast (Lib.current.getChildAt(0), Main)).setFPSCap(FlxG.save.data.fpsCap); - OptionsMenu.versionShit.text = "Current FPS Cap: " + (FlxG.save.data.fpsCap > 290 ? "Unlimited (In Gameplay)" : FlxG.save.data.fpsCap) + " - Description - " + description; + OptionsMenu.versionShit.text = "Current FPS Cap: " + FlxG.save.data.fpsCap + " - Description - " + description; return true; }