Esempio n. 1
0
        public FloorDrawable(InteractionLayer.EditorType editorType, ISceneContext sceneContext, Color buildVolumeColor, ThemeConfig theme)
        {
            this.buildVolumeColor = buildVolumeColor;
            this.sceneContext     = sceneContext;
            this.editorType       = editorType;
            this.theme            = theme;
            this.printer          = sceneContext.Printer;
            this.EnsureBedTexture(selectedItem: null);

            // Register listeners
            if (printer != null)
            {
                printer.Settings.SettingChanged += this.Settings_SettingChanged;
            }
        }
Esempio n. 2
0
        public FloorDrawable(InteractionLayer.EditorType editorType, ISceneContext sceneContext, Color buildVolumeColor, ThemeConfig theme)
        {
            this.buildVolumeColor = buildVolumeColor;
            this.sceneContext     = sceneContext;
            this.editorType       = editorType;
            this.theme            = theme;

            bedColor      = theme.ResolveColor(Color.White, theme.BackgroundColor.WithAlpha(111));
            underBedColor = new Color(bedColor, bedColor.alpha / 4);

            gridColors = new GridColors()
            {
                Gray  = theme.ResolveColor(theme.BackgroundColor, theme.GetBorderColor((theme.IsDarkTheme ? 35 : 55))),
                Red   = theme.ResolveColor(theme.BackgroundColor, new Color(Color.Red, (theme.IsDarkTheme ? 105 : 170))),
                Green = theme.ResolveColor(theme.BackgroundColor, new Color(Color.Green, (theme.IsDarkTheme ? 105 : 170))),
                Blue  = theme.ResolveColor(theme.BackgroundColor, new Color(Color.Blue, 195))
            };
        }