예제 #1
0
 private void btnGenerateUniqueName_MouseDown(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Right)
     {
         CreatureDataRequested?.Invoke(this, true); // TODO doesn't get called when right-clicking. Why?
     }
 }
예제 #2
0
 private void btnGenerateUniqueName_Click(object sender, EventArgs e)
 {
     if (speciesIndex >= 0 && speciesIndex < Values.V.species.Count)
     {
         CreatureDataRequested?.Invoke(this);
     }
 }
예제 #3
0
        private void btnGenerateUniqueName_Click(object sender, EventArgs e)
        {
            MouseEventArgs me = (MouseEventArgs)e;

            if (me.Button == MouseButtons.Left)
            {
                if (speciesIndex >= 0 && speciesIndex < Values.V.species.Count)
                {
                    CreatureDataRequested?.Invoke(this, false);
                }
            }
        }
예제 #4
0
        public CreatureInfoInput()
        {
            InitializeComponent();
            _selectedSpecies             = null;
            textBoxName.Text             = string.Empty;
            parentComboBoxMother.naLabel = " - " + Loc.S("Mother") + " n/a";
            parentComboBoxMother.Items.Add(" - " + Loc.S("Mother") + " n/a");
            parentComboBoxFather.naLabel = " - " + Loc.S("Father") + " n/a";
            parentComboBoxFather.Items.Add(" - " + Loc.S("Father") + " n/a");
            parentComboBoxMother.SelectedIndex = 0;
            parentComboBoxFather.SelectedIndex = 0;
            _updateMaturation   = true;
            _regionColorIDs     = new int[6];
            CooldownUntil       = new DateTime(2000, 1, 1);
            GrowingUntil        = new DateTime(2000, 1, 1);
            NamesOfAllCreatures = new List <string>();

            var namingPatternButtons = new List <Button> {
                btnGenerateUniqueName, btNamingPattern2, btNamingPattern3, btNamingPattern4, btNamingPattern5, btNamingPattern6
            };

            for (int bi = 0; bi < namingPatternButtons.Count; bi++)
            {
                int localIndex = bi;
                // apply naming pattern
                namingPatternButtons[bi].Click += (s, e) =>
                {
                    if (_selectedSpecies != null)
                    {
                        CreatureDataRequested?.Invoke(this, false, false, true, localIndex);
                    }
                };
                // open naming pattern editor
                namingPatternButtons[bi].MouseDown += (s, e) =>
                {
                    if (e.Button == MouseButtons.Right)
                    {
                        CreatureDataRequested?.Invoke(this, true, false, false, localIndex);
                    }
                };
            }

            // set tooltips
            _tt = new ToolTip();
            _tt.SetToolTip(LbArkId, "The real Ark id of the creature, not directly shown in game.\nEach creature has its id stored in two 32 bit integers (id1, id2), this value is created by (id1 << 32) | id2");
            _tt.SetToolTip(LbArkIdIngame, "The id of the creature like it is shown in game.\nIt is created by the game by two 32 bit integers which are concatenated as strings.");

            regionColorChooser1.RegionColorChosen += UpdateRegionColorImage;
        }
예제 #5
0
        public CreatureInfoInput()
        {
            InitializeComponent();
            _selectedSpecies             = null;
            textBoxName.Text             = string.Empty;
            parentComboBoxMother.naLabel = " - " + Loc.S("Mother") + " n/a";
            parentComboBoxMother.Items.Add(" - " + Loc.S("Mother") + " n/a");
            parentComboBoxFather.naLabel = " - " + Loc.S("Father") + " n/a";
            parentComboBoxFather.Items.Add(" - " + Loc.S("Father") + " n/a");
            parentComboBoxMother.SelectedIndex = 0;
            parentComboBoxFather.SelectedIndex = 0;
            _updateMaturation   = true;
            _regionColorIDs     = new int[6];
            CooldownUntil       = new DateTime(2000, 1, 1);
            GrowingUntil        = new DateTime(2000, 1, 1);
            NamesOfAllCreatures = new List <string>();

            var namingPatternButtons = new List <Button> {
                btnGenerateUniqueName, btNamingPattern2, btNamingPattern3, btNamingPattern4, btNamingPattern5, btNamingPattern6
            };

            for (int bi = 0; bi < namingPatternButtons.Count; bi++)
            {
                int localIndex = bi;
                // apply naming pattern
                namingPatternButtons[bi].Click += (s, e) =>
                {
                    if (_selectedSpecies != null)
                    {
                        CreatureDataRequested?.Invoke(this, false, true, localIndex);
                    }
                };
                // open naming pattern editor
                namingPatternButtons[bi].MouseDown += (s, e) =>
                {
                    if (e.Button == MouseButtons.Right)
                    {
                        CreatureDataRequested?.Invoke(this, true, false, localIndex);
                    }
                };
            }
            _tt = new ToolTip();

            regionColorChooser1.RegionColorChosen += UpdateRegionColorImage;
        }