Wiki
Clone wikiMono:UI / Scripts / m_draw_icon
INTRODUCED: v0.1.0
LAST UPDATED: v0.1.1
m_draw_icon
Draws an Icon inside a bounding box in a location provided by the font align arguments, and with a provided colour.
Usage
m_draw_icon( 0, 0, 100, 100, spr_foo, 32, mono_ESide.left, fa_center, fa_middle, c_blue ); // Result: spr_foo drawn at a size of 32x32, centred at x:100, y:50 in c_blue.
Parameters
Type | Name | Default | Description |
---|---|---|---|
Real | x1 | The left bound to draw the Icon inside of. | |
Real | y1 | The top bound to draw the Icon inside of. | |
Real | x2 | The right bound to draw the Icon inside of. | |
Real | y2 | The bottom bound to draw the Icon inside of. | |
Sprite | sprite | The sprite to draw. | |
Real | size | The size to draw the sprite at. | |
Mono_ESide | labelSide | On which side to keep space for the label. | |
FA | halign | How to horizontally align the sprite. | |
FA | valign | How to vertically align the sprite. | |
Colour | blend | Which colour to draw the sprite in. |
See Also
Updated