(10dd92c0a) Added Steam overlay support to workshop
This commit is contained in:
@@ -44,7 +44,6 @@ namespace Barotrauma
|
||||
|
||||
private ContentPackage itemContentPackage;
|
||||
private Facepunch.Steamworks.Workshop.Editor itemEditor;
|
||||
//private Facepunch.Steamworks.Overlay overlay;
|
||||
|
||||
public SteamWorkshopScreen()
|
||||
{
|
||||
@@ -132,7 +131,7 @@ namespace Barotrauma
|
||||
OutlineColor = new Color(72, 124, 77, 255),
|
||||
OnClicked = (btn, userdata) =>
|
||||
{
|
||||
System.Diagnostics.Process.Start("steam://url/SteamWorkshopPage/" + SteamManager.AppID);
|
||||
SteamManager.OverlayCustomURL("steam://url/SteamWorkshopPage/" + SteamManager.AppID);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -639,13 +638,7 @@ namespace Barotrauma
|
||||
OutlineColor = new Color(72, 124, 77, 255),
|
||||
OnClicked = (btn, userdata) =>
|
||||
{
|
||||
// Failed attempt, might have to be activated before accessing because as of now it just throws a null for overlay
|
||||
/*if (overlay.Enabled)
|
||||
{
|
||||
overlay.OpenUrl("steam://url/CommunityFilePage/" + item.Id);
|
||||
}*/
|
||||
|
||||
System.Diagnostics.Process.Start("steam://url/CommunityFilePage/" + item.Id);
|
||||
SteamManager.OverlayCustomURL("steam://url/CommunityFilePage/" + item.Id);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -66,6 +66,11 @@ namespace Barotrauma.Steam
|
||||
if (!USE_STEAM) return;
|
||||
instance = new SteamManager();
|
||||
}
|
||||
|
||||
public static void OverlayCustomURL(string url)
|
||||
{
|
||||
instance.client.Overlay.OpenUrl(url);
|
||||
}
|
||||
|
||||
public static bool UnlockAchievement(string achievementName)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user