// Base plugin for GfxEd8
// Copyright (C) 2004 Ian Cowburn
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id$
//
using System;
using System.Windows.Forms;
using System.IO;
using GfxEdInterface;
namespace GfxEdBasePlugin
{
///
/// Description of SpecConfigForm.
///
public class SpecConfigForm : System.Windows.Forms.Form, IConfig
{
private System.Windows.Forms.Label label1;
private System.Windows.Forms.CheckBox m_mask;
private System.Windows.Forms.CheckBox m_shift;
private System.Windows.Forms.Button m_ok;
public SpecConfigForm()
{
//
// The InitializeComponent() call is required for Windows Forms designer support.
//
InitializeComponent();
}
public bool Mask
{
get {return m_mask.Checked;}
set {m_mask.Checked=value;}
}
public bool Shift
{
get {return m_shift.Checked;}
set {m_shift.Checked=value;}
}
public void Settings(Form parent)
{
ShowDialog(parent);
}
public void Output(TextWriter stream)
{
stream.WriteLine(Mask.ToString());
stream.WriteLine(Shift.ToString());
}
public void Input(TextReader stream)
{
Mask=Boolean.Parse(stream.ReadLine());
Shift=Boolean.Parse(stream.ReadLine());
}
#region Windows Forms Designer generated code
///
/// This method is required for Windows Forms designer support.
/// Do not change the method contents inside the source code editor. The Forms designer might
/// not be able to load this method if it was changed manually.
///
private void InitializeComponent() {
this.m_ok = new System.Windows.Forms.Button();
this.m_shift = new System.Windows.Forms.CheckBox();
this.m_mask = new System.Windows.Forms.CheckBox();
this.label1 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// m_ok
//
this.m_ok.Location = new System.Drawing.Point(136, 112);
this.m_ok.Name = "m_ok";
this.m_ok.Size = new System.Drawing.Size(88, 24);
this.m_ok.TabIndex = 0;
this.m_ok.Text = "OK";
this.m_ok.Click += new System.EventHandler(this.OnOK);
//
// m_shift
//
this.m_shift.Location = new System.Drawing.Point(9, 32);
this.m_shift.Name = "m_shift";
this.m_shift.Size = new System.Drawing.Size(136, 24);
this.m_shift.TabIndex = 2;
this.m_shift.Text = "Pre-shifted Sprites";
//
// m_mask
//
this.m_mask.Location = new System.Drawing.Point(8, 8);
this.m_mask.Name = "m_mask";
this.m_mask.Size = new System.Drawing.Size(136, 24);
this.m_mask.TabIndex = 1;
this.m_mask.Text = "Generate Mask Data";
//
// label1
//
this.label1.Location = new System.Drawing.Point(8, 56);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(224, 48);
this.label1.TabIndex = 3;
this.label1.Text = "Note that pre-shifted sprites assume that each 8 sprites make up a single sprite " +
"to pre-shift";
//
// SpecConfigForm
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(234, 143);
this.ControlBox = false;
this.Controls.Add(this.label1);
this.Controls.Add(this.m_shift);
this.Controls.Add(this.m_mask);
this.Controls.Add(this.m_ok);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "SpecConfigForm";
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Configuration";
this.ResumeLayout(false);
}
#endregion
void OnOK(object sender, System.EventArgs e)
{
Close();
}
}
}