コード例 #1
0
ファイル: SpritesetForm.cs プロジェクト: nnn1590/spritely
        public SpritesetForm(ProjectMainForm parent, Spriteset ss)
        {
            m_parent = parent;
            m_ss     = ss;

            InitializeComponent();

            MdiParent       = parent;
            FormBorderStyle = FormBorderStyle.FixedToolWindow;
            StartPosition   = FormStartPosition.Manual;
            Visible         = false;
            ControlBox      = false;

            if (m_ss.IsBackground)
            {
                Text = "Tileset '" + ss.Name + "'";
            }
            else
            {
                Text = "Spriteset '" + ss.Name + "'";
            }

            cbPalette.Items.Add(ss.Palette.Name);
            cbPalette.SelectedIndex = 0;
        }
コード例 #2
0
ファイル: MapForm.cs プロジェクト: nnn1590/spritely
        public MapForm(ProjectMainForm parent, Map m, Spriteset ss, Sprite s)
        {
            m_parent = parent;

            m_ss = ss;

            InitializeComponent();

            SetMap(m);
            m_toolbox   = new Toolbox_Map();
            m_optionbox = new Optionbox_Map();

            MdiParent       = parent;
            FormBorderStyle = FormBorderStyle.SizableToolWindow;
            StartPosition   = FormStartPosition.Manual;
            Visible         = false;
            ControlBox      = false;

            // Set to 16x.
            cbZoom.SelectedIndex = (int)ZoomLevel.Zoom_16x;
            cbZoom.Enabled       = false;

            m_tileSpriteX = -1;
            m_tileSpriteY = -1;
        }
コード例 #3
0
ファイル: UndoMgr.cs プロジェクト: nnn1590/spritely
 public UndoMgr(ProjectMainForm owner, TabMgr.TabId id)
 {
     m_owner    = owner;
     m_id       = id;
     m_history  = new List <UndoAction>();
     m_nCurrent = -1;
 }
コード例 #4
0
ファイル: Palette256Form.cs プロジェクト: nnn1590/spritely
        public Palette256Form(ProjectMainForm parent, Palette256 p)
        {
            m_parent  = parent;
            m_palette = p;

            InitializeComponent();

            MdiParent       = parent;
            FormBorderStyle = FormBorderStyle.FixedToolWindow;
            StartPosition   = FormStartPosition.Manual;
            Visible         = false;
            ControlBox      = false;

            if (m_palette.IsBackground)
            {
                Text = "BgPalette '" + p.Name + "'";
            }
            else
            {
                Text = "Palette '" + p.Name + "'";
            }

            if (m_brushTransparent == null)
            {
                m_brushTransparent = new System.Drawing.Drawing2D.HatchBrush(
                    Options.TransparentPattern,
                    Color.LightGray, Color.Transparent);
            }
        }
コード例 #5
0
        public Palette16Form(ProjectMainForm parent, Palette16 p)
        {
            m_parent = parent;
            m_palette = p;

            InitializeComponent();

            MdiParent = parent;
            FormBorderStyle = FormBorderStyle.FixedToolWindow;
            StartPosition = FormStartPosition.Manual;
            Visible = false;
            ControlBox = false;

            if (m_palette.IsBackground)
                Text = "BgPalette '" + p.Name + "'";
            else
                Text = "Palette '" + p.Name + "'";

            if (m_brushTransparent == null)
            {
                m_brushTransparent = new System.Drawing.Drawing2D.HatchBrush(
                        Options.TransparentPattern,
                        Color.LightGray, Color.Transparent);
            }
        }
コード例 #6
0
ファイル: MapForm.cs プロジェクト: jduranmaster/spritely
        public MapForm(ProjectMainForm parent, Map m, Spriteset ss, Sprite s)
        {
            m_parent = parent;

            m_ss = ss;

            InitializeComponent();

            SetMap(m);
            m_toolbox = new Toolbox_Map();
            m_optionbox = new Optionbox_Map();

            MdiParent = parent;
            FormBorderStyle = FormBorderStyle.SizableToolWindow;
            StartPosition = FormStartPosition.Manual;
            Visible = false;
            ControlBox = false;

            // Set to 16x.
            cbZoom.SelectedIndex = (int)ZoomLevel.Zoom_16x;
            cbZoom.Enabled = false;

            m_tileSpriteX = -1;
            m_tileSpriteY = -1;
        }
コード例 #7
0
        public SpriteForm(ProjectMainForm parent, Spriteset ss, Sprite s)
        {
            m_parent = parent;

            m_ss = ss;

            InitializeComponent();

            SetSprite(s);
            m_toolbox   = new Toolbox_Sprite();
            m_optionbox = new Optionbox_Sprite();
            m_arrowbox  = new Arrowbox_Sprite();

            MdiParent       = parent;
            FormBorderStyle = FormBorderStyle.SizableToolWindow;
            StartPosition   = FormStartPosition.Manual;
            Visible         = false;
            ControlBox      = false;

            // Set to 16x.
            cbZoom.SelectedIndex = (int)ZoomLevel.Zoom_16x;

            if (m_brushTransparent == null)
            {
                m_brushTransparent = new System.Drawing.Drawing2D.HatchBrush(
                    Options.TransparentPattern,
                    Color.LightGray, Color.Transparent);
            }
        }
コード例 #8
0
ファイル: RecentFiles.cs プロジェクト: jduranmaster/spritely
 public RecentFiles(ProjectMainForm form, ToolStripMenuItem menu)
 {
     m_form = form;
     m_menu = menu;
     m_files = Properties.Settings.Default.RecentFiles;
     if (m_files == null)
         m_files = new StringCollection();
     BuildRecentMenu();
 }
コード例 #9
0
        public ColorEditor16(ProjectMainForm parent, Palette16Form p16, Subpalette sp)
        {
            m_parent = parent;
            m_winPalette = p16;
            m_subpalette = sp;

            InitializeComponent();

            UpdateColorScrollbars();
        }
コード例 #10
0
ファイル: ColorEditor16.cs プロジェクト: nnn1590/spritely
        public ColorEditor16(ProjectMainForm parent, Palette16Form p16, Subpalette sp)
        {
            m_parent     = parent;
            m_winPalette = p16;
            m_subpalette = sp;

            InitializeComponent();

            UpdateColorScrollbars();
        }
コード例 #11
0
ファイル: RecentFiles.cs プロジェクト: nnn1590/spritely
 public RecentFiles(ProjectMainForm form, ToolStripMenuItem menu)
 {
     m_form  = form;
     m_menu  = menu;
     m_files = Properties.Settings.Default.RecentFiles;
     if (m_files == null)
     {
         m_files = new StringCollection();
     }
     BuildRecentMenu();
 }
コード例 #12
0
ファイル: TabMgr.cs プロジェクト: jduranmaster/spritely
        public TabMgr(ProjectMainForm owner, TabId id)
        {
            m_owner = owner;
            m_eId = id;

            m_undo = new UndoMgr(owner, id);

            m_winLists = new List<Form>[(int)FormListType.MAX];
            for (int i=0; i<(int)FormListType.MAX; i++)
                m_winLists[(int)i] = new List<Form>();
        }
コード例 #13
0
        public TabMgr(ProjectMainForm owner, TabId id)
        {
            m_owner = owner;
            m_eId   = id;

            m_undo = new UndoMgr(owner, id);

            m_winLists = new List <Form> [(int)FormListType.MAX];
            for (int i = 0; i < (int)FormListType.MAX; i++)
            {
                m_winLists[(int)i] = new List <Form>();
            }
        }
コード例 #14
0
ファイル: Document.cs プロジェクト: nnn1590/spritely
        /// <summary>
        /// Initialize a Spritely document.
        /// </summary>
        /// <param name="form">The display form that owns this document</param>
        public Document(ProjectMainForm form)
        {
            m_form = form;

            m_data.Palettes             = new Palettes(this, Palettes.Type.Sprite);
            m_data.Spritesets           = new Spritesets(this, false);
            m_data.BackgroundPalettes   = new Palettes(this, Palettes.Type.Background);
            m_data.BackgroundSpritesets = new Spritesets(this, true);
            m_data.BackgroundMaps       = new Maps(this);
            m_data.BackgroundImages     = new BgImages(this);

            m_data.Filer = new FileHandler(this);
        }
コード例 #15
0
ファイル: Document.cs プロジェクト: jduranmaster/spritely
        /// <summary>
        /// Initialize a Spritely document.
        /// </summary>
        /// <param name="form">The display form that owns this document</param>
        public Document(ProjectMainForm form)
        {
            m_form = form;

            m_data.Palettes = new Palettes(this, Palettes.Type.Sprite);
            m_data.Spritesets = new Spritesets(this, false);
            m_data.BackgroundPalettes = new Palettes(this, Palettes.Type.Background);
            m_data.BackgroundSpritesets = new Spritesets(this, true);
            m_data.BackgroundMaps = new Maps(this);
            m_data.BackgroundImages = new BgImages(this);

            m_data.Filer = new FileHandler(this);
        }
コード例 #16
0
        public BgImageListForm(ProjectMainForm parent, BgImages bmis)
        {
            m_parent   = parent;
            m_bgimages = bmis;

            InitializeComponent();

            MdiParent       = parent;
            FormBorderStyle = FormBorderStyle.FixedToolWindow;
            StartPosition   = FormStartPosition.Manual;
            Visible         = false;
            ControlBox      = false;
            Text            = "Background Images";
        }
コード例 #17
0
        public ColorEncodingView(ProjectMainForm parent, Subpalette p)
        {
            m_parent = parent;

            InitializeComponent();
            this.DialogResult = DialogResult.No;

            m_subpalette = p;

            AdjustColorScrollbars();

            if (m_brushTransparent == null)
            {
                m_brushTransparent = new System.Drawing.Drawing2D.HatchBrush(
                        Options.TransparentPattern,
                        Color.LightGray, Color.Transparent);
            }
        }
コード例 #18
0
        public ColorEncodingView(ProjectMainForm parent, Subpalette p)
        {
            m_parent = parent;

            InitializeComponent();
            this.DialogResult = DialogResult.No;

            m_subpalette = p;

            AdjustColorScrollbars();

            if (m_brushTransparent == null)
            {
                m_brushTransparent = new System.Drawing.Drawing2D.HatchBrush(
                    Options.TransparentPattern,
                    Color.LightGray, Color.Transparent);
            }
        }
コード例 #19
0
        public SpritesetForm(ProjectMainForm parent, Spriteset ss)
        {
            m_parent = parent;
            m_ss = ss;

            InitializeComponent();

            MdiParent = parent;
            FormBorderStyle = FormBorderStyle.FixedToolWindow;
            StartPosition = FormStartPosition.Manual;
            Visible = false;
            ControlBox = false;

            if (m_ss.IsBackground)
                Text = "Tileset '" + ss.Name + "'";
            else
                Text = "Spriteset '" + ss.Name + "'";

            cbPalette.Items.Add(ss.Palette.Name);
            cbPalette.SelectedIndex = 0;
        }
コード例 #20
0
ファイル: BgImageForm.cs プロジェクト: nnn1590/spritely
        public BgImageForm(ProjectMainForm parent, BgImage bgi)
        {
            m_parent  = parent;
            m_bgimage = bgi;

            InitializeComponent();

            m_toolbox = new Toolbox_BgImage();

            MdiParent       = parent;
            FormBorderStyle = FormBorderStyle.SizableToolWindow;
            StartPosition   = FormStartPosition.Manual;
            Visible         = false;
            ControlBox      = false;

            // Set to 16x.
            cbZoom.SelectedIndex = (int)ZoomLevel.Zoom_16x;
            cbZoom.Enabled       = false;

            lNoImage.Visible = false;
        }
コード例 #21
0
        const int k_pxBackgroundImageIdealWidth = 598; //590;

        public static void ResizeMainForm(ProjectMainForm form)
        {
            int pxScreenWidth  = Screen.PrimaryScreen.WorkingArea.Width;
            int pxScreenHeight = Screen.PrimaryScreen.WorkingArea.Height;

            // The size of the window - default to entire screen.
            int pxWidth  = pxScreenWidth;
            int pxHeight = pxScreenHeight;

            // Calc width of window frame (left + right side).
            int pxFrameWidth = form.Width - form.ClientSize.Width + 6;

            // The background map screen is the widest, so we use the form widths
            // to determine the best window size.
            int pxBgWidth = k_pxSpritesetWidth + k_pxSprite1IdealWidth
                            + k_pxBackgroundMapIdealWidth + pxFrameWidth;

            if (pxScreenWidth >= pxBgWidth)
            {
                pxWidth = pxBgWidth;
            }

            if (pxScreenHeight >= k_pxBackgroundMapIdealHeight)
            {
                pxHeight = k_pxBackgroundMapIdealHeight;
            }

            // Make sure the entire window is visible on the screen.
            System.Drawing.Point ptLocation = form.Location;
            if (ptLocation.X + pxWidth > pxScreenWidth)
            {
                ptLocation.X = pxScreenWidth - pxWidth;
            }
            if (ptLocation.Y + pxHeight > pxScreenHeight)
            {
                ptLocation.Y = pxScreenHeight - pxHeight;
            }
            form.Location = ptLocation;
            form.Size     = new System.Drawing.Size(pxWidth, pxHeight);
        }
コード例 #22
0
        public UndoHistoryForm(ProjectMainForm owner)
        {
            m_owner = owner;

            InitializeComponent();
        }
コード例 #23
0
 public TutorialTestForm(ProjectMainForm parent)
 {
     InitializeComponent();
 }
コード例 #24
0
ファイル: TabMgr.cs プロジェクト: jduranmaster/spritely
        public static void ResizeMainForm(ProjectMainForm form)
        {
            int pxScreenWidth = Screen.PrimaryScreen.WorkingArea.Width;
            int pxScreenHeight = Screen.PrimaryScreen.WorkingArea.Height;

            // The size of the window - default to entire screen.
            int pxWidth = pxScreenWidth;
            int pxHeight = pxScreenHeight;

            // Calc width of window frame (left + right side).
            int pxFrameWidth = form.Width - form.ClientSize.Width + 6;

            // The background map screen is the widest, so we use the form widths
            // to determine the best window size.
            int pxBgWidth = k_pxSpritesetWidth + k_pxSprite1IdealWidth
                    + k_pxBackgroundMapIdealWidth + pxFrameWidth;
            if (pxScreenWidth >= pxBgWidth)
                pxWidth = pxBgWidth;

            if (pxScreenHeight >= k_pxBackgroundMapIdealHeight)
                pxHeight = k_pxBackgroundMapIdealHeight;

            // Make sure the entire window is visible on the screen.
            System.Drawing.Point ptLocation = form.Location;
            if (ptLocation.X + pxWidth > pxScreenWidth)
                ptLocation.X = pxScreenWidth - pxWidth;
            if (ptLocation.Y + pxHeight > pxScreenHeight)
                ptLocation.Y = pxScreenHeight - pxHeight;
            form.Location = ptLocation;
            form.Size = new System.Drawing.Size(pxWidth, pxHeight);
        }
コード例 #25
0
        public UndoHistoryForm(ProjectMainForm owner)
        {
            m_owner = owner;

            InitializeComponent();
        }
コード例 #26
0
ファイル: UndoMgr.cs プロジェクト: jduranmaster/spritely
 public UndoMgr(ProjectMainForm owner, TabMgr.TabId id)
 {
     m_owner = owner;
     m_id = id;
     m_history = new List<UndoAction>();
     m_nCurrent = -1;
 }