UI.ButtonImgAt
static bool ButtonImgAt(string text, Sprite image, UIBtnLayout imageLayout, Vec3 topLeftCorner, Vec2 size)
A variant of UI.ButtonImg that doesn’t use the layout system, and instead goes exactly where you put it.
string text | Text to display on the button and id for tracking element state. MUST be unique within current hierarchy. |
Sprite image | This is the image that will be drawn along with the text. See imageLayout for where the image gets drawn! |
UIBtnLayout imageLayout | This enum specifies how the text and image should be laid out on the button. For example, UIBtnLayout.Left will have the image on the left, and text on the right. |
Vec3 topLeftCorner | This is the top left corner of the UI element relative to the current Hierarchy. |
Vec2 size | The layout size for this element in Hierarchy space. |
RETURNS: bool | Will return true only on the first frame it is pressed! |
static bool ButtonImgAt(string text, Sprite image, Color imageTint, UIBtnLayout imageLayout, Vec3 topLeftCorner, Vec2 size)
A variant of UI.ButtonImg that doesn’t use the layout system, and instead goes exactly where you put it.
string text | Text to display on the button and id for tracking element state. MUST be unique within current hierarchy. |
Sprite image | This is the image that will be drawn along with the text. See imageLayout for where the image gets drawn! |
UIBtnLayout imageLayout | This enum specifies how the text and image should be laid out on the button. For example, UIBtnLayout.Left will have the image on the left, and text on the right. |
Vec3 topLeftCorner | This is the top left corner of the UI element relative to the current Hierarchy. |
Vec2 size | The layout size for this element in Hierarchy space. |
Color imageTint | The Sprite’s color will be multiplied by this tint. The default is White(1,1,1,1). |
RETURNS: bool | Will return true only on the first frame it is pressed! |
Found an issue with these docs, or have some additional questions? Create an Issue on Github!