Skip to content

Commit

Permalink
New 'help text' label on opening form
Browse files Browse the repository at this point in the history
- New label to explain how some functions work.
- Minor changes to button text and visual behaviour.
  • Loading branch information
ForkandBeard committed May 10, 2017
1 parent 384e461 commit 8da1a3d
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 31 deletions.
15 changes: 9 additions & 6 deletions ASU/READ_ME.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
_/ _\ _| _| \___| _| \__,_| _____/ .__/ _| _| \__| \___| ____/ _| |_| \___| \___| \__| \___/ _| _| .__/ \__,_| \___| _|\_\ \___| _|
_| _|

Thanks for downloading 'Alferd Spritesheet Unpacker ver.11'.
Thanks for downloading 'Alferd Spritesheet Unpacker'.

++ For the latest version please visit: ++
https://github.com/ForkandBeard/Alferd-Spritesheet-Unpacker/releases
Expand All @@ -17,6 +17,13 @@ Thanks for downloading 'Alferd Spritesheet Unpacker ver.11'.

============================================================
=== Version History
============================================================

Future releases

** ASU is now Open Source and can be found on GitHub **
The newest version along with release notes can be found here: https://github.com/ForkandBeard/Alferd-Spritesheet-Unpacker/releases

============================================================
Version 11 - 06/06/2014

Expand Down Expand Up @@ -100,11 +107,7 @@ Version 1 - 17/08/2011
~ ~ ~
Hope you find the app useful
Mitchell William Cooper







*** Please read the following terms and conditions before using this application: ***********************************************************************************************************************************************
| |
Expand Down
49 changes: 33 additions & 16 deletions ASU/UI/MainForm.Designer.cs

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

42 changes: 33 additions & 9 deletions ASU/UI/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ private void MainPanel_DragDrop(object sender, System.Windows.Forms.DragEventArg
}
}
this.DragAndDropLabel.Visible = false;
this.ControlsHelpLabel.Visible = false;
}
this.StartUnpackers();
return;
Expand Down Expand Up @@ -559,7 +560,7 @@ private void MainPanel_MouseDown(object sender, System.Windows.Forms.MouseEventA
{
if (e.Button == System.Windows.Forms.MouseButtons.Right)
{
this.ClickModeCheckBoxButton.Checked = !this.ClickModeCheckBoxButton.Checked;
this.ToggleSelectSplitMode();
}

if (this.LoadingImage)
Expand All @@ -571,7 +572,7 @@ private void MainPanel_MouseDown(object sender, System.Windows.Forms.MouseEventA
{
this.HighlightRect = new Rectangle(e.Location.X - this.Offset.X, e.Location.Y - this.Offset.Y, 1, 1);
}
else if (!this.ClickModeCheckBoxButton.Checked)
else if (!this.SplitFrameCheckBoxButton.Checked)
{
if (this.Hover != Rectangle.Empty)
{
Expand Down Expand Up @@ -600,7 +601,7 @@ private void MainPanel_MouseDown(object sender, System.Windows.Forms.MouseEventA
this.Boxes.AddRange(this.Splits);
this.Splits.Clear();
SheetWithBoxes = null;
this.ClickModeCheckBoxButton.Checked = false;
this.SetClickMode(false);
return;
}
}
Expand Down Expand Up @@ -657,7 +658,7 @@ private void MainPanel_MouseMove(object sender, System.Windows.Forms.MouseEventA
{
if (box.Contains(location))
{
if (this.ClickModeCheckBoxButton.Checked)
if (this.SplitFrameCheckBoxButton.Checked)
{
this.MainPanel.Cursor = Cursors.Cross;
this.SplitBoxAtLocation(box, location);
Expand Down Expand Up @@ -1229,7 +1230,7 @@ private void ZoomPanel_Paint(object sender, System.Windows.Forms.PaintEventArgs
{
try
{
if (!this.ClickModeCheckBoxButton.Checked)
if (!this.SplitFrameCheckBoxButton.Checked)
{
e.Graphics.DrawLine(ZoomPen, 0, (this.ZoomPanel.ClientRectangle.Height / 2f) + 2, this.ZoomPanel.ClientRectangle.Width, (this.ZoomPanel.ClientRectangle.Height / 2f) + 2);
e.Graphics.DrawLine(ZoomPen, (this.ZoomPanel.ClientRectangle.Width / 2f) + 2, 0, (this.ZoomPanel.ClientRectangle.Width / 2f) + 2, this.ZoomPanel.ClientRectangle.Height);
Expand Down Expand Up @@ -1322,6 +1323,7 @@ private void PasteButton_Click(System.Object sender, System.EventArgs e)
{
this.unpackers.Clear();
this.DragAndDropLabel.Visible = false;
this.ControlsHelpLabel.Visible = false;
this.CreateUnpacker(new Bitmap(Clipboard.GetImage()), "clipboard");
this.StartUnpackers();
}
Expand Down Expand Up @@ -1399,6 +1401,7 @@ private void ResetFormPostUnpack(BO.ImageUnpacker unpacker)
if (this.unpackers.Count > 1 || this.unpackers.Count == 0)
{
this.DragAndDropLabel.Visible = true;
this.ControlsHelpLabel.Visible = true;
this.MainPanel.BackColor = Color.FromArgb(224, 224, 224);
this.SetOverlayText(new List<string>(), new List<string>());
}
Expand Down Expand Up @@ -1584,16 +1587,37 @@ protected override bool ProcessCmdKey(ref System.Windows.Forms.Message msg, Syst
}
#endregion

private void ClickModeCheckBoxButton_CheckedChanged(System.Object sender, System.EventArgs e)
private void SetClickMode(bool isSplit)
{
if (this.ClickModeCheckBoxButton.Checked)
if (this.SplitFrameCheckBoxButton.Checked != isSplit)
{
this.ClickModeCheckBoxButton.Image = global::ASU.Properties.Resources.cut;
this.ToggleSelectSplitMode();
}
}

private void ToggleSelectSplitMode()
{
this.SplitFrameCheckBoxButton.Checked = !this.SplitFrameCheckBoxButton.Checked;
this.SetCurrentSelectSplitModeTextAndIcon();
}

private void SetCurrentSelectSplitModeTextAndIcon()
{
if (this.SplitFrameCheckBoxButton.Checked)
{
this.SplitFrameCheckBoxButton.Image = global::ASU.Properties.Resources.cursor;
this.SplitFrameCheckBoxButton.Text = "Select";
}
else
{
this.ClickModeCheckBoxButton.Image = global::ASU.Properties.Resources.cursor;
this.SplitFrameCheckBoxButton.Image = global::ASU.Properties.Resources.cut;
this.SplitFrameCheckBoxButton.Text = "Split";
}
}

private void ClickModeCheckBoxButton_CheckedChanged(System.Object sender, System.EventArgs e)
{
this.SetCurrentSelectSplitModeTextAndIcon();
}
}
}

0 comments on commit 8da1a3d

Please sign in to comment.