Beispiel #1
0
 public void Load(TerrainFlagInfo info)
 {
     ColorField.color = info.Color;
     NameField.text = info.Name;
     FlagField.text = info.FlagName;
     Flag = info.Flag;
 }
 public override void Refresh(InfoMap infos)
 {
     base.Refresh(infos);
     int index = (int)infos["index"];
     info = TerrainFlagInfo.Infos[index];
     SetMouseData();
 }
        public void OnShow(object[] args)
        {
            int index = (int)args[0];
            info = TerrainFlagInfo.Infos[index];

            BrushSizeSlider.Value = Properties.Settings.Default.TerrainBrushSize;
            BrushSizeSlider.ValueChanged += OnSizeSliderValueChange;

            SetMouseData();
        }
        public void Load(TerrainFlagInfo info)
        {
            Flag = info.Flag;
            Color = Color.FromRgb((byte)(info.Color.r * 255), (byte)(info.Color.g * 255), (byte)(info.Color.b * 255));

            ColorBlock.Background = new SolidColorBrush(Color);
            NameField.Content = info.Name;
            TypeField.Content = info.FlagName;

            int visibleFlags = Properties.Settings.Default.TerrainVisibleFlags;
            CheckField.IsChecked = EditorUtils.HasFlag(visibleFlags, (int)Flag);
        }