Example #1
0
        public void Load()
        {
            this.device = this.game.GraphicsDevice;
            this.window = this.game.Window;

            this.effectLoader        = Atom.Xna.Effects.EffectLoader.Create(this.game.Services);
            this.viewSizeService     = new GameWindowViewSizeService(this.game.Window);
            this.renderTargetFactory = new RenderTarget2DFactory(this.viewSizeService.ViewSize, this.graphics, 16);

            this.drawContext = this.CreateDrawContext();
            this.pipeline    = new BloomRenderPipeline(this.effectLoader, this.renderTargetFactory, this.graphics);
            this.pipeline.Load();

            UIFonts.Load(this.fontLoader);
        }
Example #2
0
        private void applyB_Click(object sender, EventArgs e)
        {
            DHCFG.Items["Settings"]["RestoreOnStartup"] = restoreCB.Checked ? 1 : 0;
            Current.mainForm.SetUIDialogs(!useOwnDialogsCB.Checked);

            DHCFG.Items["UI"]["ShowDetailModeSwitchTip"] = showDetailSwitchTipCB.Checked ? 1 : 0;

            DHFILE.AssociateFileTypes(DHCFG.Items["Settings"].GetStringListValue("FileTypes"));
            DHFILE.RegisterContextMenus(DHCFG.Items["Settings"].GetStringListValue("ContextMenus"));

            DHCFG.Items["Path"]["War3"] = war3PathTextBox.Text;
            if (Current.map == null)
            {
                (this.Owner as MainForm).LoadWar3Mpq();
            }

            DHCFG.Items["Fonts"]["ArialFontName"]   = arialFontTextBox.Text;
            DHCFG.Items["Fonts"]["VerdanaFontName"] = verdanaFontTextBox.Text;

            UIFonts.ResetFonts();

            this.Hide();
        }