public void SetValues( SizingConfig sizingConfig, NoiseConfig noiseConfig, FalloffConfig falloffConfig, ColorConfig colorConfig, BackgroundColorConfig backgroundColorConfig, OutlineConfig outlineConfig, SymmetryConfig symmetryConfig, SymmetryConfig3D symmetryConfig3D, ScalingConfig scalingConfig, AnimationConfig animationConfig, ShadingConfig shadingConfig, CleanupConfig cleanupConfig, NormalsConfig normalsConfig ) { this.sizingConfig = sizingConfig; this.noiseConfig = noiseConfig; this.falloffConfig = falloffConfig; this.colorConfig = colorConfig; this.backgroundColorConfig = backgroundColorConfig; this.outlineConfig = outlineConfig; this.symmetryConfig = symmetryConfig; this.symmetryConfig3D = symmetryConfig3D; this.scalingConfig = scalingConfig; this.animationConfig = animationConfig; this.shadingConfig = shadingConfig; this.cleanupConfig = cleanupConfig; this.normalsConfig = normalsConfig; }
public bool GeneCs(string xmlPath, string outPutDir) { try { Console.WriteLine("Generate Text Color Config"); TableData td = xParser.GetTableData(Path.GetFileNameWithoutExtension(xmlPath), FileOpt.ReadTextFromFile(xmlPath)); string content = GetSharpHeader(); List <ColorConfig> configList = new List <ColorConfig>(); foreach (SheetData sd in td.sheets) { foreach (RowData rd in sd.dataRows) { var config = new ColorConfig(); config.desc = GetSummary(rd); config.id = GetID(rd); config.name = GetName(rd); config.value = GetValue(rd); configList.Add(config); } } content += GenGetColor(configList); content += GenColorCode(configList); content += "\t}\n}\n"; FileOpt.WriteText(content, outPutDir + "ColorConfig.cs"); return(true); } catch (Exception e) { Console.WriteLine(e.ToString()); return(false); } }
// Init private void Awake() { if (colorConfig) { globColorConfig = colorConfig; } }
public void setColorProfile(ColorConfig colorConfig) { InterruptList.ForeColor = LinearGlobal.ColorConfig.FontColor; InterruptList.BackColor = LinearGlobal.ColorConfig.DisplayBackgroundColor; this.BackColor = LinearGlobal.ColorConfig.FormBackgroundColor; }
private void setHeader(ColorConfig colorConfig) { // ヘッダービュー作成 DevAge.Drawing.VisualElements.ColumnHeader headerBackground = new DevAge.Drawing.VisualElements.ColumnHeader(); headerBackground.BackColor = colorConfig.HeaderBackgroundColor; headerBackground.Border = DevAge.Drawing.RectangleBorder.NoBorder; if (LinearGlobal.StyleConfig.GridHeaderStyle == StyleConfig.EnumGridHeaderStyle.Flat) { headerBackground.BackgroundColorStyle = BackgroundColorStyle.Solid; } SourceGrid.Cells.Views.ColumnHeader headerView = new SourceGrid.Cells.Views.ColumnHeader(); headerView.Background = headerBackground; headerView.ForeColor = colorConfig.HeaderFontColor; // SourceGrid用イベント初期化 ColumnHeaderClickEvent columnHeaderClickEvent = new ColumnHeaderClickEvent(); Grid[0, (int)EnuGrid.LINKTITILE] = new SourceGrid.Cells.ColumnHeader(headerTitle[0]); Grid[0, (int)EnuGrid.LINKTITILE].Column.Width = 278; Grid[0, (int)EnuGrid.LINKTITILE].AddController(columnHeaderClickEvent); Grid.EnableSort = false; //SourceGrid.Cells.Controllers.SortableHeader sortableHeader = new SourceGrid.Cells.Controllers.SortableHeader(); // ヘッダビューをセット if (LinearGlobal.StyleConfig.GridHeaderStyle != StyleConfig.EnumGridHeaderStyle.Windows) { this.setHeaderView(0, headerView); } }
static Draw() { DamageIndicatorMenu.AddGroupLabel("Spell drawings Settings :"); _drawHealth = DamageIndicatorMenu.Add("damageIndicatorDraw", new CheckBox("Draw damage indicator ?")); _drawPercent = DamageIndicatorMenu.Add("percentageIndicatorDraw", new CheckBox("Draw damage percentage ?")); _drawStatiscs = DamageIndicatorMenu.Add("statiscsIndicatorDraw", new CheckBox("Draw damage statistics ?")); _healthColor = new ColorConfig(DamageIndicatorMenu, "healthColorConfig", Color.Yellow, "Color Damage Indicator:"); }
static Draw() { DamageIndicatorMenu.AddGroupLabel("Büyü gösterme ayarları :"); _drawHealth = DamageIndicatorMenu.Add("damageIndicatorDraw", new CheckBox("Hasartespitçisi göster ?")); _drawPercent = DamageIndicatorMenu.Add("percentageIndicatorDraw", new CheckBox("Hasarı yüzde göster ?")); _drawStatiscs = DamageIndicatorMenu.Add("statiscsIndicatorDraw", new CheckBox("Hasar istatistikelrini göster ?")); _healthColor = new ColorConfig(DamageIndicatorMenu, "healthColorConfig", Color.Yellow, "Renk Hasar Tespitçisi:"); }
/* * プロパティ */ #region Property #endregion /* * パブリックメソッド */ #region PublicMethod public void setColorProfile(ColorConfig colorConfig) { ((SourceGrid.Selection.RowSelection)Grid.Selection).Border = DevAge.Drawing.RectangleBorder.NoBorder; ((SourceGrid.Selection.RowSelection)Grid.Selection).BackColor = colorConfig.SelectRowColor; ((SourceGrid.Selection.RowSelection)Grid.Selection).FocusBackColor = ((SourceGrid.Selection.RowSelection)Grid.Selection).BackColor; // セルビュー作成 createCellView(colorConfig); setHeader(colorConfig); Grid.BackColor = colorConfig.FirstRowBackgroundColor; }
public DigiDrawRect(ColorConfig _colorconfig) { InitializeComponent(); thisForm = this; rectFRoiTotalPoints = 0; this.colorconfig = _colorconfig; rectsBLK[0] = rect1stBLK; rectsROI[0] = RectConverter.rect1stROI; rectsBLK[1] = rect2ndBLK; rectsROI[1] = RectConverter.rect2ndROI; rectsBLK[2] = rect3rdBLK; rectsROI[2] = RectConverter.rect3rdROI; rectsBLK[3] = rect4thBLK; rectsROI[3] = RectConverter.rect4thROI; for (int i = 0; i < 4; i++) { setnames[i] = _colorconfig.name + "-" + i.ToString(); } for (int i = 0; i < RectConverter.eyepieces.Length; ++i) { if (RectConverter.eyepieces[i] == colorconfig.amp) { amp = i; break; } } if (amp == 1) { x_step = RectConverter.xstep_20x; y_step = RectConverter.ystep_20x; } else if (amp == 2) { x_step = RectConverter.xstep_40x; y_step = RectConverter.ystep_40x; } if (x_step == 0.0F || y_step == 0.0F) { is_amp_ok = false; MessageBox.Show("扫描目前仅支持20x或40x的放大倍数,请重新选择。"); } else { is_amp_ok = true; } InfoPanelUtil.MyConsoleWrite(ref thisForm, "hello"); }
public async Task <ActionResult <IResult> > Post(string user, string datastoreName, string scenarioName, Dictionary <string, string> entityColorConfig) { ConfigResult result = new ConfigResult(); if (string.IsNullOrWhiteSpace(datastoreName)) { result.success = false; result.responseMessage = "datastoreName不能为空。"; } else if (string.IsNullOrWhiteSpace(scenarioName)) { result.success = false; result.responseMessage = "scenarioName不能为空。"; } else { ConfigExecutor executor = new ConfigExecutor(user, datastoreName); if (entityColorConfig == null || entityColorConfig.Count == 0) { result.success = false; result.responseMessage = "color config 不能为空。"; } List <ColorConfig> colorConfigs = new List <ColorConfig>(); foreach (string entityName in entityColorConfig.Keys) { string colorHexCode = entityColorConfig[entityName].Trim(); if (colorHexCode.StartsWith('#')) { long output; bool isHex = long.TryParse(colorHexCode.Substring(1), System.Globalization.NumberStyles.HexNumber, null, out output); if (isHex) { ColorConfig config = new ColorConfig(); config.itemLabel = entityName; config.color = colorHexCode; colorConfigs.Add(config); } } } (bool success, string msg) = executor.UpdateColorConfigs(scenarioName, colorConfigs); result.success = success; result.responseMessage = msg; } return(Ok(result)); }
/* * プロパティ */ #region Property #endregion /* * パブリックメソッド */ #region PublicMethod public void setColorProfile(ColorConfig colorConfig) { ((SourceGrid.Selection.RowSelection)Grid.Selection).Border = DevAge.Drawing.RectangleBorder.NoBorder; ((SourceGrid.Selection.RowSelection)Grid.Selection).BackColor = Color.FromArgb(100, ColorUtils.GetLighterColor(colorConfig.FormBackgroundColor, 10)); ((SourceGrid.Selection.RowSelection)Grid.Selection).FocusBackColor = ((SourceGrid.Selection.RowSelection)Grid.Selection).BackColor; // セルビュー作成 createCellView(colorConfig); setHeader(colorConfig); //Grid.BackColor = colorConfig.FirstRowBackgroundColor; Grid.BackColor = colorConfig.FormBackgroundColor; }
public ColorOutcome Recolor( ref Texture2D tex, int frame, ColorConfig colorConfig, BackgroundColorConfig backgroundColorConfig, OutlineConfig outlineConfig, ColorOutcome colorOutcome) { if (colorOutcome == ColorOutcome.None || colorOutcome == null) { colorOutcome = new ColorOutcome(); if (frame == 0) { colorOutcome.generatedColors = cachedGeneratedColors = GenerateColors(colorConfig, backgroundColorConfig); } else { colorOutcome.generatedColors = cachedGeneratedColors; } colorOutcome.backgroundColor = SetBackgroundColor(); colorOutcome.outlineColor = OutlineColor(outlineConfig, frame, colorOutcome.generatedColors); } var colors = tex.GetPixels(); var increment = 1f / colorConfig.colorCountPerSprite; var newColors = new Color[colors.Length]; for (var index = 0; index < colors.Length; index++) { var gray = colors[index].grayscale; for (var i = 0; i < colorConfig.colorCountPerSprite; i++) { if (gray >= i * increment && gray <= (i + 1) * increment) { newColors[index] = colorOutcome.generatedColors[i]; } } } tex.SetPixels(newColors); return(colorOutcome); Color SetBackgroundColor() { if (!cam) { cam = Camera.main; } var backgroundColor = BackgroundColor(backgroundColorConfig, colorConfig, frame, colorOutcome.generatedColors); cam.backgroundColor = backgroundColor; return(backgroundColor); } }
/// <summary> /// Gets the color. /// </summary> /// <param name="newColor">The newColor.</param> /// <returns></returns> public Color GetColor(Color newColor) { try { return(newColor != Color.Empty ? ColorConfig.GetColor(newColor) : Color.Empty); } catch (Exception ex) { Fail(ex); return(default(Color)); } }
/// <summary> /// カラープロファイルを設定する。 /// </summary> public void setColorProfile(ColorConfig colorConfig) { createNoPictureImage(); LinearGlobal.MainForm.setColorProfile(colorConfig); LinearGlobal.MainForm.ListForm.setColorProfile(colorConfig); //LinearGlobal.MainForm.ListForm.InterruptForm.setColorProfile(colorConfig); LinearAudioPlayer.GridController.setColorProfile(colorConfig); LinearAudioPlayer.FilteringGridController.setColorProfile(colorConfig); LinearAudioPlayer.GroupGridController.setColorProfile(colorConfig); LinearAudioPlayer.LinkGridController.setColorProfile(colorConfig); LinearGlobal.ColorConfig = colorConfig; }
Color BackgroundColor(BackgroundColorConfig backgroundColorConfig, ColorConfig colorConfig, int frame, Color[] generatedColors) { if (!colorConfig.usePaletteColors) { return(Color.black); } if (backgroundColorConfig.overrideBackgroundColor) { return(backgroundColorConfig.backgroundColorOverride); } if (backgroundColorConfig.randomPaletteColorForBackground && frame == 0) { return(generatedColors[Random.Range(0, generatedColors.Length - 1)]); } return(generatedColors[backgroundColorConfig.paletteColorIndexForBackground]); }
public void Copy(ConfigurationAsset source) { sizingConfig = source.sizingConfig; noiseConfig = source.noiseConfig; falloffConfig = source.falloffConfig; colorConfig = source.colorConfig; backgroundColorConfig = source.backgroundColorConfig; outlineConfig = source.outlineConfig; symmetryConfig = source.symmetryConfig; symmetryConfig3D = source.symmetryConfig3D; scalingConfig = source.scalingConfig; animationConfig = source.animationConfig; shadingConfig = source.shadingConfig; cleanupConfig = source.cleanupConfig; normalsConfig = source.normalsConfig; }
private void createCellView(ColorConfig colorConfig) { base.createCellView(); // セルビュー作成 cellView = new CellBackColorAlternate( colorConfig.FirstRowBackgroundColor, colorConfig.SecondRowBackgroundColor); cellView.ForeColor = colorConfig.NoPlayColor; cellView.Border = DevAge.Drawing.RectangleBorder.NoBorder; cellViewPlaying = new CellBackColorAlternate( colorConfig.FirstRowBackgroundColor, colorConfig.SecondRowBackgroundColor); cellViewPlaying.ForeColor = colorConfig.PlayingColor; cellViewPlaying.Border = DevAge.Drawing.RectangleBorder.NoBorder; }
private void changeColorProfile(string colorProfile) { if (!String.IsNullOrEmpty(colorProfile)) { LinearGlobal.LinearConfig.ViewConfig.ColorProfile = colorProfile; if (LinearGlobal.isCompleteStartup) { ColorConfig cc = LinearAudioPlayer.SettingManager.LoadColorConfig( LinearGlobal.LinearConfig.ViewConfig.ColorProfile); LinearAudioPlayer.StyleController.setColorProfile(cc); //LinearGlobal.MainForm.ListForm.reloadDatabase(true); LinearGlobal.MainForm.ListForm.ReloadAllGrid(); LinearAudioPlayer.StyleController.loadStyle(LinearGlobal.StyleConfig); } } }
static Draw() { DrawMenu.AddGroupLabel("Spell drawings Settings :"); _drawReady = DrawMenu.Add("drawOnlyWhenReady", new CheckBox("Draw the spells only if they are ready ?")); _drawHealth = DrawMenu.Add("damageIndicatorDraw", new CheckBox("Draw damage indicator ?")); _drawPercent = DrawMenu.Add("percentageIndicatorDraw", new CheckBox("Draw damage percentage ?")); DrawMenu.AddSeparator(1); _drawQ = DrawMenu.Add("qDraw", new CheckBox("Draw Q spell range ?")); _drawW = DrawMenu.Add("wDraw", new CheckBox("Draw W spell range ?")); _drawE = DrawMenu.Add("eDraw", new CheckBox("Draw E spell range ?")); _drawR = DrawMenu.Add("rDraw", new CheckBox("Draw R spell range ?")); _healthColor = new ColorConfig(DrawMenu, "healthColorConfig", Color.Orange, "Color Damage Indicator:"); _qColor = new ColorConfig(DrawMenu, "qColorConfig", Color.Blue, "Color Q:"); _wColor = new ColorConfig(DrawMenu, "wColorConfig", Color.Red, "Color W:"); _eColor = new ColorConfig(DrawMenu, "eColorConfig", Color.DeepPink, "Color E:"); _rColor = new ColorConfig(DrawMenu, "rColorConfig", Color.Yellow, "Color R:"); }
static Draw() { DrawMenu.AddGroupLabel("Büyü Göstergesi :"); _drawReady = DrawMenu.Add("drawOnlyWhenReady", new CheckBox("Büyü sadece hazırsa göster ?")); _drawHealth = DrawMenu.Add("damageIndicatorDraw", new CheckBox("Hasar tespiti göster ?")); _drawPercent = DrawMenu.Add("percentageIndicatorDraw", new CheckBox("Hasarı Yüzde olarak göster ?")); DrawMenu.AddSeparator(1); _drawQ = DrawMenu.Add("qDraw", new CheckBox("Göster Q Menzili ?")); _drawW = DrawMenu.Add("wDraw", new CheckBox("Göster W Menzili ?")); _drawE = DrawMenu.Add("eDraw", new CheckBox("Göster E Menzili ?")); _drawR = DrawMenu.Add("rDraw", new CheckBox("Göster R Menzili ?")); _healthColor = new ColorConfig(DrawMenu, "healthColorConfig", Color.Orange, "Renkli Hasar Tespiti:"); _qColor = new ColorConfig(DrawMenu, "qColorConfig", Color.Blue, "Renk Q:"); _wColor = new ColorConfig(DrawMenu, "wColorConfig", Color.Red, "Renk W:"); _eColor = new ColorConfig(DrawMenu, "eColorConfig", Color.DeepPink, "Renk E:"); _rColor = new ColorConfig(DrawMenu, "rColorConfig", Color.Yellow, "Renk R:"); }
public async Task <ActionResult <IResult> > Post(string user, string datastoreName, string scenarioName, Dictionary <string, string> entityColorConfig) { ConfigResult result = new ConfigResult(); if (string.IsNullOrWhiteSpace(datastoreName)) { result.success = false; result.responseMessage = "datastoreName不能为空。"; } else if (string.IsNullOrWhiteSpace(scenarioName)) { result.success = false; result.responseMessage = "scenarioName不能为空。"; } else { ConfigExecutor executor = new ConfigExecutor(user, datastoreName); if (entityColorConfig == null || entityColorConfig.Count == 0) { result.success = false; result.responseMessage = "color config 不能为空。"; } List <ColorConfig> colorConfigs = new List <ColorConfig>(); foreach (string eName in entityColorConfig.Keys) { ColorConfig config = new ColorConfig(); config.itemLabel = eName; config.color = entityColorConfig[eName]; colorConfigs.Add(config); } (bool success, string msg) = executor.UpdateColorConfigs(scenarioName, colorConfigs); result.success = success; result.responseMessage = msg; } return(Ok(result)); }
public void DrawGraph(Graphics g, ColorConfig colorConfig) { SelectedPointInfo blockInfo = this; Point p = blockInfo.StartPoint; int blockWidth = CalcBlockInfoWidth(blockInfo); int blockHeight = CalcBlockInfoHeight(blockInfo); g.FillRectangle(new SolidBrush(Color.Black), p.X, p.Y, blockWidth, blockHeight); g.DrawRectangle(colorConfig.Pen_CrossHair, p.X, p.Y, blockWidth, blockHeight); Point linePoint = p; linePoint.Y += blockInfo.Gap; for (int i = 0; i < blockInfo.Lines.Count; i++) { BlockLineInfo lineInfo = blockInfo.Lines[i]; g.DrawString(lineInfo.Text, lineInfo.TextFont, lineInfo.TextBrush, linePoint); linePoint.Y += blockInfo.LineHeight; } }
private void Game_OnGameLoad() { //ConsoleDebug.WriteLine("SpellDrawer loaded"); Menu drawMenu = Menu.IsSubMenu ? Menu.Parent.AddSubMenu("Draw", "Draw") : Menu.AddSubMenu("Draw", "Draw"); drawMenu.Add(ConfigValue.DrawSkillShots.Name(), new DynamicCheckBox(ConfigDataType.Data, ConfigValue.DrawSkillShots, "Draw SkillShots", true).CheckBox); drawMenu.Add(ConfigValue.DrawEvadeStatus.Name(), new DynamicCheckBox(ConfigDataType.Data, ConfigValue.DrawEvadeStatus, "Show EzEvade Status", true).CheckBox); drawMenu.Add(ConfigValue.DrawSpellPosition.Name(), new DynamicCheckBox(ConfigDataType.Data, ConfigValue.DrawSpellPosition, "Draw Spell Position", false).CheckBox); drawMenu.Add(ConfigValue.DrawEvadePosition.Name(), new DynamicCheckBox(ConfigDataType.Data, ConfigValue.DrawEvadePosition, "Draw EzEvade Position", false).CheckBox); Menu dangerMenu = drawMenu.Parent.AddSubMenu("Danger Drawings", "DangerLevelDrawings"); Menu lowDangerMenu = dangerMenu.Parent.AddSubMenu(" Low", "LowDrawing"); lowDangerMenu.Add(ConfigValue.LowDangerDrawWidth.Name(), new DynamicSlider(ConfigDataType.Data, ConfigValue.LowDangerDrawWidth, "Line Width", 3, 1, 15).Slider); lowDangerMenu.AddGroupLabel("Color"); LowDanger = new ColorConfig(lowDangerMenu, "LowDangerColorConfig", Color.LightGray); Menu normalDangerMenu = dangerMenu.Parent.AddSubMenu(" Normal", "NormalDrawing"); normalDangerMenu.Add(ConfigValue.NormalDangerDrawWidth.Name(), new DynamicSlider(ConfigDataType.Data, ConfigValue.NormalDangerDrawWidth, "Line Width", 3, 1, 15).Slider); normalDangerMenu.AddGroupLabel("Color"); NormalDanger = new ColorConfig(normalDangerMenu, "NormalDangerColorConfig", Color.White); Menu highDangerMenu = dangerMenu.Parent.AddSubMenu(" High", "HighDrawing"); highDangerMenu.Add(ConfigValue.HighDangerDrawWidth.Name(), new DynamicSlider(ConfigDataType.Data, ConfigValue.HighDangerDrawWidth, "Line Width", 4, 1, 15).Slider); highDangerMenu.AddGroupLabel("Color"); HighDanger = new ColorConfig(highDangerMenu, "HighDangerColorConfig", Color.Red); Menu extremeDangerMenu = dangerMenu.Parent.AddSubMenu(" Extreme", "ExtremeDrawing"); extremeDangerMenu.Add(ConfigValue.ExtremeDangerDrawWidth.Name(), new DynamicSlider(ConfigDataType.Data, ConfigValue.ExtremeDangerDrawWidth, "Line Width", 4, 1, 15).Slider); extremeDangerMenu.AddGroupLabel("Color"); ExtremeDanger = new ColorConfig(extremeDangerMenu, "ExtremeDangerColorConfig", Color.Red); /* * Menu undodgeableDangerMenu = new Menu("Undodgeable", "Undodgeable"); * undodgeableDangerMenu.AddItem(new MenuItem("Width", "Line Width").SetValue(new Slider(6, 1, 15))); * undodgeableDangerMenu.AddItem(new MenuItem("Color", "Color").SetValue(new Circle(true, Color.FromArgb(255, 255, 0, 0))));*/ }
private ColorConfig LoadConfig() { ResLoader loader = ResLoader.Allocate("ColorModule", null); UnityEngine.Object obj = loader.LoadSync("ColorConfig"); if (obj == null) { Log.e("Not Find Color Config."); loader.Recycle2Cache(); return(null); } //Log.i("Success Load SDK Config."); ColorConfig prefab = obj as ColorConfig; ColorConfig newAB = GameObject.Instantiate(prefab); loader.Recycle2Cache(); return(newAB); }
public Colors() { var info = new ExtensionInfo("Colors", "DivinityArcane", "1.0"); Events.AddCommand("colors", new Command(this, "cmd_colors", "DivinityArcane", 100, "Changes the bot's colors.", "[trig]colors on/off<br/>[trig]colors username/message #html_color_code", ext: info)); // Load saved data, if we can. Config = Storage.Load<ColorConfig>("colors"); if (Config.MessageColor == null) { Config.MessageColor = "000000"; Save(); } if (Config.UsernameColor == null) { Config.UsernameColor = "000000"; Save(); } }
Color[] GenerateColors(ColorConfig colorConfig, BackgroundColorConfig backgroundColorConfig) { var generatedColors = new Color[colorConfig.colorCountPerSprite]; if (colorConfig.usePaletteColors) { if (backgroundColorConfig.overrideBackgroundColor) { generatedColors[0] = backgroundColorConfig.backgroundColorOverride; } else if (backgroundColorConfig.randomPaletteColorForBackground) { generatedColors[0] = uniqueColorsInTextures[colorConfig.paletteIndex][ Random.Range(0, uniqueColorsInTextures[colorConfig.paletteIndex].Count - 1)]; } else { generatedColors[0] = uniqueColorsInTextures[colorConfig.paletteIndex][ backgroundColorConfig.paletteColorIndexForBackground]; } for (var index = 1; index < generatedColors.Length; index++) { generatedColors[index] = uniqueColorsInTextures[colorConfig.paletteIndex][Random.Range(0, uniqueColorsInTextures[colorConfig.paletteIndex].Count)]; //uniqueColorsInTextures.Remove(generatedColors[index]); } } else { generatedColors[0] = Color.black; for (var index = 1; index < generatedColors.Length; index++) { generatedColors[index] = Random.ColorHSV(0f, 1f, 1f, 1f); } } return(generatedColors); }
private ColorConfig GetColor(Dictionary <string, string> hexDict, Dictionary <string, string> predefinedDict, string entityType) { ColorConfig colorConfig = new ColorConfig(); colorConfig.itemLabel = entityType; if (predefinedDict.ContainsKey(entityType)) { string color = predefinedDict[entityType]; if (hexDict.ContainsKey(color)) { colorConfig.color = hexDict[color]; return(colorConfig); } } Random rnd = new Random(); Color randomColor = Color.FromArgb(rnd.Next(256), rnd.Next(256), rnd.Next(256)); colorConfig.color = "#" + randomColor.R.ToString("X2") + randomColor.G.ToString("X2") + randomColor.B.ToString("X2"); return(colorConfig); }
Color[] GenerateColors(ColorConfig colorConfig) { var generatedColors = new Color[colorConfig.colorCountPerSprite]; if (colorConfig.usePaletteColors) { for (var index = 1; index < generatedColors.Length; index++) { generatedColors[index] = uniqueColorsInTextures[colorConfig.paletteIndex][ Random.Range(0, uniqueColorsInTextures[colorConfig.paletteIndex].Count)]; } } else { for (var index = 0; index < generatedColors.Length; index++) { generatedColors[index] = Random.ColorHSV(0f, 1f, 1f, 1f); } } return(generatedColors); }
private void setHeader(ColorConfig colorConfig) { // ヘッダービュー作成 //DevAge.Drawing.VisualElements.ColumnHeader headerBackground = new DevAge.Drawing.VisualElements.ColumnHeader(); //headerBackground.BackColor = colorConfig.HeaderBackgroundColor; //headerBackground.Border = DevAge.Drawing.RectangleBorder.NoBorder; //headerBackground.BackgroundColorStyle = BackgroundColorStyle.Solid; //headerBackground.Style = ControlDrawStyle.Hot; //headerBackground.Border = DevAge.Drawing.RectangleBorder.NoBorder; //SourceGrid.Cells.Views.ColumnHeader headerView = new SourceGrid.Cells.Views.ColumnHeader(); //headerView.Background = headerBackground; //headerView.ForeColor = colorConfig.HeaderFontColor; // SourceGrid用イベント初期化 //ColumnHeaderClickEvent columnHeaderClickEvent = new ColumnHeaderClickEvent(); //SourceGrid.Cells.Controllers.SortableHeader sortableHeader = new SourceGrid.Cells.Controllers.SortableHeader(); // ヘッダビューをセット //this.setHeaderView(0, headerView); }
public ColorOutcome Recolor( ref GeneratedVoxelModel generatedVoxel, ColorConfig configurationColorConfig, BackgroundColorConfig configurationBackgroundColorConfig, OutlineConfig configurationOutlineConfig) { // generate the colors to use for the model var colorOutcome = new ColorOutcome(); colorOutcome.generatedColors = GenerateColors(configurationColorConfig); // get the current (grayscale) colors of the model var colors = generatedVoxel.modelData.GetPixels(); // determine how many different colors we will have in the final model var increment = 1f / configurationColorConfig.colorCountPerSprite; // create a new list to hold the new colors for the voxels var newColors = new Color[colors.Length]; // loop through each grayscale color and re-assign it to the new color according to the grayscale range for (var index = 0; index < colors.Length; index++) { var color = colors[index]; var gray = color.grayscale; for (var i = 0; i < configurationColorConfig.colorCountPerSprite; i++) { if (gray >= i * increment && gray <= (i + 1) * increment) { newColors[index] = colorOutcome.generatedColors[i]; } } } // set the values generatedVoxel.modelData.SetPixels(newColors); generatedVoxel.modelData.Apply(); return(colorOutcome); }
public static Color32 Get(ColorConfig colorConfig) { switch (colorConfig) { default: case ColorConfig.InterfaceDark: return(InterfaceDark); case ColorConfig.Damage: return(Damage); case ColorConfig.StandardLog: return(LogStandard); case ColorConfig.FloatStandard: return(FloatStandard); case ColorConfig.InterfaceNormal: return(InterfaceNormal); case ColorConfig.InterfaceNormalOffColor: return(InterfaceNormalOffColor); } }
static Draw() { DrawMenu.AddGroupLabel("Büyü Gösterge Ayarları :"); _drawReady = DrawMenu.Add("drawOnlyWhenReady", new CheckBox("Büyü hazırsa göster ?")); _drawHealth = DrawMenu.Add("damageIndicatorDraw", new CheckBox("Hasar tespitçisi göster ?")); _drawPercent = DrawMenu.Add("percentageIndicatorDraw", new CheckBox("Hasarı yüzde olarka göster ?")); _drawStatiscs = DrawMenu.Add("statiscsIndicatorDraw", new CheckBox("Hasar istatistiklerini göster ?")); DrawMenu.AddSeparator(1); _drawQ = DrawMenu.Add("qDraw", new CheckBox("Göster Q Menzili ?")); _drawW = DrawMenu.Add("wDraw", new CheckBox("Göster W Menzili ?")); _drawE = DrawMenu.Add("eDraw", new CheckBox("Göster E Menzili ?")); _drawR = DrawMenu.Add("rDraw", new CheckBox("Göster R Menzili ?")); _healthColor = new ColorConfig(DrawMenu, "healthColorConfig", Color.Orange, "Hasartespiti rengi:"); _qColor = new ColorConfig(DrawMenu, "qColorConfig", Color.Blue, "Renk Q:"); _wColor = new ColorConfig(DrawMenu, "wColorConfig", Color.Red, "Renk W:"); _eColor = new ColorConfig(DrawMenu, "eColorConfig", Color.DeepPink, "Renk E:"); _rColor = new ColorConfig(DrawMenu, "rColorConfig", Color.Yellow, "Renk R:"); }
static Draw() { DrawMenu.AddGroupLabel("Spell drawings Settings :"); _drawReady = DrawMenu.Add("drawOnlyWhenReady", new CheckBox("Draw the spells only if they are ready ?")); _drawHealth = DrawMenu.Add("damageIndicatorDraw", new CheckBox("Draw damage indicator ?")); _drawPercent = DrawMenu.Add("percentageIndicatorDraw", new CheckBox("Draw damage percentage ?")); DrawMenu.AddSeparator(1); _drawQ = DrawMenu.Add("qDraw", new CheckBox("Draw Q spell range ?")); _drawW = DrawMenu.Add("wDraw", new CheckBox("Draw W spell range ?")); _drawE = DrawMenu.Add("eDraw", new CheckBox("Draw E spell range ?")); _drawR = DrawMenu.Add("rDraw", new CheckBox("Draw R spell range ?")); _healthColor = new ColorConfig(DrawMenu, "healthColorConfig", Color.Orange, "Color Damage Indicator:"); _qColor = new ColorConfig(DrawMenu, "qColorConfig", Color.Blue, "Color Q:"); _wColor = new ColorConfig(DrawMenu, "wColorConfig", Color.Red, "Color W:"); _eColor = new ColorConfig(DrawMenu, "eColorConfig", Color.DeepPink, "Color E:"); _rColor = new ColorConfig(DrawMenu, "rColorConfig", Color.Yellow, "Color R:"); }
static void SetupConfigs() { ColorConfig.Load(); HotKeys.Config.Load(); }
//Usada no menu para salvar a configuração de cores do jogador public void setColorConfig(ColorConfig newColor, bool useColor) { this.useColor = useColor; this.configColor = newColor; }
static Draw() { DrawMenu.AddGroupLabel("Gösterge :"); _drawReady = DrawMenu.Add("drawOnlyWhenReady", new CheckBox("Büyü Hazırsa Göster ?")); _drawHealth = DrawMenu.Add("damageIndicatorDraw", new CheckBox("Göster Hasar Tespiti ?")); _drawPercent = DrawMenu.Add("percentageIndicatorDraw", new CheckBox("Hasarı Yüzde Olarak Göster ?")); DrawMenu.AddSeparator(1); _drawQ = DrawMenu.Add("qDraw", new CheckBox("Göster Q Menzili ?")); _drawW = DrawMenu.Add("wDraw", new CheckBox("Göster W Menzili ?")); _drawE = DrawMenu.Add("eDraw", new CheckBox("Göster E Menzili ?")); _drawR = DrawMenu.Add("rDraw", new CheckBox("Göster R Menzili ?")); _healthColor = new ColorConfig(DrawMenu, "healthColorConfig", Color.Orange, "Renkli Hasar Tespiti:"); _qColor = new ColorConfig(DrawMenu, "qColorConfig", Color.Blue, "Renk Q:"); _wColor = new ColorConfig(DrawMenu, "wColorConfig", Color.Red, "Renk W:"); _eColor = new ColorConfig(DrawMenu, "eColorConfig", Color.DeepPink, "Renk E:"); _rColor = new ColorConfig(DrawMenu, "rColorConfig", Color.Yellow, "Renk R:"); }