Skip to main content

image

Function image 

Source
pub fn image(source: impl Into<String>) -> Widget
Expand description

An image from a Yog image source — "item:apple", "block:stone", "sprite:button", "mymod:gui/logo" (see yog_gfx::image) — the host resolves it for its Minecraft version. Sized to the image’s natural size (16×16 until the host told it) unless given w/h; scaled into the widget per Widget::stretch (default Uniform), nearest-neighbour.