public Form_UITypeEditor_DashStyle(IWindowsFormsEditorService wfes, HatchStyle style) { editStyle = EditStyle.hatch; InitializeComponent(); foreach (HatchStyle h in HatchStyle.GetValues(typeof(HatchStyle))) { listBox1.Items.Add(h); } _wfes = wfes; _style = style; }
public Form_UITypeEditor_DashStyle(IWindowsFormsEditorService wfes, LineDashStyle style) { editStyle = EditStyle.dash; InitializeComponent(); foreach (LineDashStyle s in Enum.GetValues(typeof(LineDashStyle))) { listBox1.Items.Add(s); } _wfes = wfes; _style = style; }
public void SetEditType(ButtonMenuItem buttonItem) { editStyle = buttonItem.EditStyle; Color buttonHighlight = buttonItem.ButtonImage.color; CurrentItem.ButtonImage.color = buttonHighlight; buttonHighlight.a = 0; buttonItem.ButtonImage.color = buttonHighlight; editStyle = buttonItem.EditStyle; CurrentItem = buttonItem; UpdateEditStyle(); }
private void Start() { Ray mouseRay = Camera.main.ScreenPointToRay(Input.mousePosition); Physics.Raycast(mouseRay, out RaycastHit gridPosition, int.MaxValue, BuildMask); ghostObject = Instantiate(CurrentObject, FixToGrid(gridPosition.point, /*ghostObject.GetComponent<Renderer>().bounds.size.y / 2*/ 0.001f), new Quaternion()); ghostObject.GetComponent <Renderer>().materials = SetTextureAndRenderMode(ghostObject.GetComponent <Renderer>().materials, ObjectTexture); ghostObject.GetComponent <Renderer>().materials[0] = GhostifyMaterial(ghostObject.GetComponent <Renderer>().materials[0], 2); Color buttonHighlight = CurrentItem.ButtonImage.color; buttonHighlight.a = 0; CurrentItem.ButtonImage.color = buttonHighlight; editStyle = CurrentItem.EditStyle; }
protected override void OnApplyChanges() { base.OnApplyChanges(); EditObject.Style = EditStyle.Copy(); }
private void AddStyleProperties() { StyleProperties = EditStyle.GetUIComponents(EditObject, PropertiesPanel, true); }
private void AddStyleProperties() => StyleProperties = EditStyle.GetUIComponents(EditObject, PropertiesPanel, isTemplate: true);