Update tab indexes for things

This commit is contained in:
Tim Young 2017-09-20 14:38:30 -05:00
parent 59bea020b6
commit dcc9d92ca9
3 changed files with 36 additions and 26 deletions

View File

@ -154,6 +154,7 @@ namespace SpriteLibrary
public void OpenEditWindow(int FirstItemIndex=-1) public void OpenEditWindow(int FirstItemIndex=-1)
{ {
SpriteEntryForm SEF = new SpriteEntryForm(this, SpriteInfoList, SnapGridSize); SpriteEntryForm SEF = new SpriteEntryForm(this, SpriteInfoList, SnapGridSize);
SEF.SetInitialSprite(FirstItemIndex);
SEF.ShowDialog(); SEF.ShowDialog();
//Use the updated list returned from the form. //Use the updated list returned from the form.
SpriteInfoList.Clear(); SpriteInfoList.Clear();

View File

@ -102,7 +102,7 @@
this.cbStartingImage.Location = new System.Drawing.Point(128, 6); this.cbStartingImage.Location = new System.Drawing.Point(128, 6);
this.cbStartingImage.Name = "cbStartingImage"; this.cbStartingImage.Name = "cbStartingImage";
this.cbStartingImage.Size = new System.Drawing.Size(131, 24); this.cbStartingImage.Size = new System.Drawing.Size(131, 24);
this.cbStartingImage.TabIndex = 1; this.cbStartingImage.TabIndex = 5;
this.cbStartingImage.SelectedIndexChanged += new System.EventHandler(this.cbStartingImage_SelectedIndexChanged); this.cbStartingImage.SelectedIndexChanged += new System.EventHandler(this.cbStartingImage_SelectedIndexChanged);
// //
// lblStartingImage // lblStartingImage
@ -128,7 +128,7 @@
this.tbNumFrames.Location = new System.Drawing.Point(128, 53); this.tbNumFrames.Location = new System.Drawing.Point(128, 53);
this.tbNumFrames.Name = "tbNumFrames"; this.tbNumFrames.Name = "tbNumFrames";
this.tbNumFrames.Size = new System.Drawing.Size(47, 22); this.tbNumFrames.Size = new System.Drawing.Size(47, 22);
this.tbNumFrames.TabIndex = 4; this.tbNumFrames.TabIndex = 6;
// //
// lblFrames // lblFrames
// //
@ -144,7 +144,7 @@
this.tbSpriteName.Location = new System.Drawing.Point(356, 10); this.tbSpriteName.Location = new System.Drawing.Point(356, 10);
this.tbSpriteName.Name = "tbSpriteName"; this.tbSpriteName.Name = "tbSpriteName";
this.tbSpriteName.Size = new System.Drawing.Size(100, 22); this.tbSpriteName.Size = new System.Drawing.Size(100, 22);
this.tbSpriteName.TabIndex = 6; this.tbSpriteName.TabIndex = 1;
// //
// lblSpriteName // lblSpriteName
// //
@ -160,7 +160,7 @@
this.btnDone.Location = new System.Drawing.Point(528, 312); this.btnDone.Location = new System.Drawing.Point(528, 312);
this.btnDone.Name = "btnDone"; this.btnDone.Name = "btnDone";
this.btnDone.Size = new System.Drawing.Size(75, 23); this.btnDone.Size = new System.Drawing.Size(75, 23);
this.btnDone.TabIndex = 8; this.btnDone.TabIndex = 23;
this.btnDone.Text = "Done"; this.btnDone.Text = "Done";
this.btnDone.UseVisualStyleBackColor = true; this.btnDone.UseVisualStyleBackColor = true;
this.btnDone.Click += new System.EventHandler(this.btnDone_Click); this.btnDone.Click += new System.EventHandler(this.btnDone_Click);
@ -171,7 +171,7 @@
this.btnCancel.Location = new System.Drawing.Point(447, 312); this.btnCancel.Location = new System.Drawing.Point(447, 312);
this.btnCancel.Name = "btnCancel"; this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(75, 23); this.btnCancel.Size = new System.Drawing.Size(75, 23);
this.btnCancel.TabIndex = 9; this.btnCancel.TabIndex = 22;
this.btnCancel.Text = "Cancel"; this.btnCancel.Text = "Cancel";
this.btnCancel.UseVisualStyleBackColor = true; this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
@ -181,7 +181,7 @@
this.btnApply.Location = new System.Drawing.Point(252, 312); this.btnApply.Location = new System.Drawing.Point(252, 312);
this.btnApply.Name = "btnApply"; this.btnApply.Name = "btnApply";
this.btnApply.Size = new System.Drawing.Size(75, 23); this.btnApply.Size = new System.Drawing.Size(75, 23);
this.btnApply.TabIndex = 10; this.btnApply.TabIndex = 20;
this.btnApply.Text = "Apply"; this.btnApply.Text = "Apply";
this.btnApply.UseVisualStyleBackColor = true; this.btnApply.UseVisualStyleBackColor = true;
this.btnApply.Click += new System.EventHandler(this.btnApply_Click); this.btnApply.Click += new System.EventHandler(this.btnApply_Click);
@ -191,7 +191,7 @@
this.btnNewSprite.Location = new System.Drawing.Point(252, 280); this.btnNewSprite.Location = new System.Drawing.Point(252, 280);
this.btnNewSprite.Name = "btnNewSprite"; this.btnNewSprite.Name = "btnNewSprite";
this.btnNewSprite.Size = new System.Drawing.Size(92, 23); this.btnNewSprite.Size = new System.Drawing.Size(92, 23);
this.btnNewSprite.TabIndex = 11; this.btnNewSprite.TabIndex = 18;
this.btnNewSprite.Text = "New Sprite"; this.btnNewSprite.Text = "New Sprite";
this.btnNewSprite.UseVisualStyleBackColor = true; this.btnNewSprite.UseVisualStyleBackColor = true;
this.btnNewSprite.Click += new System.EventHandler(this.btnNewSprite_Click); this.btnNewSprite.Click += new System.EventHandler(this.btnNewSprite_Click);
@ -201,7 +201,7 @@
this.tbAmimationSpeed.Location = new System.Drawing.Point(356, 217); this.tbAmimationSpeed.Location = new System.Drawing.Point(356, 217);
this.tbAmimationSpeed.Name = "tbAmimationSpeed"; this.tbAmimationSpeed.Name = "tbAmimationSpeed";
this.tbAmimationSpeed.Size = new System.Drawing.Size(100, 22); this.tbAmimationSpeed.Size = new System.Drawing.Size(100, 22);
this.tbAmimationSpeed.TabIndex = 12; this.tbAmimationSpeed.TabIndex = 11;
// //
// lblAnimationSpeed // lblAnimationSpeed
// //
@ -226,7 +226,7 @@
this.tbDefaultSize.Location = new System.Drawing.Point(356, 246); this.tbDefaultSize.Location = new System.Drawing.Point(356, 246);
this.tbDefaultSize.Name = "tbDefaultSize"; this.tbDefaultSize.Name = "tbDefaultSize";
this.tbDefaultSize.Size = new System.Drawing.Size(100, 22); this.tbDefaultSize.Size = new System.Drawing.Size(100, 22);
this.tbDefaultSize.TabIndex = 15; this.tbDefaultSize.TabIndex = 12;
// //
// btnBack // btnBack
// //
@ -234,7 +234,7 @@
this.btnBack.Location = new System.Drawing.Point(12, 322); this.btnBack.Location = new System.Drawing.Point(12, 322);
this.btnBack.Name = "btnBack"; this.btnBack.Name = "btnBack";
this.btnBack.Size = new System.Drawing.Size(32, 23); this.btnBack.Size = new System.Drawing.Size(32, 23);
this.btnBack.TabIndex = 16; this.btnBack.TabIndex = 24;
this.btnBack.Text = "<"; this.btnBack.Text = "<";
this.btnBack.UseVisualStyleBackColor = true; this.btnBack.UseVisualStyleBackColor = true;
this.btnBack.Click += new System.EventHandler(this.btnBack_Click); this.btnBack.Click += new System.EventHandler(this.btnBack_Click);
@ -245,7 +245,7 @@
this.btnFwd.Location = new System.Drawing.Point(177, 322); this.btnFwd.Location = new System.Drawing.Point(177, 322);
this.btnFwd.Name = "btnFwd"; this.btnFwd.Name = "btnFwd";
this.btnFwd.Size = new System.Drawing.Size(32, 23); this.btnFwd.Size = new System.Drawing.Size(32, 23);
this.btnFwd.TabIndex = 17; this.btnFwd.TabIndex = 25;
this.btnFwd.Text = ">"; this.btnFwd.Text = ">";
this.btnFwd.UseVisualStyleBackColor = true; this.btnFwd.UseVisualStyleBackColor = true;
this.btnFwd.Click += new System.EventHandler(this.btnFwd_Click); this.btnFwd.Click += new System.EventHandler(this.btnFwd_Click);
@ -268,7 +268,7 @@
this.TCTabPages.Name = "TCTabPages"; this.TCTabPages.Name = "TCTabPages";
this.TCTabPages.SelectedIndex = 0; this.TCTabPages.SelectedIndex = 0;
this.TCTabPages.Size = new System.Drawing.Size(282, 143); this.TCTabPages.Size = new System.Drawing.Size(282, 143);
this.TCTabPages.TabIndex = 19; this.TCTabPages.TabIndex = 5;
// //
// tpFromImage // tpFromImage
// //
@ -307,7 +307,7 @@
this.cbMirrorH.Location = new System.Drawing.Point(35, 87); this.cbMirrorH.Location = new System.Drawing.Point(35, 87);
this.cbMirrorH.Name = "cbMirrorH"; this.cbMirrorH.Name = "cbMirrorH";
this.cbMirrorH.Size = new System.Drawing.Size(81, 21); this.cbMirrorH.Size = new System.Drawing.Size(81, 21);
this.cbMirrorH.TabIndex = 5; this.cbMirrorH.TabIndex = 9;
this.cbMirrorH.Text = "Mirror H"; this.cbMirrorH.Text = "Mirror H";
this.cbMirrorH.UseVisualStyleBackColor = true; this.cbMirrorH.UseVisualStyleBackColor = true;
// //
@ -317,7 +317,7 @@
this.cbMirrorV.Location = new System.Drawing.Point(148, 87); this.cbMirrorV.Location = new System.Drawing.Point(148, 87);
this.cbMirrorV.Name = "cbMirrorV"; this.cbMirrorV.Name = "cbMirrorV";
this.cbMirrorV.Size = new System.Drawing.Size(80, 21); this.cbMirrorV.Size = new System.Drawing.Size(80, 21);
this.cbMirrorV.TabIndex = 4; this.cbMirrorV.TabIndex = 10;
this.cbMirrorV.Text = "Mirror V"; this.cbMirrorV.Text = "Mirror V";
this.cbMirrorV.UseVisualStyleBackColor = true; this.cbMirrorV.UseVisualStyleBackColor = true;
// //
@ -335,7 +335,7 @@
this.tbRotation.Location = new System.Drawing.Point(128, 58); this.tbRotation.Location = new System.Drawing.Point(128, 58);
this.tbRotation.Name = "tbRotation"; this.tbRotation.Name = "tbRotation";
this.tbRotation.Size = new System.Drawing.Size(100, 22); this.tbRotation.Size = new System.Drawing.Size(100, 22);
this.tbRotation.TabIndex = 2; this.tbRotation.TabIndex = 8;
// //
// lblWhichAnim // lblWhichAnim
// //
@ -352,7 +352,7 @@
this.cbAnimation.Location = new System.Drawing.Point(128, 18); this.cbAnimation.Location = new System.Drawing.Point(128, 18);
this.cbAnimation.Name = "cbAnimation"; this.cbAnimation.Name = "cbAnimation";
this.cbAnimation.Size = new System.Drawing.Size(100, 24); this.cbAnimation.Size = new System.Drawing.Size(100, 24);
this.cbAnimation.TabIndex = 0; this.cbAnimation.TabIndex = 7;
// //
// lblAnimationNumber // lblAnimationNumber
// //
@ -378,7 +378,7 @@
this.btnAnimBack.Location = new System.Drawing.Point(5, 18); this.btnAnimBack.Location = new System.Drawing.Point(5, 18);
this.btnAnimBack.Name = "btnAnimBack"; this.btnAnimBack.Name = "btnAnimBack";
this.btnAnimBack.Size = new System.Drawing.Size(32, 23); this.btnAnimBack.Size = new System.Drawing.Size(32, 23);
this.btnAnimBack.TabIndex = 19; this.btnAnimBack.TabIndex = 16;
this.btnAnimBack.Text = "<"; this.btnAnimBack.Text = "<";
this.btnAnimBack.UseVisualStyleBackColor = true; this.btnAnimBack.UseVisualStyleBackColor = true;
this.btnAnimBack.Click += new System.EventHandler(this.btnAnimBack_Click); this.btnAnimBack.Click += new System.EventHandler(this.btnAnimBack_Click);
@ -389,7 +389,7 @@
this.btnAnimFwd.Location = new System.Drawing.Point(96, 18); this.btnAnimFwd.Location = new System.Drawing.Point(96, 18);
this.btnAnimFwd.Name = "btnAnimFwd"; this.btnAnimFwd.Name = "btnAnimFwd";
this.btnAnimFwd.Size = new System.Drawing.Size(32, 23); this.btnAnimFwd.Size = new System.Drawing.Size(32, 23);
this.btnAnimFwd.TabIndex = 18; this.btnAnimFwd.TabIndex = 17;
this.btnAnimFwd.Text = ">"; this.btnAnimFwd.Text = ">";
this.btnAnimFwd.UseVisualStyleBackColor = true; this.btnAnimFwd.UseVisualStyleBackColor = true;
this.btnAnimFwd.Click += new System.EventHandler(this.btnAnimFwd_Click); this.btnAnimFwd.Click += new System.EventHandler(this.btnAnimFwd_Click);
@ -410,7 +410,7 @@
this.rbMirror.Location = new System.Drawing.Point(197, 3); this.rbMirror.Location = new System.Drawing.Point(197, 3);
this.rbMirror.Name = "rbMirror"; this.rbMirror.Name = "rbMirror";
this.rbMirror.Size = new System.Drawing.Size(66, 21); this.rbMirror.Size = new System.Drawing.Size(66, 21);
this.rbMirror.TabIndex = 2; this.rbMirror.TabIndex = 4;
this.rbMirror.TabStop = true; this.rbMirror.TabStop = true;
this.rbMirror.Text = "Mirror"; this.rbMirror.Text = "Mirror";
this.rbMirror.UseVisualStyleBackColor = true; this.rbMirror.UseVisualStyleBackColor = true;
@ -421,7 +421,7 @@
this.rbRotation.Location = new System.Drawing.Point(120, 3); this.rbRotation.Location = new System.Drawing.Point(120, 3);
this.rbRotation.Name = "rbRotation"; this.rbRotation.Name = "rbRotation";
this.rbRotation.Size = new System.Drawing.Size(71, 21); this.rbRotation.Size = new System.Drawing.Size(71, 21);
this.rbRotation.TabIndex = 1; this.rbRotation.TabIndex = 3;
this.rbRotation.TabStop = true; this.rbRotation.TabStop = true;
this.rbRotation.Text = "Rotate"; this.rbRotation.Text = "Rotate";
this.rbRotation.UseVisualStyleBackColor = true; this.rbRotation.UseVisualStyleBackColor = true;
@ -432,7 +432,7 @@
this.rbFromImage.Location = new System.Drawing.Point(14, 3); this.rbFromImage.Location = new System.Drawing.Point(14, 3);
this.rbFromImage.Name = "rbFromImage"; this.rbFromImage.Name = "rbFromImage";
this.rbFromImage.Size = new System.Drawing.Size(103, 21); this.rbFromImage.Size = new System.Drawing.Size(103, 21);
this.rbFromImage.TabIndex = 0; this.rbFromImage.TabIndex = 2;
this.rbFromImage.TabStop = true; this.rbFromImage.TabStop = true;
this.rbFromImage.Text = "From Image"; this.rbFromImage.Text = "From Image";
this.rbFromImage.UseVisualStyleBackColor = true; this.rbFromImage.UseVisualStyleBackColor = true;
@ -461,7 +461,7 @@
this.btnPreview.Location = new System.Drawing.Point(518, 126); this.btnPreview.Location = new System.Drawing.Point(518, 126);
this.btnPreview.Name = "btnPreview"; this.btnPreview.Name = "btnPreview";
this.btnPreview.Size = new System.Drawing.Size(75, 23); this.btnPreview.Size = new System.Drawing.Size(75, 23);
this.btnPreview.TabIndex = 23; this.btnPreview.TabIndex = 13;
this.btnPreview.Text = "Preview"; this.btnPreview.Text = "Preview";
this.btnPreview.UseVisualStyleBackColor = true; this.btnPreview.UseVisualStyleBackColor = true;
this.btnPreview.Click += new System.EventHandler(this.btnPreview_Click); this.btnPreview.Click += new System.EventHandler(this.btnPreview_Click);
@ -471,7 +471,7 @@
this.btnReset.Location = new System.Drawing.Point(366, 312); this.btnReset.Location = new System.Drawing.Point(366, 312);
this.btnReset.Name = "btnReset"; this.btnReset.Name = "btnReset";
this.btnReset.Size = new System.Drawing.Size(75, 23); this.btnReset.Size = new System.Drawing.Size(75, 23);
this.btnReset.TabIndex = 24; this.btnReset.TabIndex = 21;
this.btnReset.Text = "Reset"; this.btnReset.Text = "Reset";
this.btnReset.UseVisualStyleBackColor = true; this.btnReset.UseVisualStyleBackColor = true;
this.btnReset.Click += new System.EventHandler(this.btnReset_Click); this.btnReset.Click += new System.EventHandler(this.btnReset_Click);
@ -482,7 +482,7 @@
this.btnPreviewAnimFwd.Location = new System.Drawing.Point(561, 155); this.btnPreviewAnimFwd.Location = new System.Drawing.Point(561, 155);
this.btnPreviewAnimFwd.Name = "btnPreviewAnimFwd"; this.btnPreviewAnimFwd.Name = "btnPreviewAnimFwd";
this.btnPreviewAnimFwd.Size = new System.Drawing.Size(32, 23); this.btnPreviewAnimFwd.Size = new System.Drawing.Size(32, 23);
this.btnPreviewAnimFwd.TabIndex = 25; this.btnPreviewAnimFwd.TabIndex = 15;
this.btnPreviewAnimFwd.Text = ">"; this.btnPreviewAnimFwd.Text = ">";
this.btnPreviewAnimFwd.UseVisualStyleBackColor = true; this.btnPreviewAnimFwd.UseVisualStyleBackColor = true;
this.btnPreviewAnimFwd.Click += new System.EventHandler(this.btnPreviewAnimFwd_Click); this.btnPreviewAnimFwd.Click += new System.EventHandler(this.btnPreviewAnimFwd_Click);
@ -493,7 +493,7 @@
this.btnPreviewAnimBack.Location = new System.Drawing.Point(518, 155); this.btnPreviewAnimBack.Location = new System.Drawing.Point(518, 155);
this.btnPreviewAnimBack.Name = "btnPreviewAnimBack"; this.btnPreviewAnimBack.Name = "btnPreviewAnimBack";
this.btnPreviewAnimBack.Size = new System.Drawing.Size(32, 23); this.btnPreviewAnimBack.Size = new System.Drawing.Size(32, 23);
this.btnPreviewAnimBack.TabIndex = 26; this.btnPreviewAnimBack.TabIndex = 14;
this.btnPreviewAnimBack.Text = "<"; this.btnPreviewAnimBack.Text = "<";
this.btnPreviewAnimBack.UseVisualStyleBackColor = true; this.btnPreviewAnimBack.UseVisualStyleBackColor = true;
this.btnPreviewAnimBack.Click += new System.EventHandler(this.btnPreviewAnimBack_Click); this.btnPreviewAnimBack.Click += new System.EventHandler(this.btnPreviewAnimBack_Click);
@ -528,7 +528,7 @@
this.btnDelSprite.Location = new System.Drawing.Point(356, 280); this.btnDelSprite.Location = new System.Drawing.Point(356, 280);
this.btnDelSprite.Name = "btnDelSprite"; this.btnDelSprite.Name = "btnDelSprite";
this.btnDelSprite.Size = new System.Drawing.Size(92, 23); this.btnDelSprite.Size = new System.Drawing.Size(92, 23);
this.btnDelSprite.TabIndex = 28; this.btnDelSprite.TabIndex = 19;
this.btnDelSprite.Text = "Del Sprite"; this.btnDelSprite.Text = "Del Sprite";
this.btnDelSprite.UseVisualStyleBackColor = true; this.btnDelSprite.UseVisualStyleBackColor = true;
this.btnDelSprite.Click += new System.EventHandler(this.btnDelSprite_Click); this.btnDelSprite.Click += new System.EventHandler(this.btnDelSprite_Click);

View File

@ -259,6 +259,15 @@ namespace SpriteLibrary
pbImageField.Invalidate(); pbImageField.Invalidate();
} }
internal void SetInitialSprite(int StartingSprite)
{
CurrentSIIndex = StartingSprite;
if (CurrentSIIndex >= SpriteInformation.Count)
CurrentSIIndex = SpriteInformation.Count - 1;
if (CurrentSIIndex < -1) CurrentSIIndex = -1;
WeHaveNewItem();
}
private void SetUpEmptyInfo() private void SetUpEmptyInfo()
{ {
string startingimage = cbStartingImage.Text; //grab whatever we were using last string startingimage = cbStartingImage.Text; //grab whatever we were using last