public MaterialEditWindow(Screen screen)
            : base(screen)
        {
            DataContext = new MaterialEdit();

            ShadowOffset = new Vector2(4);
            Padding = new Thickness(16);
            HorizontalAlignment = HorizontalAlignment.Left;
            VerticalAlignment = VerticalAlignment.Top;

            var stackPanel = new StackPanel(screen)
            {
                Orientation = Orientation.Vertical,
                HorizontalAlignment = HorizontalAlignment.Stretch
            };
            Content = stackPanel;

            diffuseColorButton = new LightColorButton(screen);
            diffuseColorButton.NameTextBlock.Text = "Diffuse color";
            diffuseColorButton.Click += OnDiffuseColorButtonClick;
            stackPanel.Children.Add(diffuseColorButton);

            specularColorButton = new LightColorButton(screen);
            specularColorButton.NameTextBlock.Text = "Specular color";
            specularColorButton.Click += OnSpecularColorButtonClick;
            stackPanel.Children.Add(specularColorButton);
        }
        public MaterialEditWindow(Screen screen)
            : base(screen)
        {
            DataContext = new MaterialEdit();

            ShadowOffset        = new Vector2(4);
            Padding             = new Thickness(16);
            HorizontalAlignment = HorizontalAlignment.Left;
            VerticalAlignment   = VerticalAlignment.Top;

            var stackPanel = new StackPanel(screen)
            {
                Orientation         = Orientation.Vertical,
                HorizontalAlignment = HorizontalAlignment.Stretch
            };

            Content = stackPanel;

            diffuseColorButton = new LightColorButton(screen);
            diffuseColorButton.NameTextBlock.Text = "Diffuse color";
            diffuseColorButton.Click += OnDiffuseColorButtonClick;
            stackPanel.Children.Add(diffuseColorButton);

            specularColorButton = new LightColorButton(screen);
            specularColorButton.NameTextBlock.Text = "Specular color";
            specularColorButton.Click += OnSpecularColorButtonClick;
            stackPanel.Children.Add(specularColorButton);
        }
Exemple #3
0
        public DirectionalLightWindow(Screen screen)
            : base(screen)
        {
            ShadowOffset        = new Vector2(4);
            Padding             = new Thickness(16);
            HorizontalAlignment = HorizontalAlignment.Left;
            VerticalAlignment   = VerticalAlignment.Top;

            var stackPanel = new StackPanel(screen)
            {
                Orientation         = Orientation.Vertical,
                HorizontalAlignment = HorizontalAlignment.Stretch
            };

            Content = stackPanel;

            titleTextBlock = new TextBlock(screen)
            {
                Padding                 = new Thickness(4),
                ForegroundColor         = Color.Yellow,
                BackgroundColor         = Color.Black,
                HorizontalAlignment     = HorizontalAlignment.Stretch,
                TextHorizontalAlignment = HorizontalAlignment.Left,
                ShadowOffset            = new Vector2(2)
            };
            stackPanel.Children.Add(titleTextBlock);

            var separator = ControlUtil.CreateDefaultSeparator(screen);

            stackPanel.Children.Add(separator);

            switchLightButton         = ControlUtil.CreateDefaultDialogButton(screen, "");
            switchLightButton.Padding = new Thickness(16, 0, 16, 0);
            switchLightButton.Click  += OnSwitchLightButtonClick;
            stackPanel.Children.Add(switchLightButton);

            diffuseColorButton = new LightColorButton(screen);
            diffuseColorButton.NameTextBlock.Text = Strings.DiffuseColorLabel;
            diffuseColorButton.Click += OnDiffuseColorButtonClick;
            stackPanel.Children.Add(diffuseColorButton);

            specularColorButton = new LightColorButton(screen);
            specularColorButton.NameTextBlock.Text = Strings.SpecularColorLabel;
            specularColorButton.Click += OnSpecularColorButtonClick;
            stackPanel.Children.Add(specularColorButton);
        }
        public DirectionalLightWindow(Screen screen)
            : base(screen)
        {
            ShadowOffset = new Vector2(4);
            Padding = new Thickness(16);
            HorizontalAlignment = HorizontalAlignment.Left;
            VerticalAlignment = VerticalAlignment.Top;

            var stackPanel = new StackPanel(screen)
            {
                Orientation = Orientation.Vertical,
                HorizontalAlignment = HorizontalAlignment.Stretch
            };
            Content = stackPanel;

            titleTextBlock = new TextBlock(screen)
            {
                Padding = new Thickness(4),
                ForegroundColor = Color.Yellow,
                BackgroundColor = Color.Black,
                HorizontalAlignment = HorizontalAlignment.Stretch,
                TextHorizontalAlignment = HorizontalAlignment.Left,
                ShadowOffset = new Vector2(2)
            };
            stackPanel.Children.Add(titleTextBlock);

            var separator = ControlUtil.CreateDefaultSeparator(screen);
            stackPanel.Children.Add(separator);

            switchLightButton = ControlUtil.CreateDefaultDialogButton(screen, "");
            switchLightButton.Padding = new Thickness(16, 0, 16, 0);
            switchLightButton.Click += OnSwitchLightButtonClick;
            stackPanel.Children.Add(switchLightButton);

            diffuseColorButton = new LightColorButton(screen);
            diffuseColorButton.NameTextBlock.Text = Strings.DiffuseColorLabel;
            diffuseColorButton.Click += OnDiffuseColorButtonClick;
            stackPanel.Children.Add(diffuseColorButton);

            specularColorButton = new LightColorButton(screen);
            specularColorButton.NameTextBlock.Text = Strings.SpecularColorLabel;
            specularColorButton.Click += OnSpecularColorButtonClick;
            stackPanel.Children.Add(specularColorButton);
        }