/// <summary>
 ///     The post reset event.
 /// </summary>
 /// <param name="args">The event args.</param>
 private static void OnPostReset(EventArgs args)
 {
     Font.OnResetDevice();
     FontBold.OnResetDevice();
     FontBoldItalic.OnResetDevice();
     FontItalic.OnResetDevice();
 }
Exemple #2
0
        private void Drawing_OnPostReset(EventArgs args)
        {
            if (Font == null || Font.IsDisposed)
            {
                return;
            }

            Font?.OnResetDevice();
        }
Exemple #3
0
        /// <summary>
        ///     Loads this instance.
        /// </summary>
        public void Load()
        {
            Font = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
            {
                FaceName        = "Tahoma", Height = this.Menu.Item("FontSize").GetValue <Slider>().Value,
                OutputPrecision = FontPrecision.Default, Quality = FontQuality.Antialiased
            });

            Drawing.OnEndScene  += this.Drawing_OnEndScene;
            Drawing.OnPreReset  += args => { Font.OnLostDevice(); };
            Drawing.OnPostReset += args => { Font.OnResetDevice(); };
        }
        /// <summary>
        ///     Loads this instance.
        /// </summary>
        public void Load()
        {
            Font = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
                {
                    FaceName = "Tahoma",
                    Height = 30,
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.Default
                });

            GameObject.OnCreate += this.OnGameObjectCreate;
            GameObject.OnDelete += this.OnGameObjectDelete;
            Drawing.OnEndScene += this.OnDrawingEndScene;

            Drawing.OnPreReset += args => { Font.OnLostDevice(); };
            Drawing.OnPostReset += args => { Font.OnResetDevice(); };
        }
Exemple #5
0
 static void Drawing_OnPostReset(EventArgs args)
 {
     S.OnResetDevice();
     RecF.OnResetDevice();
 }
Exemple #6
0
 void Drawing_OnPostReset(EventArgs args)
 {
     Text.OnResetDevice();
 }
Exemple #7
0
        /// <summary>
        ///     Loads this instance.
        /// </summary>
        public void Load()
        {
            Font = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
                {
                    FaceName = "Tahoma",
                    Height = getSliderItem("FontSize"),
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.Default
                });

            Drawing.OnEndScene += this.Drawing_OnEndScene;
            Drawing.OnPreReset += args => { Font.OnLostDevice(); };
            Drawing.OnPostReset += args => { Font.OnResetDevice(); };
        }
 private static void DrawingOnOnPostReset(EventArgs args)
 {
     Text.OnResetDevice();
     TextLittle.OnResetDevice();
 }
Exemple #9
0
 private void Drawing_OnPostReset(EventArgs args)
 {
     Dispose();
     Font?.OnResetDevice();
 }
 /// <summary>
 /// Fired after the DirectX device has been reset.
 /// </summary>
 /// <param name="args">The <see cref="EventArgs"/> instance containing the event data.</param>
 private static void DrawingOnOnPostReset(EventArgs args)
 {
     sprite.OnResetDevice();
     Text.OnResetDevice();
     BoxLine.OnResetDevice();
 }
Exemple #11
0
 private static void Drawing_OnPostReset(EventArgs args)
 {
     text.OnResetDevice();
 }
Exemple #12
0
 private static void DrawingOnOnPostReset(EventArgs args)
 {
     TextStatus.OnResetDevice();
 }
Exemple #13
0
 private static void DrawingOnPostReset(EventArgs args)
 {
     //Game.PrintChat("DrawingOnPostReset");
     Text.OnResetDevice();
     Sprite.OnResetDevice();
 }