Enum GuiDraw
pub enum GuiDraw {
Sprite {
sprite: Cow<'static, str>,
x: i32,
y: i32,
w: i32,
h: i32,
region: Option<[i32; 4]>,
color: u32,
blend: Blend,
},
AtlasSprite {
sprite: Cow<'static, str>,
x: i32,
y: i32,
w: i32,
h: i32,
color: u32,
},
Blit {
texture: Cow<'static, str>,
blend: Blend,
x: i32,
y: i32,
w: i32,
h: i32,
uv: [f32; 2],
src: [i32; 2],
tex: [i32; 2],
color: u32,
},
Fill {
x0: i32,
y0: i32,
x1: i32,
y1: i32,
color: u32,
},
Text {
text: Text,
x: i32,
y: i32,
color: u32,
shadow: bool,
},
Item {
slot: u32,
x: i32,
y: i32,
seed: i32,
scale: [f32; 2],
pivot: [f32; 2],
},
Push(Vec<PoseOp>),
Pop,
}Expand description
One GuiGraphicsExtractor call.
Text deeper than 512 nodes refuses the whole command buffer at the game boundary.
Variants§
Sprite
blitSprite(pipeline, sprite, x, y, w, h, color); region =
(spriteW, spriteH, u, v) for the partial overload.
Fields
§
blend: BlendAtlasSprite
blitSprite(pipeline, TextureAtlasSprite, ...) with a block atlas
sprite (the nether portal overlay).
Blit
blit(pipeline, texture, x, y, u, v, w, h, srcW, srcH, texW, texH, color); texture is the path under textures/ without .png.
Fields
§
blend: BlendFill
fill(x0, y0, x1, y1, color) with the corners sorted.
Text
text(font, text, x, y, argb, dropShadow).
Item
item(owner, stack, x, y, seed) for a hotbar slot (0-8, 40 = off hand)
under the pose’s x/y scale about (cx, cy) (the pop squeeze).
Push(Vec<PoseOp>)
pose().pushMatrix() followed by ops.
Pop
pose().popMatrix().
Trait Implementations§
impl StructuralPartialEq for GuiDraw
Auto Trait Implementations§
impl Freeze for GuiDraw
impl RefUnwindSafe for GuiDraw
impl Send for GuiDraw
impl Sync for GuiDraw
impl Unpin for GuiDraw
impl UnsafeUnpin for GuiDraw
impl UnwindSafe for GuiDraw
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more