Exemplo n.º 1
0
 private void chooseColor(int region, Button sender)
 {
     if (!colorPicker.isShown && colorRegions != null)
     {
         colorPicker.SetColors(colorIDs, region, colorRegions[region].name, colorRegions[region].colorIds);
         if (colorPicker.ShowDialog() == DialogResult.OK)
         {
             // color was chosen
             setColorButton(sender, species.CreatureColors.creatureColor(colorIDs[region]));
             RegionColorChosen?.Invoke();
         }
     }
 }
Exemplo n.º 2
0
 private void ChooseColor(int region, Button sender)
 {
     if (!colorPicker.isShown && colorRegions != null && region < colorRegions.Count)
     {
         colorPicker.SetColors(_colorIDs, region, colorRegions[region].name, colorRegions[region]?.naturalColors);
         if (colorPicker.ShowDialog() == DialogResult.OK)
         {
             // color was chosen
             SetColorButton(sender, region);
             RegionColorChosen?.Invoke();
         }
     }
 }
Exemplo n.º 3
0
 private void chooseColor(int region, Button sender)
 {
     if (creatureList[0] != null && !cp.isShown)
     {
         cp.SetColors(colors, region, "Region " + region);
         if (cp.ShowDialog() == DialogResult.OK)
         {
             // color was chosen
             setColorButton(sender, species.CreatureColors.creatureColor(colors[region]));
             pictureBox1.Image = CreatureColored.getColoredCreature(colors, uniqueSpecies ? creatureList[0].species : "",
                                                                    new[] { true, true, true, true, true, true });
         }
     }
 }
 private void ChooseColor(int region, Button sender)
 {
     if (!_colorPicker.isShown && _colorRegions != null && region < Species.ColorRegionCount)
     {
         _colorPicker.SetColors(_selectedRegionColorIds[region], _colorRegions[region].name, _colorRegions[region]?.naturalColors);
         if (_colorPicker.ShowDialog() == DialogResult.OK)
         {
             // color was chosen
             _selectedRegionColorIds[region] = _colorPicker.SelectedColorId;
             SetColorButton(sender, region);
             RegionColorChosen?.Invoke();
         }
     }
 }
Exemplo n.º 5
0
 private void chooseColor(int region, Button sender)
 {
     if (creatureList[0] != null && !cp.isShown)
     {
         cp.SetColors(colors[region], "Region " + region);
         if (cp.ShowDialog() == DialogResult.OK)
         {
             // color was chosen
             colors[region] = cp.SelectedColorId;
             sender.SetBackColorAndAccordingForeColor(CreatureColors.CreatureColor(colors[region]));
             pictureBox1.SetImageAndDisposeOld(CreatureColored.GetColoredCreature(colors, uniqueSpecies ? creatureList[0].Species : null,
                                                                                  new[] { true, true, true, true, true, true }));
         }
     }
 }