Skip to content

Commit

Permalink
Add/improve UI tooltips
Browse files Browse the repository at this point in the history
  • Loading branch information
ManlyMarco committed Dec 11, 2023
1 parent 3e26d16 commit 0d5c55d
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 6 deletions.
8 changes: 6 additions & 2 deletions src/KKManager.Core/Functions/InstallDirectoryHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ public static DirectoryInfo TempDir
private set => _tempPath = value;
}

public static string ScreenshotDir => Path.Combine(GameDirectory.FullName, "UserData\\cap");
public static string CardDir => Path.Combine(GameDirectory.FullName, "UserData\\chara");
public static string SceneDir => Path.Combine(GameDirectory.FullName, "UserData\\Studio\\scene");

public static GameType GameType { get; private set; } = GameType.Unknown;

public static void Initialize(DirectoryInfo gameDirectory)
Expand Down Expand Up @@ -137,7 +141,7 @@ public static bool IsValidGamePath(string path)
// File.Exists(Path.Combine(path, "CharaStudio.exe"));

var anyDatas = Directory.GetDirectories(path)
.Any(x => x.EndsWith("_Data", StringComparison.OrdinalIgnoreCase));
.Any(x => x.EndsWith("_Data", StringComparison.OrdinalIgnoreCase));
var abdataExist = File.Exists(Path.Combine(path, "abdata/abdata"));

// todo use this to offer to install bepinex and other mods / run update wizzard
Expand Down Expand Up @@ -170,7 +174,7 @@ public static string GetFancyGameName(this GameType gameType)
default: throw new ArgumentOutOfRangeException(nameof(gameType), gameType, null);
}
}

/// <summary>
/// Figure out where the log file is written to and open it.
/// </summary>
Expand Down
11 changes: 11 additions & 0 deletions src/KKManager/Windows/MainWindow.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 10 additions & 4 deletions src/KKManager/Windows/MainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public sealed partial class MainWindow : Form
{
private UpdateSourceBase[] _updateSources;
public UpdateSourceBase[] GetUpdateSources() => _updateSources ?? (_updateSources = UpdateSourceManager.FindUpdateSources(Program.ProgramLocation));

public MainWindow()
{
Icon = Icon.ExtractAssociatedIcon(Assembly.GetExecutingAssembly().Location);
Expand All @@ -49,6 +49,12 @@ public MainWindow()

InstallDirectoryHelper.Initialize(GetGameDirectory());

installDirectoryToolStripMenuItem.ToolTipText = InstallDirectoryHelper.GameDirectory.FullName;
screenshotsToolStripMenuItem.ToolTipText = InstallDirectoryHelper.ScreenshotDir;
charactersToolStripMenuItem.ToolTipText = InstallDirectoryHelper.CardDir;
scenesToolStripMenuItem.ToolTipText = InstallDirectoryHelper.SceneDir;
kKManagerToolStripMenuItem.ToolTipText = Program.ProgramLocation;

SetupTabs();

Task.Run(PopulateStartMenu);
Expand Down Expand Up @@ -471,17 +477,17 @@ private void installDirectoryToolStripMenuItem_Click(object sender, EventArgs e)

private void screenshotsToolStripMenuItem_Click(object sender, EventArgs e)
{
ProcessTools.SafeStartProcess(Path.Combine(InstallDirectoryHelper.GameDirectory.FullName, "UserData\\cap"));
ProcessTools.SafeStartProcess(InstallDirectoryHelper.ScreenshotDir);
}

private void charactersToolStripMenuItem_Click(object sender, EventArgs e)
{
ProcessTools.SafeStartProcess(Path.Combine(InstallDirectoryHelper.GameDirectory.FullName, "UserData\\chara"));
ProcessTools.SafeStartProcess(InstallDirectoryHelper.CardDir);
}

private void scenesToolStripMenuItem_Click(object sender, EventArgs e)
{
ProcessTools.SafeStartProcess(Path.Combine(InstallDirectoryHelper.GameDirectory.FullName, "UserData\\Studio\\scene"));
ProcessTools.SafeStartProcess(InstallDirectoryHelper.SceneDir);
}

private void kKManagerToolStripMenuItem_Click(object sender, EventArgs e)
Expand Down
39 changes: 39 additions & 0 deletions src/KKManager/Windows/MainWindow.resx
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@
<data name="changeGameInstallDirectoryToolStripMenuItem.Text" xml:space="preserve">
<value>Select game directory...</value>
</data>
<data name="changeGameInstallDirectoryToolStripMenuItem.ToolTipText" xml:space="preserve">
<value>Point KKManager to a different game install.</value>
</data>
<data name="toolStripSeparator5.Size" type="System.Drawing.Size, System.Drawing">
<value>194, 6</value>
</data>
Expand Down Expand Up @@ -259,6 +262,10 @@
<data name="installANewModToolStripMenuItem.Text" xml:space="preserve">
<value>Install a new mod...</value>
</data>
<data name="installANewModToolStripMenuItem.ToolTipText" xml:space="preserve">
<value>Attempt to install a plugin or a zipmod.
For plugins, patchers and especially non-zipmod mods it's recommended to follow the installation steps provided by the author instead.</value>
</data>
<data name="lookForModUpdatesToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>318, 22</value>
</data>
Expand All @@ -271,6 +278,9 @@
<data name="openIndividualDownloadWebsiteToolStripMenuItem.Text" xml:space="preserve">
<value>Open the single-mod-download website</value>
</data>
<data name="openIndividualDownloadWebsiteToolStripMenuItem.ToolTipText" xml:space="preserve">
<value>You can download zipmods individually here instead of updating the whole modpack.</value>
</data>
<data name="toolStripSeparator6.Size" type="System.Drawing.Size, System.Drawing">
<value>315, 6</value>
</data>
Expand All @@ -280,6 +290,9 @@
<data name="checkForUpdatesOnStartupToolStripMenuItem.Text" xml:space="preserve">
<value>Check for mod updates on startup</value>
</data>
<data name="checkForUpdatesOnStartupToolStripMenuItem.ToolTipText" xml:space="preserve">
<value>The Mod updater menu button will turn green if there is an update available.</value>
</data>
<data name="useSystemProxyServerToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>318, 22</value>
</data>
Expand All @@ -292,6 +305,9 @@
<data name="p2PDownloaderSettingsToolStripMenuItem.Text" xml:space="preserve">
<value>P2P update transfer settings...</value>
</data>
<data name="p2PDownloaderSettingsToolStripMenuItem.ToolTipText" xml:space="preserve">
<value>Note: FTP connections are still required even with P2P enabled.</value>
</data>
<data name="updateSideloaderModpackToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>88, 20</value>
</data>
Expand All @@ -304,18 +320,29 @@
<data name="fixFileAndFolderPermissionsToolStripMenuItem.Text" xml:space="preserve">
<value>Fix file and folder permissions</value>
</data>
<data name="fixFileAndFolderPermissionsToolStripMenuItem.ToolTipText" xml:space="preserve">
<value>This will attempt to fix any file or folder permission issues in the game directory.
Make sure that no other applications are using anything inside the game directory before uisng, otherwise a PC restart might be required to be able to access some of the files again.</value>
</data>
<data name="compressGameFilesToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>231, 22</value>
</data>
<data name="compressGameFilesToolStripMenuItem.Text" xml:space="preserve">
<value>Compress game files</value>
</data>
<data name="compressGameFilesToolStripMenuItem.ToolTipText" xml:space="preserve">
<value>Reduce the size of the game by recompressing its asset bundles with a higher compression level.
Generally safe but might cause issues in rare cases, especially with newer games like RG or HC. If in doubt, back up the abdata and *_Data folders.</value>
</data>
<data name="cleanUpDuplicateZipmodsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>231, 22</value>
</data>
<data name="cleanUpDuplicateZipmodsToolStripMenuItem.Text" xml:space="preserve">
<value>Clean up duplicate zipmods</value>
</data>
<data name="cleanUpDuplicateZipmodsToolStripMenuItem.ToolTipText" xml:space="preserve">
<value>Attempt to automatically clean up zipmods with the same GUIDs so that only the latest versions are left.</value>
</data>
<data name="toolStripSeparator3.Size" type="System.Drawing.Size, System.Drawing">
<value>228, 6</value>
</data>
Expand Down Expand Up @@ -361,6 +388,9 @@
<data name="languagesToolStripMenuItem.Text" xml:space="preserve">
<value>Language</value>
</data>
<data name="languagesToolStripMenuItem.ToolTipText" xml:space="preserve">
<value>To fully change the language KKManager needs to be restarted.</value>
</data>
<data name="tryToDeleteToRecycleBinToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>215, 22</value>
</data>
Expand Down Expand Up @@ -506,6 +536,9 @@ If this fails for whatever reason (e.g. recycle bin is full or disabled) the fil
<data name="&gt;&gt;statusStrip1.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>247, 17</value>
</metadata>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
Expand Down Expand Up @@ -2496,6 +2529,12 @@ If this fails for whatever reason (e.g. recycle bin is full or disabled) the fil
<data name="&gt;&gt;toolStripStatusLabelStatus.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;toolTip1.Name" xml:space="preserve">
<value>toolTip1</value>
</data>
<data name="&gt;&gt;toolTip1.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolTip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>MainWindow</value>
</data>
Expand Down

0 comments on commit 0d5c55d

Please sign in to comment.