hi,
how do you guys display a groundlabel decorator for specific items like puzzle ring or bardiche regardless if its ancient or primal? if ancient set item drops has green decorators, how to we make it the same for specific items?
hi,
how do you guys display a groundlabel decorator for specific items like puzzle ring or bardiche regardless if its ancient or primal? if ancient set item drops has green decorators, how to we make it the same for specific items?
you need to identify the sno for the item and add a defined decorator to them. If you like to mark only ancient items you need to chec the item with a condition "item.AncientRank"
like:
// Bloodshards
if (item.SnoItem.Sno == 2603730171)
{
BloodshardsDecorator.Paint(layer, item, item.FloorCoordinate, GetItemName(item));
continue;
}
Last edited by hkjhkh; 12-01-2019 at 10:56 AM.
ok I managed to grab the specific UID for the item but how do you change the font color and background from your code?
on top you need to define a Decorator for your ITEM, the decorater name will be used later on the painter. So it's possible to give your single ITEM a unique color. The best way is to extend the default itemcustom.cs with an own code in your user folder
// Bloodshards
BloodshardsDecorator = new WorldDecoratorCollection(
new GroundCircleDecorator(Hud)
{
Brush = Hud.Render.CreateBrush(192, 255, 0, 0, -2),
Radius = 1.25f,
},
new GroundLabelDecorator(Hud)
{
BackgroundBrush = Hud.Render.CreateBrush(192,255,0,0, 0),
BorderBrush = Hud.Render.CreateBrush(160, 0, 0, 0, -1),
TextFont = Hud.Render.CreateFont("tahoma", 6, 255, 0, 0, 0, true, false, false),
}
);
Last edited by hkjhkh; 12-01-2019 at 03:21 PM.