public GalaxyMasterComposite(Composite parent)
            : base(parent)
        {
            GalaxyControl = new EntityDisplayControl(this);

            AddControl(GalaxyControl);
        }
        public SystemMasterComposite(Composite parent)
            : base(parent)
        {
            SystemControl = new EntityDisplayControl(parent);

            AddControl(SystemControl);
        }
Beispiel #3
0
        public PointWidget(Composite parent)
            : base(parent)
        {
            Point = new Point();

            Resize(9, 1);
            Resize();
        }
Beispiel #4
0
        public SystemScreen(Composite parent)
            : base(parent)
        {
            SystemMasterComposite = new SystemMasterComposite(this);
            SystemDetailComposite = new SystemDetailComposite(this) { GrabHorizontal = true, };

            var masterBoxWidget = new BoxWidget(SystemMasterComposite) { GrabHorizontal = true, GrabVertical = true };
            var detailBoxWidget = new BoxWidget(SystemDetailComposite) { GrabHorizontal = true, GrabVertical = true };
            AddControl(masterBoxWidget);
            AddControl(detailBoxWidget);
        }
Beispiel #5
0
        public EntityBaseView(Composite parent)
            : base(parent)
        {
            EntityType = new TextWidget(this);
            Name = new TextWidget(this);
            Position = new PointWidget(this);

            AddControl(EntityType);
            AddControl(Name);
            AddControl(Position);
        }
Beispiel #6
0
        public ControlBase(Composite parent)
            : base()
        {
            if (parent == null)
            {
                throw new ArgumentNullException("parent");
            }

            Parent = parent;
            Screen = CreateScreen(1, 1);
        }
Beispiel #7
0
        public FlagshipGameScreen(Composite parent)
            : base(parent)
        {
            GalaxyScreen = new GalaxyScreen(parent) { GrabHorizontal = true, GrabVertical = false };

            SystemScreen = new SystemScreen(parent) { GrabHorizontal = true, GrabVertical = false };
            SystemScreen.SetEnabled(false);

            AddControl(GalaxyScreen);
            AddControl(SystemScreen);
        }
Beispiel #8
0
        public MainScreen(Composite parent)
            : base(parent)
        {
            MenuScreen = new MenuScreen(parent) { GrabHorizontal = true, GrabVertical = true };

            GameScreen = new FlagshipGameScreen(parent) { GrabHorizontal = true, GrabVertical = false };

            AddControl(new LayoutData(MenuScreen) { VerticalJustify = VerticalJustify.Center });

            AddControl(GameScreen);
        }
Beispiel #9
0
        public GalaxyScreen(Composite parent)
            : base(parent)
        {
            GalaxyMasterComposite = new GalaxyMasterComposite(this);
            GalaxyDetailComposite = new GalaxyDetailComposite(this) { GrabHorizontal = true, };

            var masterBoxWidget = new BoxWidget(GalaxyMasterComposite) { GrabHorizontal = true, GrabVertical = true };
            var detailBoxWidget = new BoxWidget(GalaxyDetailComposite) { GrabHorizontal = true, GrabVertical = true };

            AddControl(masterBoxWidget);
            AddControl(detailBoxWidget);
        }
        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);
        }
        public SystemDetailComposite(Composite parent)
            : base(parent)
        {
            var detailComposite = new VerticalComposite(this);

            FlagshipDetailControl = new ShipDetailComposite(detailComposite, "Flagship") { GrabHorizontal = true };
            TargetDetailControl = new EntityBaseView(detailComposite);

            detailComposite.AddControl(FlagshipDetailControl);
            detailComposite.AddControl(TargetDetailControl);

            AddControl(detailComposite);

            // TODO move to bottom of control

            TimeWidget = new TimeWidget(this);
            var timeLayout = new VerticalLayoutData(TimeWidget) { VerticalJustify = VerticalJustify.Bottom, HorizontalJustify = HorizontalJustify.Right };
            AddControl(timeLayout);
        }
Beispiel #12
0
        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);
        }
Beispiel #13
0
        public MainScreen(Composite parent)
            : base(parent)
        {
            var widget1 = new FrameWidget(this,5,1)
            {
                GrabVertical = true,
            };
            var data1 = new HorizontalLayoutData(widget1)
            ;
            var widget2 = new FrameWidget(this,5,1)
            {
                GrabVertical = true,
                GrabHorizontal = true,
            };
            var data2 = new HorizontalLayoutData(widget2)
            {

            };

            AddControl(data1);
            AddControl(data2);
        }
Beispiel #14
0
 public Control(Composite parent)
 {
     Parent = parent;
 }
Beispiel #15
0
 public SpacerWidget(Composite parent, int width, int height)
     : base(parent)
 {
     Width = width;
     Height = height;
 }
Beispiel #16
0
 public TimeWidget(Composite parent)
     : base(parent)
 {
     Resize(10, 1);
 }
Beispiel #17
0
 public Composite(Composite parent)
     : base(parent)
 {
 }
Beispiel #18
0
 public TextWidget(Composite parent, String text)
     : base(parent)
 {
     SetText(text);
 }
Beispiel #19
0
 public TextWidget(Composite parent)
     : base(parent)
 {
 }