Skip to content

Commit

Permalink
Update webBrowser element in welcome form.
Browse files Browse the repository at this point in the history
  • Loading branch information
0matyesz0 committed Feb 27, 2023
1 parent d7abb2c commit d8e653a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
3 changes: 2 additions & 1 deletion WolvenKit/Forms/MVVM/frmMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2236,7 +2236,8 @@ private void SetupUnbundling()
return;

// check path length
if (MainController.Get().Configuration.DepotPath.Length > 38)
//if (MainController.Get().Configuration.DepotPath.Length > 38)
if (MainController.Get().Configuration.DepotPath.Length > 255)
{
MainController.LogString("Wcc probably does not support path lengths > 255. " +
"Please move your wcc_lite Modkit directory closer to root, e.g. C:\\Modkit\\.", Common.Services.Logtype.Error);
Expand Down
15 changes: 12 additions & 3 deletions WolvenKit/Forms/frmWelcome.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BrightIdeasSoftware;
using BrightIdeasSoftware;
using System;
using System.Collections.Generic;
using System.ComponentModel;
Expand Down Expand Up @@ -107,10 +107,11 @@ private void PopulateRecentFileList()
</style>
</head>
<body>
<li><a href = ${"\"https://www.nexusmods.com/witcher3/mods/3161\""}> Features and Guidelines </a></li>
<li><a href = ${"\"https://github.com/Traderain/Wolven-kit/wiki\""}> WolvenKit Wiki </a></li>
<li><a href = ${"\"https://github.com/WolvenKit/WolvenKit-7\""}> GitHub Repository </a></li>
<li><a href = ${"\"https://www.youtube.com/watch?v=jUoamicYtjk\""}> Package creation </a></li>
<li><a href = ${"\"https://www.youtube.com/watch?v=jUoamicYtjk\""}> Sound modding </a></li>
<li><a href = ${"\"https://youtu.be/0Ef-HkEhdv8\""}> Sound modding </a></li>
</body>
</html>
";
Expand Down Expand Up @@ -149,17 +150,25 @@ protected void ApplyCustomTheme()
wolvenKitLbl.ForeColor = UIController.GetForeColor();

helpWebBrowser.DocumentText = DocumentText;
helpWebBrowser.Navigating += HelpWebBrowser_Navigating;
}


public const int WM_NCLBUTTONDOWN = 0xA1;
public const int HT_CAPTION = 0x2;

[System.Runtime.InteropServices.DllImport("user32.dll")]
public static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam);
[System.Runtime.InteropServices.DllImport("user32.dll")]
public static extern bool ReleaseCapture();

// UI Events //

private void HelpWebBrowser_Navigating(object sender, WebBrowserNavigatingEventArgs e)
{
e.Cancel = true;
Process.Start(e.Url.ToString());
}

private void mainMenuStrip_MouseDown(object sender, MouseEventArgs e)
{
Expand Down

0 comments on commit d8e653a

Please sign in to comment.