當前位置: 首頁>>代碼示例>>C#>>正文


C# Direct3D9.Font類代碼示例

本文整理匯總了C#中SharpDX.Direct3D9.Font的典型用法代碼示例。如果您正苦於以下問題:C# Font類的具體用法?C# Font怎麽用?C# Font使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Font類屬於SharpDX.Direct3D9命名空間,在下文中一共展示了Font類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Main

		static void Main(string[] args)
		{
			Game.OnUpdate += Game_OnUpdate;
			Game.OnWndProc += Game_OnWndProc;
			Console.WriteLine("> Tiny# loaded!");

			txt = new Font(
			   Drawing.Direct3DDevice9,
			   new FontDescription
			   {
				   FaceName = "Tahoma",
				   Height = 12,
				   OutputPrecision = FontPrecision.Default,
				   Quality = FontQuality.Default
			   });

			not = new Font(
			   Drawing.Direct3DDevice9,
			   new FontDescription
			   {
				   FaceName = "Tahoma",
				   Height = 20,
				   OutputPrecision = FontPrecision.Default,
				   Quality = FontQuality.Default
			   });

			Drawing.OnPreReset += Drawing_OnPreReset;
			Drawing.OnPostReset += Drawing_OnPostReset;
			Drawing.OnEndScene += Drawing_OnEndScene;
			AppDomain.CurrentDomain.DomainUnload += CurrentDomain_DomainUnload;
		}
開發者ID:Hukutka24rus,項目名稱:ReworkAllScripts,代碼行數:31,代碼來源:Program.cs

示例2: Main

        private static void Main()
        {
            Events.OnLoad += On_Load;
            Events.OnClose += On_Close;
            _text = new Font(
                Drawing.Direct3DDevice9,
                new FontDescription
                {
                    FaceName = "Segoe UI",
                    Height = 17,
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.ClearType
                });

            _notice = new Font(
                Drawing.Direct3DDevice9,
                new FontDescription
                {
                    FaceName = "Segoe UI",
                    Height = 30,
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.ClearType
                });

            _line = new Line(Drawing.Direct3DDevice9);
            Game.OnUpdate += Killsteal;
            Game.OnUpdate += Game_OnUpdate;
            Drawing.OnPreReset += Drawing_OnPreReset;
            Drawing.OnPostReset += Drawing_OnPostReset;
            Drawing.OnEndScene += Drawing_OnEndScene;
            Drawing.OnDraw += Drawing_OnDraw;
            AppDomain.CurrentDomain.DomainUnload += CurrentDomain_DomainUnload;
            
        }
開發者ID:Evervolv1337,項目名稱:Ensage,代碼行數:34,代碼來源:Program.cs

示例3: OnGameLoad

        private static void OnGameLoad(EventArgs e)
        {
            if (Player.ChampionName != "Kalista")
            {
                return;
            }

            Q = new Spell(SpellSlot.Q, 1130);
            W = new Spell(SpellSlot.W, 5200);
            E = new Spell(SpellSlot.E, 1000);
            R = new Spell(SpellSlot.R, 1400f);

            Q.SetSkillshot(0.25f, 30f, 1700f, true, SkillshotType.SkillshotLine);

            Text = new Font(Drawing.Direct3DDevice, new FontDescription { FaceName = "Arial", Height = 35, Width = 12, Weight = FontWeight.Bold, OutputPrecision = FontPrecision.Default, Quality = FontQuality.Default });
            root = new Menu("HastaKalistaBaby", "hkalista", true);
            draw = new Menu("Drawings Settings", "drawing");
            Orbwalker = new Orbwalking.Orbwalker(root.SubMenu("Orbwalker Settings"));

            MenuManager.Create();
            DamageIndicator.Init(Damage.GetEdamage);
            ee = new EarlyEvade();
            AutoLevel.Init();
            Game.OnUpdate += OnUpdate;
            Drawing.OnDraw += Drawing_OnDraw;
            Obj_AI_Base.OnProcessSpellCast += Helper.OnProcessSpellCast;
            Spellbook.OnCastSpell += Helper.OnCastSpell;

        }
開發者ID:Faqer,項目名稱:Leaguesharp-2,代碼行數:29,代碼來源:Program.cs

示例4: Main

        private static void Main(string[] args)
        {
            Menu.AddItem(new MenuItem("auto_reload", "Auto Reload").SetValue(false));
            Menu.AddItem(new MenuItem("refresh_hotkey2", "Force Refresh hotkey").SetValue(new KeyBind('M', KeyBindType.Press)).SetTooltip("Force refresh, regardless of the update rate"));
            Menu.AddItem(new MenuItem("repeat_hotkey2", "Repeat hotkey").SetValue(new KeyBind('N', KeyBindType.Press)).SetTooltip("Hold to refresh at refresh rate"));
            Menu.AddItem(new MenuItem("refresh_rate", "Refresh Rate").SetValue(new Slider(5000, 50, 10000)).SetTooltip("tick per refresh"));
            Menu.AddToMainMenu();
            
            _text = new Font(
               Drawing.Direct3DDevice9,
               new FontDescription
               {
                   FaceName = "Calibri",
                   Height = 25,
                   OutputPrecision = FontPrecision.Default,
                   Quality = FontQuality.Default
               });

            Drawing.OnDraw += Drawing_OnDraw;
            Game.OnWndProc += Game_OnWndProc;
            Game.OnIngameUpdate += Game_OnUpdate;
            Drawing.OnPreReset += Drawing_OnPreReset;
            Drawing.OnPostReset += Drawing_OnPostReset;
            Drawing.OnEndScene += Drawing_OnEndScene;
        }
開發者ID:EliKhorne,項目名稱:ESharp,代碼行數:25,代碼來源:Program.cs

示例5: Initialize

        public static void Initialize()
        {
            _Font = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
                {
                    FaceName = "Tahoma",
                    Height = 18,
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.ClearType,
                    Weight = FontWeight.Bold

                });

            _FontNumber = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
                {
                    FaceName = "Tahoma",
                    Height = 17,
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.ClearType,
                    Weight = FontWeight.Bold

                });
        }
開發者ID:hao1630,項目名稱:KickAss,代碼行數:26,代碼來源:RecallTracker.cs

示例6: SkillBar

        public SkillBar(Menu config)
        {
            MenuSkillBar = config.AddSubMenu(new Menu("Cooldown Tracker", "SkillBar"));
            MenuSkillBar.AddItem(new MenuItem("OnAllies", "On Allies").SetValue(false));
            MenuSkillBar.AddItem(new MenuItem("OnEnemies", "On Enemies").SetValue(true));
            Sprite = new Sprite(Drawing.Direct3DDevice);
            HudTexture = Texture.FromMemory(
                Drawing.Direct3DDevice, (byte[]) new ImageConverter().ConvertTo(Resources.main, typeof(byte[])), 127, 41,
                0, Usage.None, Format.A1, Pool.Managed, Filter.Default, Filter.Default, 0);
            FrameLevelTexture = Texture.FromMemory(
                Drawing.Direct3DDevice, (byte[]) new ImageConverter().ConvertTo(Resources.spell_level, typeof(byte[])),
                2, 3, 0, Usage.None, Format.A1, Pool.Managed, Filter.Default, Filter.Default, 0);
            ButtonRedTexture = Texture.FromMemory(
                Drawing.Direct3DDevice, (byte[]) new ImageConverter().ConvertTo(Resources.disable, typeof(byte[])), 14,
                14, 0, Usage.None, Format.A1, Pool.Managed, Filter.Default, Filter.Default, 0);
            SmallText = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
                {
                    FaceName = "Calibri",
                    Height = 13,
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.Default,
                });

            AppDomain.CurrentDomain.DomainUnload += DomainUnload;
            AppDomain.CurrentDomain.ProcessExit += DomainUnload;
            CustomEvents.Game.OnGameLoad += Game_OnGameLoad;
        }
開發者ID:AwkwardDev,項目名稱:LeagueSharp2,代碼行數:29,代碼來源:SkillBar.cs

示例7: Tristana

        public Tristana()
        {
            Q = new Spell(SpellSlot.Q, 703);

            W = new Spell(SpellSlot.W, 900);
            W.SetSkillshot(.50f, 250f, 1400f, false, SkillshotType.SkillshotCircle);

            E = new Spell(SpellSlot.E, 703);
            R = new Spell(SpellSlot.R, 703);

            Utility.HpBarDamageIndicator.DamageToUnit = GetComboDamage;
            Utility.HpBarDamageIndicator.Enabled = true;

            vText = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
                {
                    FaceName = "Courier new",
                    Height = 15,
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.Default,
                });

            Utils.PrintMessage("Tristana loaded.");
            Obj_AI_Base.OnProcessSpellCast += OnProcessSpell;
        }
開發者ID:uio25371555,項目名稱:LeagueSharp-Development,代碼行數:26,代碼來源:Tristana.cs

示例8: Init

        public static void Init()
        {
            Console.WriteLine(ObjectMgr.LocalHero.Name.ToString());
            if (ObjectMgr.LocalHero.Name.ToString() == "npc_dota_hero_legion_commander")
            {
                Game.OnUpdate += Game_OnUpdate;
                loaded = false;
                text = new Font(
                    Drawing.Direct3DDevice9,
                    new FontDescription
                        {
                            FaceName = "Tahoma",
                            Height = 13,
                            OutputPrecision = FontPrecision.Default,
                            Quality = FontQuality.Default
                        });

                Drawing.OnPreReset += Drawing_OnPreReset;
                Drawing.OnPostReset += Drawing_OnPostReset;
                Drawing.OnEndScene += Drawing_OnEndScene;
                AppDomain.CurrentDomain.DomainUnload += CurrentDomainDomainUnload;
                Game.OnWndProc += Game_OnWndProc;
                Player.OnExecuteOrder += Player_OnExecuteAction;
            }
        }
開發者ID:outlawfosho,項目名稱:LegionCommander,代碼行數:25,代碼來源:LegionCommander.cs

示例9: Ashe

        public Ashe()
        {
            Q = new Spell(SpellSlot.Q);
            W = new Spell(SpellSlot.W, 1200);
            E = new Spell(SpellSlot.E, 2500);
            R = new Spell(SpellSlot.R, 20000);

            W.SetSkillshot(250f, (float) (24.32f * Math.PI / 180), 902f, true, SkillshotType.SkillshotCone);
            E.SetSkillshot(377f, 299f, 1400f, false, SkillshotType.SkillshotLine);
            R.SetSkillshot(250f, 130f, 1600f, false, SkillshotType.SkillshotLine);

            Interrupter.OnPossibleToInterrupt += Game_OnPossibleToInterrupt;
            Obj_AI_Base.OnProcessSpellCast += Game_OnProcessSpell;

            Utility.HpBarDamageIndicator.DamageToUnit = GetComboDamage;
            Utility.HpBarDamageIndicator.Enabled = true;

            vText = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
                {
                    FaceName = "Courier new",
                    Height = 15,
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.Default,
                });

            Utils.PrintMessage("Ashe loaded.");
        }
開發者ID:qktlfflzk,項目名稱:Backup5.4,代碼行數:29,代碼來源:Ashe.cs

示例10: Main

        static void Main(string[] args)
        {
            var hotkey = new MenuItem("hotkey", "Toggle hotkey").SetValue(
               new KeyBind('O', KeyBindType.Toggle));
            hotkey.ValueChanged += Hotkey_ValueChanged;
            Menu.AddItem(hotkey);

            Menu.AddItem(new MenuItem("positionX", "X-Position").SetValue(
              new Slider(5, 0, Drawing.Width)));

            Menu.AddItem(new MenuItem("positionY", "Y-Position").SetValue(
              new Slider(50, 0, Drawing.Height)));

            Menu.AddToMainMenu();

            ChangeToggleValue(false);

            Timer.Tick += Timer_Tick;
            text = new Font(
               Drawing.Direct3DDevice9,
               new FontDescription
               {
                   FaceName = "Calibri",
                   Height = 13,
                   OutputPrecision = FontPrecision.Default,
                   Quality = FontQuality.Default
               });

            Drawing.OnPreReset += Drawing_OnPreReset;
            Drawing.OnPostReset += Drawing_OnPostReset;
            Drawing.OnEndScene += Drawing_OnEndScene;
            Game.OnUpdate += Game_OnGameUpdate;
            AppDomain.CurrentDomain.DomainUnload += CurrentDomain_DomainUnload;
        }
開發者ID:vitac1998,項目名稱:Ensage,代碼行數:34,代碼來源:Program.cs

示例11: Ezreal

        public Ezreal()
        {
            Q = new Spell(SpellSlot.Q, 1150f);
            Q.SetSkillshot(0.25f, 60f, 2000f, true, SkillshotType.SkillshotLine);

            W = new Spell(SpellSlot.W, 900f);
            W.SetSkillshot(0.25f, 80f, 1600f, false, SkillshotType.SkillshotLine);

            E = new Spell(SpellSlot.E);

            R = new Spell(SpellSlot.R, 2500f);
            R.SetSkillshot(1f, 160f, 2000f, false, SkillshotType.SkillshotLine);

            Utility.HpBarDamageIndicator.DamageToUnit = GetComboDamage;
            Utility.HpBarDamageIndicator.Enabled = true;

            VText = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
                {
                    FaceName = "Courier new",
                    Height = 15,
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.Default,
                });

            Utils.PrintMessage("Ezreal loaded.");
        }
開發者ID:uio25371555,項目名稱:LeagueSharp-Development,代碼行數:28,代碼來源:Ezreal.cs

示例12: Tristana

        public Tristana()
        {
            Q = new Spell(SpellSlot.Q, 703);

            W = new Spell(SpellSlot.W, 900);
            W.SetSkillshot(.50f, 250f, 1400f, false, SkillshotType.SkillshotCircle);

            E = new Spell(SpellSlot.E, 703);
            R = new Spell(SpellSlot.R, 703);

            Utility.HpBarDamageIndicator.DamageToUnit = GetComboDamage;
            Utility.HpBarDamageIndicator.Enabled = true;

            AntiGapcloser.OnEnemyGapcloser += AntiGapcloser_OnEnemyGapcloser;
            Interrupter2.OnInterruptableTarget += Interrupter2_OnInterruptableTarget;

            vText = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
                {
                    FaceName = "Courier new",
                    Height = 15,
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.Default
                });

            Utils.Utils.PrintMessage("Tristana loaded.");
        }
開發者ID:Jackie-Tian,項目名稱:ll,代碼行數:28,代碼來源:Tristana.cs

示例13: Init

        public static void Init()
        {
            Game.OnUpdate += Game_OnUpdate;
            loaded = false;
            me = null;
            target = null;

            //item
            scytheOfVyse = null;
            blink = null;
            arcane = null;
            orchid = null;
            dagon = null;
            veil = null;
            soulring = null;
            shiva = null;
            text = new Font(
                Drawing.Direct3DDevice9,
                new FontDescription
                {
                    FaceName = "Tahoma",
                    Height = 13,
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.Default
                });

            Drawing.OnPreReset += Drawing_OnPreReset;
            Drawing.OnPostReset += Drawing_OnPostReset;
            Drawing.OnEndScene += Drawing_OnEndScene;
            AppDomain.CurrentDomain.DomainUnload += CurrentDomainDomainUnload;
            Game.OnWndProc += Game_OnWndProc;
            Orbwalking.Load();

        }
開發者ID:luigiguido45,項目名稱:goldilocks,代碼行數:34,代碼來源:GodofThunder.cs

示例14: SpellR

        public SpellR()
        {
            Text = new Font(Drawing.Direct3DDevice,
                new FontDescription
                {
                    FaceName = "Malgun Gothic",
                    Height = 15,
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.ClearTypeNatural
                });

            TextBold = new Font(Drawing.Direct3DDevice,
                new FontDescription
                {
                    FaceName = "Malgun Gothic",
                    Height = 15,
                    Weight = FontWeight.Bold,
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.ClearTypeNatural
                });

            TextWarning = new Font(Drawing.Direct3DDevice,
                new FontDescription
                {
                    FaceName = "Malgun Gothic",
                    Height = 75,
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.ClearTypeNatural
                });

            Load();
        }
開發者ID:yashine59fr,項目名稱:PortAIO-1,代碼行數:32,代碼來源:SpellR.cs

示例15: BaseChamp

        public BaseChamp(string szChampName)
        {
            Text = new Font(Drawing.Direct3DDevice,
                new FontDescription
                {
                    FaceName = "Malgun Gothic",
                    Height = 15,
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.ClearTypeNatural
                });

            Config = new Menu(String.Format("Synx {0} !", szChampName), szChampName, true);

            TargetSelector.AddToMenu(Config.SubMenu("Target Selector"));
            Orbwalker = new Orbwalking.Orbwalker(Config.SubMenu("Orbwalking"));

            activator = new Menu("Activator", "activator");
            new Smite(TargetSelector.DamageType.Magical, activator);
            new Ignite(TargetSelector.DamageType.Magical, activator);

            drawing = new Menu("Drawings", "drawings");

            Config.AddSubMenu(activator);
            Config.AddSubMenu(drawing);
            SpellDatabase.InitalizeSpellDatabase();
        }
開發者ID:xQxCPMxQx,項目名稱:Leaguesharp-7,代碼行數:26,代碼來源:BaseChamp.cs


注:本文中的SharpDX.Direct3D9.Font類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。