great plugin RNN,
a little change to it using font size to set the popup width and height correctly so no matter what is written it fits, "Channeling" would extend outside of the pop up, similar to Metrics.Width/Height method
[C#] RNN's OtherShrinePlugin (edit) - Pastebin.com
Removed public float wPopup { get; set; } & public float hPopup { get; set; } entirely from pluginenablerordisabler and othershrine
Code:
public int pFontSize { get; set; } = 9;
Code:
DecoratorPopupON = new TopLabelDecorator(hud)
{
BorderBrush = hud.Render.CreateBrush(255, 180, 147, 109, -1),
BackgroundBrush = hud.Render.CreateBrush(200, 10, 10, 10, 0),
TextFont = hud.Render.CreateFont("tahoma", pFontSize, 255, 0, 250, 0, true, false, false),
TextFunc = () => TextoPopup
};
DecoratorPopupOFF = new TopLabelDecorator(hud)
{
BorderBrush = hud.Render.CreateBrush(255, 180, 147, 109, -1),
BackgroundBrush = hud.Render.CreateBrush(200, 10, 10, 10, 0),
TextFont = hud.Render.CreateFont("tahoma", pFontSize, 255, 250, 0, 0, true, false, false),
TextFunc = () => TextoPopup
};
Code:
foreach (PopupPylon p in Hud.Queue.GetItems<PopupPylon>().Take(7))
{
TextoPopup = p.Text;
float w = p.Text.Length*pFontSize + Hud.Window.Size.Width * 0.05f;
float h = pFontSize + Hud.Window.Size.Height * 0.05f;
if (p.On) { DecoratorPopupON.Paint(x, y , w, h, HorizontalAlign.Center); }
else { DecoratorPopupOFF.Paint(x, y , w, h, HorizontalAlign.Center); }
if (y < Hud.Window.Size.Height/2) y += h;
else y -= h;
}
also for pluginenablerordisabler if you like icons for map from csource chars, 🅿 for power, 🗲 for conduit, ⏰ for channel, 🛡 for shield, 👟 for speed
Code:
plugin.Config(ShrineType.PowerPylon,"POWER","\uD83C\uDD7F","Power","Active Power","Lost Power","\uD83C\uDD7F POWER \uD83C\uDD7F");
plugin.Config(ShrineType.ConduitPylon,"CONDUIT","\uD83D\uDDF2","Conduit","Active Conduit","Lost Conduit","\uD83D\uDDF2 CONDUIT \uD83D\uDDF2");
plugin.Config(ShrineType.ChannelingPylon,"CHANNELING","\u23F0","Channeling","Active Channeling","Lost Channeling","\u23F0 CHANNELING \u23F0");
plugin.Config(ShrineType.ShieldPylon,"SHIELD","\uD83D\uDEE1","Shield","Active Shield","Lost Shield","\uD83D\uDEE1 SHIELD \uD83D\uDEE1");
plugin.Config(ShrineType.SpeedPylon,"SPEED","\uD83D\uDC5F","Speed","Active Speed","Lost Speed","\uD83D\uDC5F SPEED \uD83D\uDC5F");