static void _BuildPropertyTabView(EditorControl parent) { VBoxCtrl vb0 = new VBoxCtrl(); vb0.Caption = "属性"; parent.Add(vb0); ComboBoxCtrl <int> deathTypeComboBox = new ComboBoxCtrl <int>(); deathTypeComboBox.Name = s_deathTypeComboBoxName; deathTypeComboBox.Caption = "死亡类型"; deathTypeComboBox.onValueChange = OnDeathTypeComboBoxValueChange; vb0.Add(deathTypeComboBox); VBoxCtrl vb1 = new VBoxCtrl(); vb1.Caption = "骨骼绑定"; parent.Add(vb1); ComboBoxCtrl <int> bindingTargetComboBox = new ComboBoxCtrl <int>(); bindingTargetComboBox.Name = s_bindingTargetComboBoxName; bindingTargetComboBox.Caption = "绑定骨骼"; bindingTargetComboBox.onValueChange = OnBindingTargetComboBoxValueChange; vb1.Add(bindingTargetComboBox); TextBoxCtrl bindingTargetTextBox = new TextBoxCtrl(); bindingTargetTextBox.Name = s_bindingTargetTextBoxName; bindingTargetTextBox.Caption = "绑定骨骼路径"; bindingTargetTextBox.Enable = false; vb1.Add(bindingTargetTextBox); }
static void _BuildMenuButtons(EditorControl parent) { Rect btnRect = new Rect(0, 0, 60, 20); //Rect undoRect = new Rect(0, 0, 120, 20); //Rect colorCtrlRect = new Rect(0, 0, 200, 20); //Rect returnBtnRect = new Rect(0, 0, 120, 20); ButtonCtrl newBtn = new ButtonCtrl(); newBtn.Name = s_newBtnName; newBtn.Caption = "新建"; newBtn.Size = btnRect; newBtn.onClick = OnNewBtnClick; parent.Add(newBtn); ButtonCtrl saveBtn = new ButtonCtrl(); saveBtn.Name = s_saveBtnName; saveBtn.Caption = "保存"; saveBtn.Size = btnRect; saveBtn.onClick = OnSaveBtnClick; parent.Add(saveBtn); ButtonCtrl undoBtn = new ButtonCtrl(); undoBtn.Name = s_undoBtnName; undoBtn.Caption = "撤消"; undoBtn.Size = btnRect; undoBtn.onClick = OnUndoBtnClick; parent.Add(undoBtn); ButtonCtrl redoBtn = new ButtonCtrl(); redoBtn.Name = s_redoBtnName; redoBtn.Caption = "重做"; redoBtn.Size = btnRect; redoBtn.onClick = OnRedoBtnClick; parent.Add(redoBtn); TextBoxCtrl openFileTextBox = new TextBoxCtrl(); openFileTextBox.Name = s_openFileTextBoxName; openFileTextBox.Caption = "当前打开文件"; openFileTextBox.Enable = false; openFileTextBox.Text = "空"; openFileTextBox.Size = new Rect(0, 0, 150, 20); parent.Add(openFileTextBox); ObjectFieldCtrl previewModelCtrl = new ObjectFieldCtrl(); previewModelCtrl.Name = s_previewModelCtrlName; previewModelCtrl.Caption = "预览模型"; previewModelCtrl.ObjectType = typeof(GameObject); previewModelCtrl.IsAlowSceneObjects = false; previewModelCtrl.onValueChange = OnPreviewModelValueChanged; parent.Add(previewModelCtrl); }