Merge pull request #774 from FunkinCrew/abnormalpoof/opening-urls

[PUBLIC PR] Fix Merch button being missing from the main menu
This commit is contained in:
Cameron Taylor 2024-09-19 22:31:44 -04:00 committed by GitHub
commit 00c1428c0f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View file

@ -123,7 +123,7 @@ class MainMenuState extends MusicBeatState
}));
});
#if CAN_OPEN_LINKS
#if FEATURE_OPEN_URL
// In order to prevent popup blockers from triggering,
// we need to open the link as an immediate result of a keypress event,
// so we can't wait for the flicker animation to complete.
@ -234,7 +234,7 @@ class MainMenuState extends MusicBeatState
camFollow.setPosition(selected.getGraphicMidpoint().x, selected.getGraphicMidpoint().y);
}
#if CAN_OPEN_LINKS
#if FEATURE_OPEN_URL
function selectDonate()
{
WindowUtil.openURL(Constants.URL_ITCH);

View file

@ -22,7 +22,7 @@ class WindowUtil
*/
public static function openURL(targetUrl:String):Void
{
#if CAN_OPEN_LINKS
#if FEATURE_OPEN_URL
#if linux
Sys.command('/usr/bin/xdg-open $targetUrl &');
#else
@ -40,7 +40,7 @@ class WindowUtil
*/
public static function openFolder(targetPath:String):Void
{
#if CAN_OPEN_LINKS
#if FEATURE_OPEN_URL
#if windows
Sys.command('explorer', [targetPath.replace('/', '\\')]);
#elseif mac
@ -59,7 +59,7 @@ class WindowUtil
*/
public static function openSelectFile(targetPath:String):Void
{
#if CAN_OPEN_LINKS
#if FEATURE_OPEN_URL
#if windows
Sys.command('explorer', ['/select,' + targetPath.replace('/', '\\')]);
#elseif mac