diff --git a/M2TWEOP Code/M2TWEOP GUI/dataG.h b/M2TWEOP Code/M2TWEOP GUI/dataG.h index 1756cd4a..029b11b0 100644 --- a/M2TWEOP Code/M2TWEOP GUI/dataG.h +++ b/M2TWEOP Code/M2TWEOP GUI/dataG.h @@ -42,6 +42,8 @@ class dataG // Discord Rich Presence bool isDiscordRichPresenceEnabled = true; + string discordServerLink = ""; + string websiteLink = ""; // Customization Options string modTitle = ""; diff --git a/M2TWEOP Code/M2TWEOP GUI/mainUI.cpp b/M2TWEOP Code/M2TWEOP GUI/mainUI.cpp index 458a00fc..8db5ec6b 100644 --- a/M2TWEOP Code/M2TWEOP GUI/mainUI.cpp +++ b/M2TWEOP Code/M2TWEOP GUI/mainUI.cpp @@ -159,11 +159,11 @@ namespace mainUI } if (ImGui::Button("Website", helpers::getScreen().centerXButton)) { - ShellExecuteA(NULL, "open", "https://youneuoy.github.io/M2TWEOP-library/ ", NULL, NULL, SW_SHOWNORMAL); + ShellExecuteA(NULL, "open", dataG::data.gameData.websiteLink, NULL, NULL, SW_SHOWNORMAL); } if (ImGui::Button("Discord", helpers::getScreen().centerXButton)) { - ShellExecuteA(NULL, "open", "https://discord.gg/Epqjm8u2WK", NULL, NULL, SW_SHOWNORMAL); + ShellExecuteA(NULL, "open", dataG::data.gameData.discordServerLink;, NULL, NULL, SW_SHOWNORMAL); } ImGui::End(); diff --git a/M2TWEOP Code/M2TWEOP GUI/managerG.cpp b/M2TWEOP Code/M2TWEOP GUI/managerG.cpp index a5e8d463..ab8aed3e 100644 --- a/M2TWEOP Code/M2TWEOP GUI/managerG.cpp +++ b/M2TWEOP Code/M2TWEOP GUI/managerG.cpp @@ -156,6 +156,14 @@ namespace managerG { getJson(dataG::data.gameData.modTitle, "modTitle"); } + if (json.contains("discordServerLink")) + { + getJson(dataG::data.gameData.discordServerLink, "discordServerLink"); + } + if (json.contains("websiteLink")) + { + getJson(dataG::data.gameData.websiteLink, "websiteLink"); + } if (json.contains("modVersion")) { getJson(dataG::data.gameData.modVersion, "modVersion"); @@ -245,6 +253,8 @@ namespace managerG setJson("hideLauncher", dataG::data.modData.hideLauncherAtStart); setJson("playBackgroundMusic", dataG::data.audio.bkgMusic.isMusicNeeded); setJson("musicVolume", dataG::data.audio.bkgMusic.musicVolume); + setJson("websiteLink", dataG::data.gameData.websiteLink); + setJson("discordServerLink", dataG::data.gameData.discordServerLink); setJson("modTitle", dataG::data.gameData.modTitle); setJson("modVersion", dataG::data.gameData.modVersion); setJson("runButtonColor", dataG::data.gameData.buttonColorString); diff --git a/M2TWEOP DataFiles/eopData/config/uiCfg.json b/M2TWEOP DataFiles/eopData/config/uiCfg.json index bef7d28a..66bb53c6 100644 --- a/M2TWEOP DataFiles/eopData/config/uiCfg.json +++ b/M2TWEOP DataFiles/eopData/config/uiCfg.json @@ -9,5 +9,7 @@ "runButtonColor": "201, 169, 64, 150", "runButtonHoverColor": "201, 169, 64, 250", "launcherTheme": "default", - "modVersion": "" + "modVersion": "", + "discordServerLink": "https://discord.gg/Epqjm8u2WK", + "websiteLink": "https://youneuoy.github.io/M2TWEOP-library/" } \ No newline at end of file