SetAlignment() public method

public SetAlignment ( Alignment wrapAlign ) : void
wrapAlign Alignment
return void
コード例 #1
0
        public TextButton(string text, TextButtonStyle style)
        {
            Style = style;

            _label = new Label(text, new LabelStyle(style.Font, style.FontColor));
            _label.SetAlignment(Alignment.Center);

            Add(_label).Configure.Expand().Fill();
            Width  = PrefWidth;
            Height = PrefHeight;
        }
コード例 #2
0
ファイル: TextButton.cs プロジェクト: jaquadro/MonoGdx
        public TextButton(string text, TextButtonStyle style)
        {
            Style = style;

            _label = new Label(text, new LabelStyle(style.Font, style.FontColor));
            _label.SetAlignment(Alignment.Center);

            Add(_label).Configure.Expand().Fill();
            Width = PrefWidth;
            Height = PrefHeight;
        }
コード例 #3
0
        public CheckBox(string text, CheckBoxStyle style)
            : base(text, style)
        {
            ClearChildren();
            Add(_image = new Image(style.CheckboxOff));
            Add(Label);

            Label.SetAlignment(Alignment.Left);
            Width    = PrefWidth;
            Height   = PrefHeight;
            IsToggle = true;
        }
コード例 #4
0
        public ImageTextButton(string text, ImageTextButtonStyle style)
            : base(style)
        {
            _style = style;

            Defaults().Configure.Space(3);

            _image         = new Image();
            _image.Scaling = Scaling.Fit;
            Add(_image);

            _label = new Label(text, new LabelStyle(style.Font, style.FontColor));
            _label.SetAlignment(Alignment.Center);
            Add(_label);

            Width  = PrefWidth;
            Height = PrefHeight;
        }
コード例 #5
0
ファイル: ImageTextButton.cs プロジェクト: jaquadro/MonoGdx
        public ImageTextButton(string text, ImageTextButtonStyle style)
            : base(style)
        {
            _style = style;

            Defaults().Configure.Space(3);

            _image = new Image();
            _image.Scaling = Scaling.Fit;
            Add(_image);

            _label = new Label(text, new LabelStyle(style.Font, style.FontColor));
            _label.SetAlignment(Alignment.Center);
            Add(_label);

            Width = PrefWidth;
            Height = PrefHeight;
        }