Add column name tooltip to column headers in TAStudio

- closes 
This commit is contained in:
Morilli 2024-06-27 02:45:06 +02:00
parent 2860a0189c
commit 12981dc6df
5 changed files with 16 additions and 1 deletions
src/BizHawk.Client.EmuHawk

View File

@ -1604,7 +1604,7 @@ namespace BizHawk.Client.EmuHawk
PointedCellChanged(this, new CellEventArgs(_lastCell, CurrentCell));
}
if (CurrentCell?.Column != null && CurrentCell.RowIndex.HasValue)
if (CurrentCell?.Column is not null)
{
_hoverTimer.Start();
}

View File

@ -193,6 +193,7 @@ namespace BizHawk.Client.EmuHawk
this.BookMarkControl = new BizHawk.Client.EmuHawk.BookmarksBranchesBox();
this.BranchesMarkersSplit = new System.Windows.Forms.SplitContainer();
this.MainVertialSplit = new System.Windows.Forms.SplitContainer();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.TASMenu.SuspendLayout();
this.TasStatusStrip.SuspendLayout();
this.RightClickMenu.SuspendLayout();
@ -1385,5 +1386,6 @@ namespace BizHawk.Client.EmuHawk
private BizHawk.WinForms.Controls.ToolStripMenuItemEx LoadBranchOnDoubleclickMenuItem;
private BizHawk.WinForms.Controls.ToolStripMenuItemEx SetFontMenuItem;
private BizHawk.WinForms.Controls.ToolStripMenuItemEx CopyIncludesFrameNoMenuItem;
private System.Windows.Forms.ToolTip toolTip1;
}
}

View File

@ -936,6 +936,8 @@ namespace BizHawk.Client.EmuHawk
private void TasView_PointedCellChanged(object sender, InputRoll.CellEventArgs e)
{
toolTip1.SetToolTip(TasView, null);
if (e.NewCell.RowIndex is null)
{
return;

View File

@ -153,6 +153,13 @@ namespace BizHawk.Client.EmuHawk
BookMarkControl.SavedCallback = BranchSaved;
BookMarkControl.RemovedCallback = BranchRemoved;
TasView.MouseLeave += TAStudio_MouseLeave;
TasView.CellHovered += (_, e) =>
{
if (e.NewCell.RowIndex is null)
{
toolTip1.Show(e.NewCell.Column!.Name, TasView, PointToClient(Cursor.Position));
}
};
}
private void Tastudio_Load(object sender, EventArgs e)
@ -1146,6 +1153,7 @@ namespace BizHawk.Client.EmuHawk
private void TAStudio_MouseLeave(object sender, EventArgs e)
{
toolTip1.SetToolTip(TasView, null);
DoTriggeredAutoRestoreIfNeeded();
}

View File

@ -126,4 +126,7 @@
<metadata name="RightClickMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>249, 17</value>
</metadata>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>388, 17</value>
</metadata>
</root>