UI.RadioAt
static bool RadioAt(string text, bool active, Sprite imageOff, Sprite imageOn, UIBtnLayout imageLayout, Vec3 topLeftCorner, Vec2 size)
A Radio is similar to a button, except you can specify if it looks pressed or not regardless of interaction. This can be useful for radio-like behavior! Check an enum for a value, and use that as the ‘active’ state, Then switch to that enum value if Radio returns true. This version allows you to override the images used by the Radio.
| string text | Text to display on the Radio and id for tracking element state. MUST be unique within current hierarchy. |
| bool active | Does this button look like it’s pressed? |
| Sprite imageOff | Image to use when the radio value is false. |
| Sprite imageOn | Image to use when the radio value is true. |
| UIBtnLayout imageLayout | This enum specifies how the text and image should be laid out on the radio. 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! |
Found an issue with these docs, or have some additional questions? Create an Issue on Github!