public TextureEditor(FSTexture texture)
            : base(DevelopmentMenu.Instance)
        {
            this.Title = "Texture Editor";
            this.SetSize(600, 400);
            this.SetPosition((int)MouseManager.GetMousePositionWindows().X, (int)MouseManager.GetMousePositionWindows().Y);

            Canvas = new DrawingArea(this);
            Canvas.SetPosition(10, 10);
            Canvas.SetSize(300, 300);

            colorpicker = new HSVColorPicker(this);
            colorpicker.SetPosition(320, 10);
            colorpicker.ColorChanged += delegate(Base sender, EventArgs args) {
                Canvas.SetColor(colorpicker.SelectedColor);
            };

            ToolSelect = new ToolBox(this);
            ToolSelect.Text = "Current Tool";
            ToolSelect.SetPosition(320, 150);
            ToolSelect.SetSize(200, 200);

            Canvas.OnDraw += DrawEventHandler;

            Canvas.LoadTexture(texture);
        }
Beispiel #2
0
        public ColorPickers(Base parent)
            : base(parent)
        {
            /* RGB Picker */
            {
                ColorPicker rgbPicker = new ColorPicker(this);
                rgbPicker.SetPosition(10, 10);
                rgbPicker.ColorChanged += ColorChanged;
            }

            /* HSVColorPicker */
            {
                HSVColorPicker hsvPicker = new HSVColorPicker(this);
                hsvPicker.SetPosition(300, 10);
                hsvPicker.ColorChanged += ColorChanged;
            }

            /* HSVColorPicker in Window */
            {
                Control.WindowControl Window = new WindowControl(this);
                Window.SetSize(300, 300);
                Window.Hide();

                HSVColorPicker hsvPicker = new HSVColorPicker(Window);
                hsvPicker.SetPosition(10, 10);
                hsvPicker.ColorChanged += ColorChanged;

                Control.Button OpenWindow = new Control.Button(this);
                OpenWindow.SetPosition(10, 200);
                OpenWindow.SetSize(200, 20);
                OpenWindow.Text = "Open Window";
                OpenWindow.Clicked += delegate(Base sender, ClickedEventArgs args) { Window.Show(); };
            }
        }
        public ColorPickers(ControlBase parent) : base(parent)
        {
            ColorPicker rgbPicker = new ColorPicker(this);
            rgbPicker.SetPosition(10, 10);

            rgbPicker.ColorChanged += ColorChanged;

            HSVColorPicker hsvPicker = new HSVColorPicker(this);
            hsvPicker.SetPosition(300, 10);
            hsvPicker.ColorChanged += ColorChanged;
        }
        public ColorPickers(ZGE.Components.ZComponent parent) : base(parent)
        {
            ColorPicker rgbPicker = new ColorPicker(this);
            rgbPicker.SetPosition(10, 10);

            rgbPicker.ColorChanged += ColorChanged;

            HSVColorPicker hsvPicker = new HSVColorPicker(this);
            hsvPicker.SetPosition(300, 10);
            hsvPicker.ColorChanged += ColorChanged;
        }