public override void Configure(IController hud) { var Hud = hud; /////////// // ITEMS // /////////// Hud.RunOnPlugin <ItemsPlugin>(plugin => { //itemsPlugin.NormalKeepDecorator.Enabled = true; //itemsPlugin.MagicKeepDecorator.Enabled = true; //itemsPlugin.RareKeepDecorator.Enabled = true; plugin.DeathsBreathDecorator.Add(new GroundCircleDecorator(Hud) { Brush = Hud.Render.CreateBrush(192, 102, 202, 177, -2), Radius = 1.25f, }); }); Hud.RunOnPlugin <HoveredItemInfoPlugin>(plugin => { StringGeneratorFunc func = () => string.Format("{0}{1}", Hud.Inventory.HoveredItem.AncientRank > 0 ? "\uD83E\uDC1D " : string.Empty, Hud.Inventory.HoveredItem.SnoItem.NameLocalized); plugin.LegendaryNameDecorator.TextFunc = func; plugin.SetNameDecorator.TextFunc = func; }); /////////////////// // PICKUP RADIUS // /////////////////// Hud.RunOnPlugin <PickupRangePlugin>(plugin => { plugin.FillBrush = Hud.Render.CreateBrush(12, 255, 255, 255, 0); plugin.OutlineBrush = Hud.Render.CreateBrush(30, 0, 0, 0, 3); }); /////////////////////// // STASH & INVENTORY // /////////////////////// Hud.RunOnPlugin <InventoryAndStashPlugin>(plugin => { // enable sell darkening //inventoryAndStashPlugin.SellEnabled = true; // shh, go away blinking cube! plugin.CanCubedEnabled = false; // ancient rank font plugin.AncientRankFont = Hud.Render.CreateFont("arial", 8, 224, 255, 64, 64, true, false, false); plugin.AncientRankFont.SetShadowBrush(224, 0, 0, 0, true); plugin.SocketedLegendaryGemRankFont = Hud.Render.CreateFont("arial", 7, 255, 240, 240, 64, true, false, false); plugin.SocketedLegendaryGemRankFont.SetShadowBrush(128, 0, 0, 0, true); // change darken brush to a lighter one ////inventoryAndStashPlugin.DarkenBrush = Hud.Render.CreateBrush(120, 38, 38, 38, 0); plugin.NotGoodDisplayEnabled = true; plugin.DefinitelyBadDisplayEnabled = true; //plugin.LooksGoodDisplayEnabled = true; }); }
public override void Configure(IController hud) { var Hud = hud; /////////// // ITEMS // /////////// Hud.RunOnPlugin <HoveredItemInfoPlugin>(plugin => { StringGeneratorFunc func = () => string.Format("{0}{1}{2}", Hud.Inventory.HoveredItem.AncientRank > 0 ? "\uD83E\uDC1D " : string.Empty, Hud.Inventory.HoveredItem.AncientRank > 1 ? "\uD83E\uDC1D " : string.Empty, Hud.Inventory.HoveredItem.SnoItem.NameLocalized); plugin.LegendaryNameDecorator.TextFunc = func; plugin.SetNameDecorator.TextFunc = func; }); /////////////////// // PICKUP RADIUS // /////////////////// Hud.RunOnPlugin <PickupRangePlugin>(plugin => { plugin.FillBrush = Hud.Render.CreateBrush(12, 255, 255, 255, 0); plugin.OutlineBrush = Hud.Render.CreateBrush(30, 0, 0, 0, 3); }); /////////////////////// // STASH & INVENTORY // /////////////////////// Hud.RunOnPlugin <InventoryAndStashPlugin>(plugin => { // enable sell darkening plugin.NotGoodDisplayEnabled = false; plugin.DefinitelyBadDisplayEnabled = false; // shh, go away blinking cube! //plugin.CanCubedEnabled = false; // ancient rank font plugin.AncientRankFont = Hud.Render.CreateFont("arial", 7, 255, 227, 153, 25, true, false, 220, 0, 0, 0, true); plugin.PrimalRankFont = Hud.Render.CreateFont("arial", 7, 255, 255, 64, 64, true, false, 180, 0, 0, 0, true); plugin.SocketedLegendaryGemRankFont = Hud.Render.CreateFont("arial", 7, 255, 240, 240, 64, true, false, 128, 0, 0, 0, true); // change darken brush to a lighter one ////inventoryAndStashPlugin.DarkenBrush = Hud.Render.CreateBrush(120, 38, 38, 38, 0); //plugin.NotGoodDisplayEnabled = true; plugin.DefinitelyBadDisplayEnabled = true; //plugin.LooksGoodDisplayEnabled = true; }); }
public override void Load(IController hud) { base.Load(hud); StringGeneratorFunc textFunc = () => (ShowRemaining ? 500 + Hud.Game.Me.HighestSoloRiftLevel * 10 - Hud.Game.Me.Materials.BloodShard : Hud.Game.Me.Materials.BloodShard).ToString("D", CultureInfo.InvariantCulture); StringGeneratorFunc hintFunc = () => ShowRemaining ? "剩余血岩碎片" : "amount of blood shards"; RedDecorator = new TopLabelDecorator(Hud) { TextFont = Hud.Render.CreateFont("tahoma", 8, 255, 255, 100, 100, true, false, 255, 0, 0, 0, true), BackgroundTexture1 = Hud.Texture.ButtonTextureGray, BackgroundTexture2 = Hud.Texture.BackgroundTextureOrange, BackgroundTextureOpacity1 = 1.0f, BackgroundTextureOpacity2 = 1.0f, TextFunc = textFunc, HintFunc = hintFunc, }; YellowDecorator = new TopLabelDecorator(Hud) { TextFont = Hud.Render.CreateFont("tahoma", 7, 255, 200, 205, 50, true, false, false), BackgroundTexture1 = Hud.Texture.ButtonTextureGray, BackgroundTexture2 = Hud.Texture.BackgroundTextureOrange, BackgroundTextureOpacity1 = 1.0f, BackgroundTextureOpacity2 = 1.0f, TextFunc = textFunc, HintFunc = hintFunc, }; GreenDecorator = new TopLabelDecorator(Hud) { TextFont = Hud.Render.CreateFont("tahoma", 7, 255, 100, 130, 100, false, false, false), BackgroundTexture1 = Hud.Texture.ButtonTextureGray, BackgroundTexture2 = Hud.Texture.BackgroundTextureOrange, BackgroundTextureOpacity1 = 1.0f, BackgroundTextureOpacity2 = 1.0f, TextFunc = textFunc, HintFunc = hintFunc, }; }
public MapCustomLabelDecorator(IController hud, StringGeneratorFunc textFunc) : this(hud) { TextFunc = textFunc; }
public MapCustomLabelDecorator(IController hud, string text) : this(hud) { TextFunc = () => text; }
private TopLabelDecorator CreateTopLabel(IController Hud, ItemLocation location, StringGeneratorFunc hintFunc) { return(new TopLabelDecorator(Hud) { TextFont = Hud.Render.CreateFont("tahoma", 7, 180, 255, 255, 255, false, false, true), ExpandedHintFont = Hud.Render.CreateFont("tahoma", 7, 255, 200, 200, 200, false, false, true), ExpandedHintWidthMultiplier = 3, BackgroundTexture1 = Hud.Texture.ButtonTextureOrange, BackgroundTexture2 = Hud.Texture.BackgroundTextureBlue, BackgroundTextureOpacity2 = 0.75f, TextFunc = () => Hud.Game.Items .Where(item => item.Location == location).Select(item => item.StatList.AreaDamage()) .FirstOrDefault() .ToString("F0", System.Globalization.CultureInfo.InvariantCulture) + "%", HintFunc = hintFunc, }); }