public LoadingScreen() { Content.InitBasic(GlobalSettings.Default.StartupPath, GameFacade.GraphicsDevice); Bg = new UISimitoneBg(); Bg.Position = (new Vector2(ScreenWidth, ScreenHeight)) / 2; Add(Bg); ProgressDiag = new UIDiagonalStripe(new Point(0, 150), UIDiagonalStripeSide.RIGHT, Color.Black * 0.75f); ProgressDiag.Position = new Vector2(0, ScreenHeight / 2 - 75); Add(ProgressDiag); TextDiag = new UIDiagonalStripe(new Point(0, 150), UIDiagonalStripeSide.LEFT, Color.Black * 0.5f); TextDiag.Position = new Vector2(0, ScreenHeight * 0.75f - 37); Add(TextDiag); GameFacade.Screens.Tween.To(this, 0.5f, new Dictionary <string, float>() { { "InterpolatedAnimation", 1f } }, TweenQuad.EaseOut); LoadProgress = new UILoadProgress(); LoadProgress.Position = (new Vector2(ScreenWidth, ScreenHeight) - new Vector2(1012, 128)) / 2; Add(LoadProgress); Logo = new UISimitoneLogo(); Logo.Position = new Vector2(ScreenWidth, ScreenHeight) / 2; Add(Logo); LogoTween = GameFacade.Screens.Tween.To(Logo, 1f, new Dictionary <string, float>() { { "Y", ScreenHeight / 4 }, { "ScaleX", 0.5f }, { "ScaleY", 0.5f } }, TweenQuad.EaseOut); InterpolatedAnimation = InterpolatedAnimation; (new Thread(() => { VMContext.InitVMConfig(true); FSO.Content.Content.Init(GlobalSettings.Default.StartupPath, GameFacade.GraphicsDevice); lock (this) { LoadingComplete = true; } })).Start(); }
private void Scroll(UIBulletinBoardType type, int dir) { var strings = GameFacade.Strings; switch (type) { case UIBulletinBoardType.Community: CommunityPage += dir; CommunityTween?.Stop(); CommunityTween = GameFacade.Screens.Tween.To(this, 0.5f, new Dictionary <string, float>() { { "CommunityPostsScroll", CommunityPage } }, TweenQuad.EaseOut); CommunityPostsPage.Caption = strings.GetString("f120", "8", new string[] { (CommunityPage + 1).ToString() }); break; case UIBulletinBoardType.Mayor: MayorPage += dir; MayorTween?.Stop(); MayorTween = GameFacade.Screens.Tween.To(this, 0.5f, new Dictionary <string, float>() { { "MayorPostsScroll", MayorPage } }, TweenQuad.EaseOut); MayorPostsPage.Caption = strings.GetString("f120", "8", new string[] { (MayorPage + 1).ToString() }); var firstPage = MayorPosts.Count != 0 && (MayorPage <= 0); MayorPostsLabel.Alignment = (firstPage ? TextAlignment.Left : TextAlignment.Center) | TextAlignment.Top; MayorPostsSubtitle.Alignment = (firstPage ? TextAlignment.Left : TextAlignment.Center) | TextAlignment.Top; break; case UIBulletinBoardType.System: SystemPage += dir; SystemTween?.Stop(); SystemTween = GameFacade.Screens.Tween.To(this, 0.5f, new Dictionary <string, float>() { { "SystemPostsScroll", SystemPage } }, TweenQuad.EaseOut); SystemPostsPage.Caption = strings.GetString("f120", "8", new string[] { (SystemPage + 1).ToString() }); break; } UpdateScrollButtons(); }
private void tween_OnComplete(UITweenInstance tween, float progress) { InTween = false; CheckPreloadLabel(); }