コード例 #1
0
ファイル: EntityBaseView.cs プロジェクト: mtrupkin/StarRL
        public EntityBaseView(Composite parent)
            : base(parent)
        {
            EntityType = new TextWidget(this);
            Name = new TextWidget(this);
            Position = new PointWidget(this);

            AddControl(EntityType);
            AddControl(Name);
            AddControl(Position);
        }
コード例 #2
0
        public EntityDetailComposite(Composite parent, String title)
            : base(parent)
        {
            TitleWidget = new TextWidget(this, String.Format("--{0}", title));

            NameWidget = new TextWidget(this);

            PositionWidget = new PointWidget(this);
            PositionWidget.SetEnabled(false);

            AddControl(TitleWidget);
            AddControl(NameWidget);
            AddControl(PositionWidget);
        }
コード例 #3
0
ファイル: MenuScreen.cs プロジェクト: mtrupkin/StarRL
        public MenuScreen(Composite parent)
            : base(parent)
        {
            AddControl(new SpacerWidget(this, 1, 5), HorizontalJustify.Center);
            var titleWidget = new TextWidget(this, "Star Rogue");
            AddControl(new BoxWidget(titleWidget, 1), HorizontalJustify.Center);
            //AddControl(titleWidget, HorizontalJustify.Center);

            var stackedComposite = new StackedComposite(this);
            NewListWidget = new ListWidget<Option>(stackedComposite);
            ContinueListWidget = new ListWidget<Option>(stackedComposite);

            //stackedComposite.AddControl(new LayoutData(NewListWidget) { HorizontalJustify = HorizontalJustify.Center, VerticalJustify = VerticalJustify.Center });
            //stackedComposite.AddControl(new LayoutData(ContinueListWidget) { HorizontalJustify = HorizontalJustify.Center, VerticalJustify = VerticalJustify.Center });
            stackedComposite.AddControl(NewListWidget);
            stackedComposite.AddControl(ContinueListWidget);

            AddControl(new SpacerWidget(this, 1, 5), HorizontalJustify.Center);
            //AddControl(new BoxWidget(stackedComposite, 1), HorizontalJustify.Center);
            AddControl(stackedComposite, HorizontalJustify.Center);
            //AddControl(ContinueListWidget);
        }