コード例 #1
0
 public void updateLabel()
 {
     if (creature != null)
     {
         labelSex.Text  = Utils.sexSymbol(creature.sex);
         groupBox1.Text = creature.name + " (Lvl " + creature.level + "/" + (creature.levelHatched + maxDomLevel) + ")";
         if (creature.Mother != null || creature.Father != null)
         {
             labelParents.Text = "";
             if (creature.Mother != null)
             {
                 labelParents.Text = "Mo: " + creature.Mother.name;
             }
             if (creature.Father != null && creature.Mother != null)
             {
                 labelParents.Text += "; ";
             }
             if (creature.Father != null)
             {
                 labelParents.Text += "Fa: " + creature.Father.name;
             }
         }
         else if (creature.isBred)
         {
             labelParents.Text = "bred, click 'edit' to add parents";
         }
         else
         {
             labelParents.Text = "found wild " + creature.levelFound + (creature.tamingEff >= 0 ? ", tamed with TE: " + (creature.tamingEff * 100).ToString("N1") + "%" : ", TE unknown.");
         }
         for (int s = 0; s < 8; s++)
         {
             updateStat(s);
         }
         labelNotes.Text   = creature.note;
         labelSpecies.Text = creature.species;
         pictureBox1.Image = CreatureColored.getColoredCreature(creature.colors, creature.species, colorRegionUseds);
         tt.SetToolTip(pictureBox1, CreatureColored.RegionColorInfo(creature.species, creature.colors));
         pictureBox1.Visible = true;
     }
 }
コード例 #2
0
        public void UpdateLabel()
        {
            LbMotherAndWildInfo.Text = "";
            if (_creature != null)
            {
                groupBox1.Text = $"{_creature.name} (Lvl {_creature.Level}/{_creature.LevelHatched + _cc.maxDomLevel})";

                void SetParentLabel(Label l, string lbText = null, bool clickable = false)
                {
                    l.Text   = lbText;
                    l.Cursor = clickable ? Cursors.Hand : null;
                    _tt.SetToolTip(l, clickable ? lbText : null);
                }

                if (_creature.Mother != null || _creature.Father != null)
                {
                    SetParentLabel(LbMotherAndWildInfo, _creature.Mother != null ? $"{Loc.S("Mother")}: {_creature.Mother.name}" : null, _creature.Mother != null);
                    SetParentLabel(LbFather, _creature.Father != null ? $"{Loc.S("Father")}: {_creature.Father.name}" : null, _creature.Father != null);
                }
                else if (_creature.isBred)
                {
                    SetParentLabel(LbMotherAndWildInfo, "bred, click 'edit' to add parents");
                    SetParentLabel(LbFather);
                }
                else
                {
                    SetParentLabel(LbMotherAndWildInfo, "found wild " + _creature.levelFound + (_creature.tamingEff >= 0 ? ", tamed with TE: " + (_creature.tamingEff * 100).ToString("N1") + "%" : ", TE unknown."));
                    SetParentLabel(LbFather);
                }
                statsDisplay1.SetCreatureValues(_creature);
                labelNotes.Text = _creature.note;
                _tt.SetToolTip(labelNotes, _creature.note);
                labelSpecies.Text = _creature.Species.name;
                pictureBox1.SetImageAndDisposeOld(CreatureColored.GetColoredCreature(_creature.colors, _creature.Species, _colorRegionUseds, creatureSex: _creature.sex));
                _tt.SetToolTip(pictureBox1, CreatureColored.RegionColorInfo(_creature.Species, _creature.colors)
                               + "\n\nClick to copy creature infos as image to the clipboard");
                pictureBox1.Visible = true;
            }
        }
コード例 #3
0
 public void UpdateLabel()
 {
     labelParents.Text = "";
     if (creature != null)
     {
         groupBox1.Text = $"{creature.name} (Lvl {creature.Level}/{creature.LevelHatched + cc.maxDomLevel})";
         if (creature.Mother != null || creature.Father != null)
         {
             if (creature.Mother != null)
             {
                 labelParents.Text = "Mo: " + creature.Mother.name;
             }
             if (creature.Father != null && creature.Mother != null)
             {
                 labelParents.Text += "; ";
             }
             if (creature.Father != null)
             {
                 labelParents.Text += "Fa: " + creature.Father.name;
             }
         }
         else if (creature.isBred)
         {
             labelParents.Text = "bred, click 'edit' to add parents";
         }
         else
         {
             labelParents.Text = "found wild " + creature.levelFound + (creature.tamingEff >= 0 ? ", tamed with TE: " + (creature.tamingEff * 100).ToString("N1") + "%" : ", TE unknown.");
         }
         statsDisplay1.SetCreatureValues(creature);
         labelNotes.Text   = creature.note;
         labelSpecies.Text = creature.Species.name;
         pictureBox1.Image = CreatureColored.getColoredCreature(creature.colors, creature.Species, colorRegionUseds);
         tt.SetToolTip(pictureBox1, CreatureColored.RegionColorInfo(creature.Species, creature.colors)
                       + "\n\nClick to copy creature infos as image to the clipboard");
         pictureBox1.Visible = true;
     }
 }