Skip to content

Commit

Permalink
Added tooltip on BGM DLC names size exceeded
Browse files Browse the repository at this point in the history
  • Loading branch information
adriangl committed Feb 14, 2016
1 parent d3166bb commit e2585a6
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 28 deletions.
51 changes: 26 additions & 25 deletions DissDlcToolkit/Forms/MainFormBgmGenUserControl.Designer.cs

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

17 changes: 16 additions & 1 deletion DissDlcToolkit/Forms/MainFormBgmGenUserControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,15 @@ public partial class MainFormBgmGenUserControl : UserControl

private int currentBgmIndex;
private BindingList<FormBgmEntry> bgmFormEntries;
private ToolTip tooltip = new ToolTip();

public MainFormBgmGenUserControl()
{
InitializeComponent();
InitializeComponent();

// Prepare tooltip
tooltip.ToolTipIcon = ToolTipIcon.Warning;
tooltip.ToolTipTitle = "CAUTION";
}

private void button10_Click(object sender, EventArgs e)
Expand Down Expand Up @@ -414,12 +419,22 @@ private void bgmGenBgmTitleTextBox_TextChanged(object sender, EventArgs e)
{
// Warn the user about the text not displaying properly in PSP
bgmGenBgmTitleTextBox.BackColor = Color.LightGoldenrodYellow;
int x = 0;
int y = -36;
tooltip.Show("The text may not be displayed properly in the game!", bgmGenBgmTitleTextBox, x, y);
}
else
{
// Restore current box color
bgmGenBgmTitleTextBox.BackColor = SystemColors.Window;
tooltip.Hide(this);
}
}

private void bgmGenBgmTitleTextBox_Leave(object sender, EventArgs e)
{
// Dismiss tooltip
tooltip.Hide(this);
}
}
}
4 changes: 2 additions & 2 deletions DissDlcToolkit/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// Puede especificar todos los valores o establecer como predeterminados los números de compilación y de revisión
// mediante el carácter '*', como se muestra a continuación:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.1.1")]
[assembly: AssemblyFileVersion("1.1.1")]
[assembly: AssemblyVersion("1.1.2")]
[assembly: AssemblyFileVersion("1.1.2")]

0 comments on commit e2585a6

Please sign in to comment.