- [GUI] Added ToolTip to display.
- [Core] Fix bug where some files would stuck in infinite loop.
This commit is contained in:
16
AssetStudio.GUI/ExportOptions.Designer.cs
generated
16
AssetStudio.GUI/ExportOptions.Designer.cs
generated
@@ -80,8 +80,7 @@ namespace AssetStudio.GUI
|
||||
castToBone = new CheckBox();
|
||||
exportAllNodes = new CheckBox();
|
||||
eulerFilter = new CheckBox();
|
||||
exportUvsTooltip = new ToolTip(components);
|
||||
keyToolTip = new ToolTip(components);
|
||||
toolTip = new ToolTip(components);
|
||||
groupBox1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)key).BeginInit();
|
||||
panel1.SuspendLayout();
|
||||
@@ -175,6 +174,7 @@ namespace AssetStudio.GUI
|
||||
texTypeComboBox.Size = new System.Drawing.Size(106, 23);
|
||||
texTypeComboBox.TabIndex = 35;
|
||||
texTypeComboBox.SelectedIndexChanged += TexTypeComboBox_SelectedIndexChanged;
|
||||
texTypeComboBox.MouseHover += TexTypeComboBox_MouseHover;
|
||||
//
|
||||
// uvTypesComboBox
|
||||
//
|
||||
@@ -208,6 +208,7 @@ namespace AssetStudio.GUI
|
||||
uvsComboBox.Size = new System.Drawing.Size(75, 23);
|
||||
uvsComboBox.TabIndex = 32;
|
||||
uvsComboBox.SelectedIndexChanged += uvsComboBox_SelectedIndexChanged;
|
||||
uvsComboBox.MouseHover += uvsComboBox_MouseHover;
|
||||
//
|
||||
// canExportCheckBox
|
||||
//
|
||||
@@ -251,6 +252,7 @@ namespace AssetStudio.GUI
|
||||
typesComboBox.Size = new System.Drawing.Size(127, 23);
|
||||
typesComboBox.TabIndex = 28;
|
||||
typesComboBox.SelectedIndexChanged += TypesComboBox_SelectedIndexChanged;
|
||||
typesComboBox.MouseHover += TypesComboBox_MouseHover;
|
||||
//
|
||||
// label6
|
||||
//
|
||||
@@ -328,7 +330,7 @@ namespace AssetStudio.GUI
|
||||
key.Name = "key";
|
||||
key.Size = new System.Drawing.Size(55, 23);
|
||||
key.TabIndex = 8;
|
||||
keyToolTip.SetToolTip(key, "Key in hex");
|
||||
key.MouseHover += Key_MouseHover;
|
||||
//
|
||||
// encrypted
|
||||
//
|
||||
@@ -649,6 +651,11 @@ namespace AssetStudio.GUI
|
||||
eulerFilter.Text = "EulerFilter";
|
||||
eulerFilter.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// typesToolTip
|
||||
//
|
||||
toolTip.UseAnimation = false;
|
||||
toolTip.UseFading = false;
|
||||
//
|
||||
// ExportOptions
|
||||
//
|
||||
AcceptButton = OKbutton;
|
||||
@@ -715,11 +722,9 @@ namespace AssetStudio.GUI
|
||||
private System.Windows.Forms.ComboBox assetGroupOptions;
|
||||
private System.Windows.Forms.CheckBox restoreExtensionName;
|
||||
private System.Windows.Forms.CheckBox openAfterExport;
|
||||
private System.Windows.Forms.ToolTip exportUvsTooltip;
|
||||
private System.Windows.Forms.CheckBox collectAnimations;
|
||||
private System.Windows.Forms.CheckBox encrypted;
|
||||
private System.Windows.Forms.NumericUpDown key;
|
||||
private System.Windows.Forms.ToolTip keyToolTip;
|
||||
private System.Windows.Forms.CheckBox minimalAssetMap;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private Label label6;
|
||||
@@ -733,5 +738,6 @@ namespace AssetStudio.GUI
|
||||
private Label label10;
|
||||
private ComboBox texTypeComboBox;
|
||||
private TextBox texNameTextBox;
|
||||
private ToolTip toolTip;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AssetStudio.GUI
|
||||
@@ -163,6 +164,48 @@ namespace AssetStudio.GUI
|
||||
}
|
||||
}
|
||||
|
||||
private void TypesComboBox_MouseHover(object sender, EventArgs e)
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
foreach (var type in types)
|
||||
{
|
||||
sb.Append($"{type.Key}: {(type.Value.Item1 ? '\x2713' : '\x2717')}, {(type.Value.Item2 ? '\x2713' : '\x2717')}\n");
|
||||
}
|
||||
|
||||
toolTip.ToolTipTitle = "Type options status:";
|
||||
toolTip.SetToolTip(typesComboBox, sb.ToString());
|
||||
}
|
||||
|
||||
private void uvsComboBox_MouseHover(object sender, EventArgs e)
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
foreach (var uv in uvs)
|
||||
{
|
||||
sb.Append($"{uv.Key}: {uvTypesComboBox.Items[uv.Value.Item2]}, {(uv.Value.Item1 ? '\x2713' : '\x2717')}\n");
|
||||
}
|
||||
|
||||
toolTip.ToolTipTitle = "UVs options status:";
|
||||
toolTip.SetToolTip(uvsComboBox, sb.ToString());
|
||||
}
|
||||
|
||||
private void TexTypeComboBox_MouseHover(object sender, EventArgs e)
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
foreach (var tex in texs)
|
||||
{
|
||||
sb.Append($"{texTypeComboBox.Items[tex.Key]}: {tex.Value}\n");
|
||||
}
|
||||
|
||||
toolTip.ToolTipTitle = "Texture options status:";
|
||||
toolTip.SetToolTip(texTypeComboBox, sb.ToString());
|
||||
}
|
||||
|
||||
private void Key_MouseHover(object sender, EventArgs e)
|
||||
{
|
||||
toolTip.ToolTipTitle = "Value";
|
||||
toolTip.SetToolTip(key, "Key in Hex");
|
||||
}
|
||||
|
||||
private void Cancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
|
||||
@@ -117,11 +117,14 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="exportUvsTooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="keyToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>162, 17</value>
|
||||
</metadata>
|
||||
<metadata name="exportUvsTooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
<metadata name="typesToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>272, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>57</value>
|
||||
|
||||
@@ -85,6 +85,10 @@ namespace AssetStudio
|
||||
{
|
||||
Offset = AbsolutePosition;
|
||||
yield return AbsolutePosition;
|
||||
if (Offset == AbsolutePosition)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user