protected override void StartEffectivePerform() { base.StartEffectivePerform(); Graphics.Interface.Control c = null; switch (TextType) { case TextPopupType.Credits: text = (Interface.ITextPopup)(c = new Interface.CreditsText()); break; case TextPopupType.SpeachBubble: text = (Interface.ITextPopup)(c = new Interface.SpeachBubble()); break; case TextPopupType.Subtitle: text = (Interface.ITextPopup)(c = new Interface.SubtitleText()); break; case TextPopupType.TimeWarning: text = (Interface.ITextPopup)(c = new Interface.TimeLeftPopupText()); break; case TextPopupType.Tutorial: text = (Interface.ITextPopup)(c = new Interface.TutorialText()); break; case TextPopupType.Warning: text = (Interface.ITextPopup)(c = new Interface.WarningPopupText()); break; case TextPopupType.WarningFlash: text = (Interface.ITextPopup)(c = new Interface.WarningFlashText()); break; case TextPopupType.StageStart: text = (Interface.ITextPopup)(c = new Interface.StageStartText()); break; case TextPopupType.ScrollingCredits: text = (Interface.ITextPopup)(c = new Interface.ScrollingCreditsText()); break; case TextPopupType.BossIntroNameText: text = (Interface.ITextPopup)(c = new Interface.BossIntroText()); break; case TextPopupType.BossIntroUnderText: text = (Interface.ITextPopup)(c = new Interface.BossIntroUnderText()); break; }; text.Text = Game.Instance.Map.StringLocalizationStorage.GetString(Text ?? ""); text.Title = Game.Instance.Map.StringLocalizationStorage.GetString(Title ?? ""); switch(Layer) { case TextLayer.ProgramInterfaceTop: Program.Instance.Interface.AddChild(c); break; case TextLayer.ProgramInterfaceLayer1: Program.Instance.Interface.Layer1.AddChild(c); break; case TextLayer.ProgramInterfaceLayer2: Program.Instance.Interface.Layer2.AddChild(c); break; case TextLayer.ProgramInterfaceLayer3: Program.Instance.Interface.Layer3.AddChild(c); break; } }
protected override void EndPerform(bool aborted) { base.EndPerform(aborted); if (text != null) { text.Fadeout(); text = null; } }