当前位置: 首页>>代码示例>>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;未经允许,请勿转载。