Exemplo n.º 1
0
        public NewsPanel(Scene scene, Vector3 position, Vector2 size, double visualPriority, Color color, NewsType type, string title)
            : base(scene, position, size, visualPriority, color)
        {
            SetTitle(title);
            Type = type;
            DistanceBetweenTwoChoices = 30;

            Alpha = 0;

            AllNews = new List<NewsWidget>();

            Sync = new PushButton(new Text("Reload", @"Pixelite") { SizeX = 2 });
            Sync.ClickHandler = DoReloadClicked;

            var vwText = new Text("Visit website", @"Pixelite") { SizeX = 2 };
            VisitWebsite = new PushButton(vwText) { MinSpaceForValue = (int) vwText.AbsoluteSize.X + 20 };
            VisitWebsite.ClickHandler = DoVisitWebsiteClicked;

            AddTitleBarWidget(VisitWebsite);

            LoadingInfos = new Label(new Text(@"Pixelite") { SizeX = 4 });

            Main.NewsController.LoadingStarted += new NewsTypeHandler(DoLoadingStarted);
            Main.NewsController.LoadingDoneSuccessfully += new NewsTypeNewsHandler(DoLoadedSuccessfully);
            Main.NewsController.LoadingDoneWithError += new NewsTypeHandler(DoLoadedError);

            MaxNewsDisplayed = 3;
        }
Exemplo n.º 2
0
        public CreditsPanel(Scene scene, Vector3 position, Vector2 size, double visualPriority, Color color)
            : base(scene, position, size, visualPriority, color)
        {
            SetTitle("Credits");
            DistanceBetweenTwoChoices = 15;
            CenterWidgets = true;

            Alpha = 0;

            Separator1 = new VerticalSeparatorWidget() { MaxAlpha = 0 };

            Jodi = new Label(new Text("A game by Jodi Giordano", @"Pixelite") { SizeX = 4, Alpha = 0 }.CenterIt());
            Website = new Label(new Text("ephemeregames.com", @"Pixelite") { SizeX = 3, Alpha = 0 }.CenterIt());

            Separator2 = new VerticalSeparatorWidget() { MaxAlpha = 0 };

            SoundDesign = new Label(new Text("Sound design by FX Dupas (fxdupas.com)", "Pixelite") { SizeX = 2, Alpha = 0 }.CenterIt());

            Separator3 = new VerticalSeparatorWidget() { MaxAlpha = 0 };

            SpecialThanks = new Label(new Text("Special thanks to:", @"Pixelite") { SizeX = 3, Alpha = 0 }.CenterIt());
            Tag = new Label(new Text("TAG (tag.hexagram.ca)", @"Pixelite") { SizeX = 2, Alpha = 0 }.CenterIt());
            Mercury = new Label(new Text("Mercury Particle Engine (mpe.codeplex.com)", @"Pixelite") { SizeX = 2, Alpha = 0 }.CenterIt());
            EasyStorage = new Label(new Text("EasyStorage (easystorage.codeplex.com)", @"Pixelite") { SizeX = 2, Alpha = 0 }.CenterIt());
            Backgrounds = new Label(new Text("NASA/STScI for some of the backgrounds", @"Pixelite") { SizeX = 2, Alpha = 0 }.CenterIt());

            AddWidget("Seperator", Separator1);
            AddWidget("Jodi", Jodi);
            AddWidget("Website", Website);
            AddWidget("Seperator2", Separator2);
            AddWidget("Sound", SoundDesign);
            AddWidget("Separator3", Separator3);
            AddWidget("ST", SpecialThanks);
            AddWidget("Tag", Tag);
            AddWidget("Backgrounds", Backgrounds);
            AddWidget("Mercury", Mercury);
            AddWidget("EasyStorage", EasyStorage);
        }