コード例 #1
0
        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;
        }
コード例 #2
0
        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;
        }
コード例 #3
0
    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();
    }
コード例 #4
0
    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;
    }
コード例 #5
0
 protected override void OnApplyChanges()
 {
     base.OnApplyChanges();
     EditObject.Style = EditStyle.Copy();
 }
コード例 #6
0
 private void AddStyleProperties()
 {
     StyleProperties = EditStyle.GetUIComponents(EditObject, PropertiesPanel, true);
 }
コード例 #7
0
 private void AddStyleProperties() => StyleProperties = EditStyle.GetUIComponents(EditObject, PropertiesPanel, isTemplate: true);