/// <summary> /// </summary> /// <param name="gameTime"></param> private void HandleCompilingNotificationAnimations(GameTime gameTime) { var targetAlpha = HotLoader.IsCompiling || HotLoader.CompilationFailed ? 1 : 0; CompilingNotification.Alpha = MathHelper.Lerp(CompilingNotification.Alpha, targetAlpha, (float)Math.Min(gameTime.ElapsedGameTime.TotalMilliseconds / 60, 1)); if (!HotLoader.IsCompiling && HotLoader.CompilationFailed && CompilingNotification.Text.Text.Contains("re-compiled")) { CompilingNotification.SetCompilationFailedText(); } else if (HotLoader.IsCompiling && CompilingNotification.Text.Text.Contains("Failed")) { CompilingNotification.SetCompilingText(); } }
/// <inheritdoc /> /// <summary> /// </summary> /// <param name="screen"></param> /// <param name="testScreens"></param> public HotLoaderScreenView(Screen screen, Dictionary <string, Type> testScreens) : base(screen) { TestScreens = testScreens; CompilingNotification = new CompilingNotification() { Parent = Container, Alignment = Alignment.MidCenter }; Browser = new HotLoadingBrowser(this, testScreens) { Parent = Container }; var game = (HotLoaderGame)GameBase.Game; HotLoader = game.HotLoader; Console.WriteLine("Press the Tilde (~) key to open/close the test browser"); }