From 0ea8b4bb96cf0ac9fa3db9eb42521568ead712fc Mon Sep 17 00:00:00 2001 From: Tater Date: Sat, 7 Dec 2024 17:34:53 -0600 Subject: [PATCH] Replace open_link with ViewLink --- src/game/client/components/tclient/menus_tclient.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/game/client/components/tclient/menus_tclient.cpp b/src/game/client/components/tclient/menus_tclient.cpp index ba9dcee42d1..5dd61ef640f 100644 --- a/src/game/client/components/tclient/menus_tclient.cpp +++ b/src/game/client/components/tclient/menus_tclient.cpp @@ -40,7 +40,7 @@ void CMenus::OpenTClientDiscord() { - if(!open_link("https://discord.gg/fBvhH93Bt6")) + if(!Client()->ViewLink("https://discord.gg/fBvhH93Bt6")) PopupWarning(Localize("Open TClient Discord"), Localize("Failed to open the TClient Discord in your browser"), Localize("Aww"), std::chrono::nanoseconds(0)); } @@ -307,7 +307,7 @@ void CMenus::RenderSettingsTClient(CUIRect MainView) static CButtonContainer s_VerifyButton; if(DoButton_Menu(&s_VerifyButton, Localize("Manual Verify"), 0, &ButtonVerify, 0, IGraphics::CORNER_ALL)) { - if(!open_link("https://ger10.ddnet.org/")) + if(!Client()->ViewLink("https://ger10.ddnet.org/")) dbg_msg("menus", "couldn't open link"); } Column.HSplitTop(MarginExtraSmall, nullptr, &Column); @@ -1226,10 +1226,7 @@ void CMenus::RenderSettingsProfiles(CUIRect MainView) if(DoButton_Menu(&s_ProfilesFile, Localize("Profiles file"), 0, &FileButton)) { Storage()->GetCompletePath(IStorage::TYPE_SAVE, PROFILES_FILE, aTempBuf, sizeof(aTempBuf)); - if(!open_file(aTempBuf)) - { - dbg_msg("menus", "couldn't open file"); - } + Client()->ViewFile(aTempBuf); } }