Class IconUtil
- Namespace
- Vintagestory.API.Client
- Assembly
- VintagestoryAPI.dll
public class IconUtil
- Inheritance
-
IconUtil
- Inherited Members
- Extension Methods
Constructors
IconUtil(ICoreClientAPI)
Creates a new IconUtil instance.
public IconUtil(ICoreClientAPI capi)
Parameters
capi
ICoreClientAPIThe Client API.
Fields
CustomIcons
public Dictionary<string, IconRendererDelegate> CustomIcons
Field Value
Methods
DrawArrowRight(Context, double, bool, bool)
public void DrawArrowRight(Context cr, double lineWidth = 5, bool strokeOrFill = true, bool defaultPattern = true)
Parameters
DrawConnectionQuality(Context, double, double, int, double)
Draws 5 vertical bars of increasing size and Quality amount of them green
public void DrawConnectionQuality(Context ctx, double x, double y, int quality, double size)
Parameters
DrawCross(Context, double, double, double, double, bool)
public void DrawCross(Context ctx, double x, double y, double lineWidth, double size, bool preserverePath = false)
Parameters
DrawFlame(Context, double, bool, bool)
public void DrawFlame(Context cr, double lineWidth = 3, bool strokeOrFill = true, bool defaultPattern = true)
Parameters
DrawIcon(Context, string, double, double, double, double, double[])
Draws the icon.
public void DrawIcon(Context cr, string type, double x, double y, double width, double height, double[] rgba)
Parameters
cr
ContextThe context.
type
stringThe type to draw
x
doubleX position of the Icon.
y
doubleY position of the Icon.
width
doubleWidth of the Icon.
height
doubleHeight of the Icon.
rgba
double[]The color of the icon.
DrawIconInt(Context, string, int, int, float, float, double[])
Draws the icon.
public void DrawIconInt(Context cr, string type, int x, int y, float width, float height, double[] rgba)
Parameters
cr
ContextThe context.
type
stringThe type of icon to draw
x
intX position of the Icon.
y
intY position of the Icon.
width
floatWidth of the Icon.
height
floatHeight of the Icon.
rgba
double[]The color of the icon.
DrawLeftMouseButton(Context, int, int, float, float, double[])
public void DrawLeftMouseButton(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
DrawMapMarker(Context, int, int, float, float, double[])
public void DrawMapMarker(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
DrawMapPlayer(Context, int, int, float, float, double[], double[])
public void DrawMapPlayer(Context cr, int x, int y, float width, float height, double[] strokeRgba, double[] fillRgba)
Parameters
DrawPen(Context, double, double, double, double)
public void DrawPen(Context ctx, double x, double y, double lineWidth, double size)
Parameters
DrawPlus(Context, int, int, float, float, double[], double)
public void DrawPlus(Context ctx, int x, int y, float width, float height, double[] strokeRgba, double lineWidth)
Parameters
DrawRandomSymbol(Context, double, double, double, double[], double, int, int)
public void DrawRandomSymbol(Context ctx, double x, double y, double size, double[] color, double lineWidth, int seed, int addLines = 0)
Parameters
DrawRightMouseButton(Context, int, int, float, float, double[])
public void DrawRightMouseButton(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
DrawVSGear(Context, ImageSurface, int, int, float, float, double[])
public void DrawVSGear(Context cr, ImageSurface surface, int x, int y, float width, float height, double[] rgba)
Parameters
DrawWayointBee(Context, int, int, float, float, double[])
public void DrawWayointBee(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
DrawWaypointCave(Context, int, int, float, float, double[])
public void DrawWaypointCave(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
DrawWaypointCircle(Context, int, int, float, float, double[])
public void DrawWaypointCircle(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
DrawWaypointHome(Context, int, int, float, float, double[])
public void DrawWaypointHome(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
DrawWaypointLadder(Context, int, int, float, float, double[])
public void DrawWaypointLadder(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
DrawWaypointPick(Context, int, int, float, float, double[])
public void DrawWaypointPick(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
DrawWaypointPlayer(Context, int, int, float, float, double[])
public void DrawWaypointPlayer(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
DrawWaypointRocks(Context, int, int, float, float, double[])
public void DrawWaypointRocks(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
DrawWaypointRuins(Context, int, int, float, float, double[])
public void DrawWaypointRuins(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
DrawWaypointSpiral(Context, int, int, float, float, double[])
public void DrawWaypointSpiral(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
DrawWaypointStar1(Context, int, int, float, float, double[])
public void DrawWaypointStar1(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
DrawWaypointStar2(Context, int, int, float, float, double[])
public void DrawWaypointStar2(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
DrawWaypointTrader(Context, int, int, float, float, double[])
public void DrawWaypointTrader(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
DrawWaypointVessel(Context, int, int, float, float, double[])
public void DrawWaypointVessel(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawairbrush_svg(Context, int, int, float, float, double[])
public void Drawairbrush_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawapple_svg(Context, int, int, float, float, double[])
public void Drawapple_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawbasket_svg(Context, int, int, float, float, double[])
public void Drawbasket_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawbelt_svg(Context, int, int, float, float, double[])
public void Drawbelt_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawboots_svg(Context, int, int, float, float, double[])
public void Drawboots_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawbracers_svg(Context, int, int, float, float, double[])
public void Drawbracers_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawbrush_svg(Context, int, int, float, float, double[])
public void Drawbrush_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawcape_svg(Context, int, int, float, float, double[])
public void Drawcape_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawcursor_svg(Context, int, int, float, float, double[])
public void Drawcursor_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawdice_svg(Context, int, int, float, float, double[])
public void Drawdice_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawduplicate_svg(Context, int, int, float, float, double[])
public void Drawduplicate_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Draweraser_svg(Context, int, int, float, float, double[])
public void Draweraser_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawerode_svg(Context, int, int, float, float, double[])
public void Drawerode_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawfloodfill_svg(Context, int, int, float, float, double[])
public void Drawfloodfill_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawgloves_svg(Context, int, int, float, float, double[])
public void Drawgloves_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawgrowshrink_svg(Context, int, int, float, float, double[])
public void Drawgrowshrink_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawhandheld_svg(Context, int, int, float, float, double[])
public void Drawhandheld_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawhat_svg(Context, int, int, float, float, double[])
public void Drawhat_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawhealth_svg(Context, int, int, float, float, double[])
public void Drawhealth_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawimport_svg(Context, int, int, float, float, double[])
public void Drawimport_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawlake_svg(Context, int, int, float, float, double[])
public void Drawlake_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawleft_svg(Context, int, int, float, float, double[])
public void Drawleft_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawline_svg(Context, int, int, float, float, double[])
public void Drawline_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawmask_svg(Context, int, int, float, float, double[])
public void Drawmask_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawmedal_svg(Context, int, int, float, float, double[])
public void Drawmedal_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawmenuicon_svg(Context, double, double, float, float, double[])
public void Drawmenuicon_svg(Context cr, double x, double y, float width, float height, double[] rgba)
Parameters
Drawnecklace_svg(Context, int, int, float, float, double[])
public void Drawnecklace_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawnone_svg(Context, int, int, float, float, double[])
public void Drawnone_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawoffhand_svg(Context, int, int, float, float, double[])
public void Drawoffhand_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawpullover_svg(Context, int, int, float, float, double[])
public void Drawpullover_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawraiselower_svg(Context, int, int, float, float, double[])
public void Drawraiselower_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawredo_svg(Context, int, int, float, float, double[])
public void Drawredo_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawrepeat_svg(Context, int, int, float, float, double[])
public void Drawrepeat_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawright_svg(Context, int, int, float, float, double[])
public void Drawright_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawring_svg(Context, int, int, float, float, double[])
public void Drawring_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawselect_svg(Context, int, int, float, float, double[])
public void Drawselect_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawshirt_svg(Context, int, int, float, float, double[])
public void Drawshirt_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawtree_svg(Context, int, int, float, float, double[])
public void Drawtree_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawtrousers_svg(Context, int, int, float, float, double[])
public void Drawtrousers_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
Drawundo_svg(Context, int, int, float, float, double[])
public void Drawundo_svg(Context cr, int x, int y, float width, float height, double[] rgba)
Parameters
GenTexture(int, int, DrawDelegate)
Generates the texture.
public LoadedTexture GenTexture(int width, int height, DrawDelegate drawHandler)
Parameters
width
intThe width of the drawing
height
intThe height of the drawing.
drawHandler
DrawDelegateA delegate which handles the drawing.
Returns
- LoadedTexture
The resulting built texture.
GenTexture(int, int, IAsset, double[])
public LoadedTexture GenTexture(int width, int height, IAsset asset, double[] rgba = null)
Parameters
Returns
SvgIconSource(AssetLocation)
public IconRendererDelegate SvgIconSource(AssetLocation loc)
Parameters
loc
AssetLocation
Returns
SvgIconSource(IAsset)
public IconRendererDelegate SvgIconSource(IAsset asset)
Parameters
asset
IAsset