Exemplo n.º 1
0
        public TreeViewElement(CheckBoxProps checkBoxProps) : base(checkBoxProps)
        {
            p_previousSize = checkBoxProps.Size;
            p_SpaceAfter   = new Vector2(0, 2);
            p_SpaceBefore  = new Vector2(0, 2);

            p_LayoutState = LayoutState.SizeToContent;
        }
Exemplo n.º 2
0
        public CheckBox(CheckBoxProps checkBoxProps) : base(checkBoxProps)
        {
            TextParagraph      = UiManager.DefaultParagraph(checkBoxProps.Text, Anchor.Auto);
            TextParagraph.Size = new Vector2(0, 10);
            TextParagraph.SetOffset(new Vector2(25, 0));
            TextParagraph.p_HiddenInternalEntity = true;
            AddChild(TextParagraph, true);

            PromiscuousClicksMode = true;

            CHECKBOX_SIZE = checkBoxProps.CheckBoxSize != Vector2.Zero ? checkBoxProps.CheckBoxSize : new Vector2(16, 16);
            Checked       = checkBoxProps.IsChecked;
        }