-
Active Member
[v7.6] [INTERNATIONAL] [johnbl] MinimapCursorPlugin
All credits go to User5981. I just extracted the part of his HuntersVengeancePlugin that draws a cursor on the minimap and exposed the configuration.
Here's what it looks like:
Download: MinimapCursorPlugin.cs
Install:
Save as plugins/johnbl/MinimapCursorPlugin.cs
Customization:
Default theme customization 101
Settings (paste this in the Customization part of User/PluginEnablerOrDisablerPlugin.cs):
PHP Code:
// Settings for Minimap Cursor Plugin
Hud.RunOnPlugin<johnbl.MinimapCursorPlugin>(plugin =>
{
plugin.ShowInTown = true;
plugin.MiniMapVisorDecorator = new WorldDecoratorCollection(
new MapShapeDecorator(Hud)
{
Brush = Hud.Render.CreateBrush(255, 255, 255, 255, 1), // Alpha, Red, Green, Blue, Width
ShapePainter = new PlusShapePainter(Hud), // List of shapes in plugins\Default\ShapePainters
Radius = 15,
},
new MapShapeDecorator(Hud)
{
Brush = Hud.Render.CreateBrush(255, 255, 255, 255, 1),
ShapePainter = new CircleShapePainter(Hud),
Radius = 10,
}
);
});
// End of Settings for Minimap Cursor Plugin
Last edited by johnbl; 11-29-2017 at 05:48 PM.
Reason: Fixed for proper customization. Thanks Jack and gjuz.
-
Post Thanks / Like - 1 Thanks
(Sarge) (1 members gave Thanks to johnbl for this useful post)
-
Active Member
I'm not sure what this plugin does exactly
-
Contributor
Originally Posted by
Csavo
I'm not sure what this plugin does exactly
Show on minimap position of your ingame cursor.
Really good plugin but play with it 2hr and im little confused. With more time im probably get used to and will be better
-
Active Member
Originally Posted by
Csavo
I'm not sure what this plugin does exactly
As MrOne said, it shows the position of your mouse cursor on the minimap. I noticed that I look more at the minimap than the actual screen when doing fast runs, so being able to see where the mouse is pointed without looking at the screen is very useful for me.
Last edited by johnbl; 11-29-2017 at 08:25 AM.
-
Contributor
Originally Posted by
johnbl
Settings (paste this in the Customization part of User/PluginEnablerOrDisablerPlugin.cs):
PHP Code:
// Settings for Minimap Cursor Plugin
Hud.RunOnPlugin<johnbl.MinimapCursorPlugin>(plugin =>
{
plugin.PlusSize = 10;
plugin.PlusAlpha = 255;
plugin.PlusRed = 255;
plugin.PlusGreen = 255;
plugin.PlusBlue = 255;
plugin.PlusWidth = 1f;
plugin.CircleSize = 5;
plugin.CircleAlpha = 255;
plugin.CircleRed = 255;
plugin.CircleGreen = 255;
plugin.CircleBlue = 255;
plugin.CircleWidth = 1f;
});
// End of Settings for Minimap Cursor Plugin
your discribed settings will not work, because the variables are used during "loadingTime" of Hud.
"customization time" is after "loading time", but the values are never used after "loading time"
use:
PHP Code:
Hud.RunOnPlugin<johnbl.MinimapCursorPlugin>(plugin => {
//plus
(plugin.MiniMapVisorDecorator.Decorators[0] as MapShapeDecorator).Brush = Hud.Render.CreateBrush(Alpha,Red,Green,Blue,Width);
//circle
(plugin.MiniMapVisorDecorator.Decorators[1] as MapShapeDecorator).Brush = Hud.Render.CreateBrush(Alpha,Red,Green,Blue,Width);
});
greetz gjuz
-
Active Member
Thanks for the heads up gjuz. Can I just move MiniMapVisorDecorator into the PaintWorld function? That way my customization code works, but I don't know if there are other consequences.
-
Savvy ? 🐒
Originally Posted by
johnbl
Thanks for the heads up gjuz. Can I just move MiniMapVisorDecorator into the PaintWorld function? That way my customization code works, but I don't know if there are other consequences.
You should avoid creating brushes/fonts inside the paint method.
This would lead to heavy memory usage.(paint methods run more than 60 times per second and Load is only run once ;p)
-
Post Thanks / Like - 1 Thanks
johnbl (1 members gave Thanks to JackCeparou for this useful post)
-
Active Member
I was afraid of something like that.
If I create a secondary method, let's say public SetMiniMapDecorator() and put the creation of the decorator inside it, would it work?
-
Savvy ? 🐒
Well, you can do that and tell your users to make a call to it after changing other values like
PHP Code:
Hud.RunOnPlugin<MinimapCursorPlugin>(plugin => {
plugin.PlusSize = 42;
//other custom values
plugin.SetMiniMapDecorator();
});
Or simply let users redefine the whole decorator collection :
PHP Code:
Hud.RunOnPlugin<MinimapCursorPlugin>(plugin => {
plugin.MiniMapVisorDecorator = new WorldDecoratorCollection(
new MapShapeDecorator(Hud)
{
Brush = Hud.Render.CreateBrush(255, 255, 255, 255, 1),
ShapePainter = new PlusShapePainter(Hud),
Radius = 15,
},
new MapShapeDecorator(Hud)
{
Brush = Hud.Render.CreateBrush(255, 255, 255, 255, 1),
ShapePainter = new CircleShapePainter(Hud),
Radius = 10,
}
);
});
-
Post Thanks / Like - 1 Thanks
johnbl (1 members gave Thanks to JackCeparou for this useful post)
-
Contributor
I made this mistake, causing a serious memory leak
-
Contributor
Originally Posted by
johnbl
I was afraid of something like that.
If I create a secondary method, let's say public SetMiniMapDecorator() and put the creation of the decorator inside it, would it work?
yes you can do that. i would call that method init(), with a boolean to set if init() was called once in paintworld
or jacks version
greetz gjuz
-
Member
I can't seem to get this to work on HC mode, have I fucked something up?
-
Active Member
I have no idea because I don't have any free character slots to create a new HC character.
But I can't find anything in the code restricting it to SC.
Is it working for you on SC?
-
Member
Hi,
Nice plugin, i love it...
My question:
How to make sure that the cursor is in front of all other information on the minimap because when there are elite blue and orange, we no longer see the cursor !
Thanks
-
Active Member
Originally Posted by
ADV2015
Hi,
Nice plugin, i love it...
My question:
How to make sure that the cursor is in front of all other information on the minimap because when there are elite blue and orange, we no longer see the cursor !
Thanks
Some analysis has to be made on the Elite/Unique monsters plugin.
Do you know if it's possible to set the alpha value for those?
If yes, you could try to set it to a slightly lower value than what you're using for the cursor.