Exemple #1
0
        public override void Initialize()
        {
            var   xPos  = Parent.Screen.Width / 2 - 9;
            var   yPos  = Parent.Screen.Height / 2;
            short color = 7 << 4;

            upDownX = new UpDown(xPos, yPos)
            {
                MaxValue = 999, TextColor = color, InsideColor = 7, BorderColor = 8
            };
            upDownY = new UpDown(xPos + 9, yPos)
            {
                MaxValue = 999, TextColor = color, InsideColor = 7, BorderColor = 8
            };
            okText = new TextBlock(xPos + 17, yPos, "Continue")
            {
                TextColor = color, InsideColor = 7, BorderColor = 8
            };

            BG = new Panel(xPos - 2, yPos - 3, 30, 6)
            {
                InsideColor = 7, BorderColor = 8
            };
            Color = ColorChanger.GetColor(1);
            ColorChanger.SetColor(1, Color.FromArgb(200, 100, 0));
            panel = new Panel(0, 0, Parent.Screen.Width - 1, Parent.Screen.Height - 1)
            {
                InsideColor = 1, BorderColor = 12
            };
        }
        public override void Initialize()
        {
            var height = Parent.Screen.Height;
            var width  = Parent.Screen.Width;

            colorWindow   = new ColorWindow(width / 2 - 10, height / 3 - 10);
            paletteDialog = new SaveDialog(width / 2 - 10, height / 3 - 10);
            spriteDialog  = new SaveDialog(width / 2 - 10, height / 3 - 10);
            resetButton   = new TextBlock(width - width / 3, height - 3, "Reset")
            {
                BorderColor = 8
            };
            sizeText = new TextBlock(width - width / 3, height - height / 3 + 1)
            {
                BorderColor = 7
            };
            scaleText = new TextBlock(width - width / 3, height - height / 3 + 3)
            {
                BorderColor = 7
            };
            debugText = new TextBlock(width - width / 3, height - height / 3 + 5)
            {
                BorderColor = 7
            };
            BGPanel = new Panel(0, height - height / 3, width - 1, height)
            {
                BorderColor = 8, InsideColor = 7
            };
            exportPalButton = new TextBlock(width - 31, height - 3, "Export palette")
            {
                BorderColor = 8
            };
            importPalButton = new TextBlock(width - 31, height - 6, "Import palette")
            {
                BorderColor = 8
            };
            exportSprButton = new TextBlock(width - width / 3 - 15, height - 3, "Export sprite")
            {
                BorderColor = 8
            };
            importSprButton = new TextBlock(width - width / 3 - 15, height - 6, "Import sprite")
            {
                BorderColor = 8
            };
            palettePanel = new Panel(width - 12, height - 2, 7, 2);
            colorValue   = new UpDown(width - width / 3, height - 6)
            {
                BorderColor = 8, MinValue = -1, MaxValue = 16 * 16, Value = 15
            };
            components.Add(resetButton);
            components.Add(exportPalButton);
            components.Add(importPalButton);
            components.Add(exportSprButton);
            components.Add(importSprButton);
            components.Add(palettePanel);
            components.Add(colorValue);
            mouse = Input.GetMouse();
        }
Exemple #3
0
 public ColorWindow(int PosX, int PosY) : base(PosX, PosY, 16, 16)
 {
     ResetButton = new TextBlock(PosX + 19, PosY + 2, "Reset");
     BG          = new Panel(PosX, PosY, 26, 5)
     {
         BorderColor = 7, InsideColor = 15
     };
     R = new UpDown(PosX + 1, PosY + 2)
     {
         BorderColor = 15, MaxValue = 255
     };
     G = new UpDown(PosX + 7, PosY + 2)
     {
         BorderColor = 15, MaxValue = 255
     };
     B = new UpDown(PosX + 13, PosY + 2)
     {
         BorderColor = 15, MaxValue = 255
     };
     upDowns[0] = R;
     upDowns[1] = G;
     upDowns[2] = B;
 }