Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New thingoid #8

Merged
merged 9 commits into from
Jun 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file removed source/BeatBattle.hx
Empty file.
9 changes: 3 additions & 6 deletions source/MainMenuState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ class MainMenuState extends MusicBeatState
FlxTween.tween(menuItem,{y: 60 + (i * 160)},1 + (i * 0.25) ,{ease: FlxEase.expoInOut, onComplete: function(flxTween:FlxTween)
{
finishedFunnyMove = true;
changeItem();
}});
else
menuItem.y = 60 + (i * 160);
Expand Down Expand Up @@ -164,11 +165,7 @@ class MainMenuState extends MusicBeatState
{
if (optionShit[curSelected] == 'donate')
{
#if linux
Sys.command('/usr/bin/xdg-open', ["https://www.kickstarter.com/projects/funkin/friday-night-funkin-the-full-ass-game", "&"]);
#else
FlxG.openURL('https://www.kickstarter.com/projects/funkin/friday-night-funkin-the-full-ass-game');
#end
fancyOpenURL("https://www.kickstarter.com/projects/funkin/friday-night-funkin-the-full-ass-game");
}
else
{
Expand Down Expand Up @@ -263,4 +260,4 @@ class MainMenuState extends MusicBeatState
spr.updateHitbox();
});
}
}
}
14 changes: 12 additions & 2 deletions source/ModchartState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,8 @@ class ModchartState

setVar("screenWidth",FlxG.width);
setVar("screenHeight",FlxG.height);
setVar("windowWidth",FlxG.width);
setVar("windowHeight",FlxG.height);
setVar("hudWidth", PlayState.instance.camHUD.width);
setVar("hudHeight", PlayState.instance.camHUD.height);

Expand Down Expand Up @@ -605,11 +607,19 @@ class ModchartState
});

Lua_helper.add_callback(lua,"getScreenWidth",function() {
return Application.current.window.displayMode.width;
return Application.current.window.display.currentMode.width;
});

Lua_helper.add_callback(lua,"getScreenHeight",function() {
return Application.current.window.displayMode.height;
return Application.current.window.display.currentMode.height;
});

Lua_helper.add_callback(lua,"getWindowWidth",function() {
return Application.current.window.width;
});

Lua_helper.add_callback(lua,"getWindowHeight",function() {
return Application.current.window.height;
});


Expand Down
9 changes: 9 additions & 0 deletions source/MusicBeatState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,13 @@ class MusicBeatState extends FlxUIState
{
//do literally nothing dumbass
}

public function fancyOpenURL(schmancy:String)
{
#if linux
Sys.command('/usr/bin/xdg-open', [schmancy, "&"]);
#else
FlxG.openURL(schmancy);
#end
}
}
2 changes: 1 addition & 1 deletion source/OutdatedSubState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class OutdatedSubState extends MusicBeatState
{
if (controls.ACCEPT)
{
FlxG.openURL("https://kadedev.github.io/Kade-Engine/changelogs/changelog-" + needVer);
fancyOpenURL("https://kadedev.github.io/Kade-Engine/changelogs/changelog-" + needVer);
}
if (controls.BACK)
{
Expand Down