menu Image Rectangle
menu Image Rectangle {name} {x1} {y1} {x2} {y2} {colour} {fill} [width]Also searchable as: menu Image Rectangle
menu Image Rectangle draws a rectangle with corners x1, y1 and x2, y2 in an image. Positions are inside the image, 0, 0 being its top-left corner.
Parameters
Section titled “Parameters”| Parameter | Meaning |
|---|---|
name |
Name of an image created with menu Image Create. |
x1, y1, x2, y2 |
Two opposite corners. |
colour |
A colour, see Colours: a name such as red or btnface, or a $BBGGRR number. |
fill |
#true (any number other than 0) fills it with the same colour; #false (0) draws only the outline. |
width |
Optional outline width in pixels. Default: 1. |
$FEEEED is the transparent colour of images: painting with it makes those pixels see-through. A filled rectangle is the usual way to give an image a background.
Example
Section titled “Example”menu Clearmenu Window Size 84 84menu Image Create pic 10 10 64 64menu Image Rectangle pic 0 0 64 64 white #truemenu Image Rectangle pic 4 4 60 60 black #false 2menu Showhalt1.5 and 1.6
Section titled “1.5 and 1.6”- 1.6: a negative second corner (
x2,y2) is refused.
See also
Based on the EasyUO wiki, edited for EasyUO Reforged. This text is available under the GNU Free Documentation License 1.2.
The EasyUO 1.6 behaviour on this page was researched with help from the ScriptUO community: Gaderian's tutorial New Menu Code and how to adapt old scripts and the scripts its members share at scriptuo.com.