private void InitModelPanel() { List <string> names = new List <string>(); for (int i = 0; i < datafile.GetNumModels(); i++) { names.Add(datafile.GetModelName(i)); } polymodelPanel.Init(names.ToArray()); names.Clear(); //annoying hack, need a different list for the replacement box for (int i = 0; i < datafile.GetNumModels(); i++) { names.Add(datafile.GetModelName(i, true)); } string[] nameArray = names.ToArray(); ReplacedElementComboBox.Items.Clear(); ReplacedElementComboBox.Items.AddRange(nameArray); }
private void UpdateRobotAnimation() { if (robot.ModelNum >= hxmFile.GetNumModels()) { BaseJointSpinner.Value = 0; NumJointsTextBox.Text = "0"; UnallocatedModelWarning.Visible = true; } else { UnallocatedModelWarning.Visible = false; if (hxmFile.GetModel(robot.ModelNum).isAnimated) { RobotAnimationCheckbox.Checked = true; BaseJointSpinner.Value = (Decimal)robot.baseJoint; } else { RobotAnimationCheckbox.Checked = false; } NumJointsTextBox.Text = (Robot.NUM_ANIMATION_STATES * (hxmFile.GetModel(robot.ModelNum).NumSubmodels - 1)).ToString(); } }
private void InitModelPanel() { cbModelLowDetail.Items.Clear(); cbModelLowDetail.Items.Add("None"); cbModelDyingModel.Items.Clear(); cbModelDyingModel.Items.Add("None"); cbModelDeadModel.Items.Clear(); cbModelDeadModel.Items.Add("None"); for (int i = 0; i < datafile.GetNumModels(); i++) { cbModelLowDetail.Items.Add(datafile.GetModelName(i)); cbModelDyingModel.Items.Add(datafile.GetModelName(i)); cbModelDeadModel.Items.Add(datafile.GetModelName(i)); } ReplacedElementComboBox.Items.Clear(); for (int i = 0; i < 200; i++) { ReplacedElementComboBox.Items.Add(datafile.GetModelName(i, true)); } }