From f8cf32e0a9c482967786b2375bc8557f6df22f03 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 26 Nov 2024 16:19:07 -0500 Subject: [PATCH] feat: MERCH link on main menu is now fetched via NG api --- source/funkin/ui/mainmenu/MainMenuState.hx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source/funkin/ui/mainmenu/MainMenuState.hx b/source/funkin/ui/mainmenu/MainMenuState.hx index 64552ce00..bc59de28f 100644 --- a/source/funkin/ui/mainmenu/MainMenuState.hx +++ b/source/funkin/ui/mainmenu/MainMenuState.hx @@ -239,7 +239,14 @@ class MainMenuState extends MusicBeatState function selectMerch() { - WindowUtil.openURL(Constants.URL_MERCH); + NG.core?.calls.loader.loadReferral(false) + .addComponentParameter("referral_name", "merch_link") + .addResponseHandler(response -> { + if (response.success) WindowUtil.openURL(response.result.data.url) + else + WindowUtil.openURL(Constants.URL_MERCH); + }) + .send(); } #end