[−][src]Trait amethyst_ui::WidgetId
A WidgetId is the type by which the different widgets of a type will be differentiated when you create and retrieve them. Generally you'll want something here that can generate a random id with a low chance of collision, since auto generation will be used whenever you don't explicitly don't provide an id to widget builders. It's possible to use something like a bare enum as a WidgetId, but be aware that whenever you're not supplying a WidgetId, you'll probably overwrite an existing widget that had the same default id.
Required methods
fn generate(last: &Option<Self>) -> Self
Generate a new widget id. This function can optionally be passed the last ID that was generated, to make sequential ids possible.