Ejemplo n.º 1
0
        public TilePaletteWindow()
            : base(HorizontalSnap.Left, VerticalSnap.Bottom)
        {
            Name = "TilePaletteWindow";
            Text = "Tile Palette";
            ClientSize = new Size(160, 192);

            FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;

            tilesetsComboBox = new ComboBox();
            tilesetsComboBox.Location = new Point(48, 4);
            tilesetsComboBox.Width = 104;
            tilesetsComboBox.Enabled = false;
            tilesetsComboBox.DropDownStyle = ComboBoxStyle.DropDownList;
            tilesetsComboBox.SelectionChangeCommitted += new EventHandler(tilesetsComboBox_SelectionChangeCommitted);
            Controls.Add(tilesetsComboBox);

            Label tilesetsLabel = new Label();
            tilesetsLabel.Text = "Tileset:";
            tilesetsLabel.Location = new Point(4, 7);
            tilesetsLabel.Size = new Size(44, 20);
            Controls.Add(tilesetsLabel);

            tileSelector = new TileSelector();
            tileSelector.Location = new Point(4, 27);
            tileSelector.Size = new Size(ClientSize.Width - 8, ClientSize.Height - 31);
            tileSelector.Dock = DockStyle.Bottom;
            Controls.Add(tileSelector);

            Resize += new EventHandler(TilePaletteWindow_ResizeEnd);
            Ogmo.LayersWindow.OnLayerChanged += onLayerChanged;
            Ogmo.OnProjectStart += initFromProject;
            Ogmo.OnProjectEdited += initFromProject;
        }
Ejemplo n.º 2
0
        public TilePaletteWindow()
            : base(HorizontalSnap.Left, VerticalSnap.Bottom)
        {
            Name       = "TilePaletteWindow";
            Text       = "Tile Palette";
            ClientSize = new Size(160, 192);

            FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;

            tilesetsComboBox                           = new ComboBox();
            tilesetsComboBox.Location                  = new Point(48, 4);
            tilesetsComboBox.Width                     = 104;
            tilesetsComboBox.Enabled                   = false;
            tilesetsComboBox.DropDownStyle             = ComboBoxStyle.DropDownList;
            tilesetsComboBox.SelectionChangeCommitted += new EventHandler(tilesetsComboBox_SelectionChangeCommitted);
            Controls.Add(tilesetsComboBox);

            Label tilesetsLabel = new Label();

            tilesetsLabel.Text     = "Tileset:";
            tilesetsLabel.Location = new Point(4, 7);
            tilesetsLabel.Size     = new Size(44, 20);
            Controls.Add(tilesetsLabel);

            tileSelector          = new TileSelector();
            tileSelector.Location = new Point(4, 27);
            tileSelector.Size     = new Size(ClientSize.Width - 8, ClientSize.Height - 31);
            tileSelector.Dock     = DockStyle.Bottom;
            Controls.Add(tileSelector);

            Resize += new EventHandler(TilePaletteWindow_ResizeEnd);
            Ogmo.LayersWindow.OnLayerChanged += onLayerChanged;
            Ogmo.OnProjectStart  += initFromProject;
            Ogmo.OnProjectEdited += initFromProject;
        }