Struct oxygengine_prototype::gui::Gui
source · pub struct Gui<'a, T> {
pub context: &'a mut T,
/* private fields */
}
Fields§
§context: &'a mut T
Implementations§
source§impl<'a, T> Gui<'a, T>
impl<'a, T> Gui<'a, T>
pub fn layout(&self) -> Rect
pub fn pointer(&self) -> Vec2
pub fn input_consumed(&self) -> bool
pub fn hovers(&self) -> bool
pub fn widget<W>(&mut self, widget: W) -> Rectwhere W: GuiWidget<T>,
pub fn scope<F>(&mut self, f: F)where F: FnMut(Gui<'_, T>),
pub fn clip<F>(&mut self, f: F)where F: FnMut(Gui<'_, T>),
pub fn freeform_aligned<F>( &mut self, size: impl Into<Vec2>, alignment: impl Into<Vec2>, pivot: impl Into<Vec2>, f: F ) -> Rectwhere F: FnMut(Gui<'_, T>),
pub fn freeform_at<F>( &mut self, size: impl Into<Vec2>, position: impl Into<Vec2>, pivot: impl Into<Vec2>, relative: bool, f: F ) -> Rectwhere F: FnMut(Gui<'_, T>),
pub fn growable<F>(&mut self, alignment: impl Into<Vec2>, f: F) -> Rectwhere F: FnMut(Gui<'_, T>) -> Rect,
pub fn horizontal_overflow<F>(&mut self, alignment: Scalar, f: F) -> Rectwhere F: FnMut(Gui<'_, T>) -> Rect,
pub fn vertical_overflow<F>(&mut self, alignment: Scalar, f: F) -> Rectwhere F: FnMut(Gui<'_, T>) -> Rect,
pub fn scale<F>( &mut self, value: Scalar, alignment: impl Into<Vec2>, f: F ) -> Rectwhere F: FnMut(Gui<'_, T>),
pub fn margin<F>( &mut self, left: Scalar, right: Scalar, top: Scalar, bottom: Scalar, f: F ) -> Rectwhere F: FnMut(Gui<'_, T>),
pub fn absolute<F>(&mut self, layout: Rect, f: F)where F: FnMut(Gui<'_, T>),
pub fn section<F>(&mut self, relative: Rect, f: F) -> Rectwhere F: FnMut(Gui<'_, T>),
pub fn section_left<F>(&mut self, value: Scalar, f: F) -> Rectwhere F: FnMut(Gui<'_, T>),
pub fn section_right<F>(&mut self, value: Scalar, f: F) -> Rectwhere F: FnMut(Gui<'_, T>),
pub fn section_top<F>(&mut self, value: Scalar, f: F) -> Rectwhere F: FnMut(Gui<'_, T>),
pub fn section_bottom<F>(&mut self, value: Scalar, f: F) -> Rectwhere F: FnMut(Gui<'_, T>),
pub fn cut_left<F>(&mut self, value: Scalar, f: F) -> Rectwhere F: FnMut(Gui<'_, T>),
pub fn cut_right<F>(&mut self, value: Scalar, f: F) -> Rectwhere F: FnMut(Gui<'_, T>),
pub fn cut_top<F>(&mut self, value: Scalar, f: F) -> Rectwhere F: FnMut(Gui<'_, T>),
pub fn cut_bottom<F>(&mut self, value: Scalar, f: F) -> Rectwhere F: FnMut(Gui<'_, T>),
pub fn grow_left<F>(&mut self, value: Scalar, f: F) -> Rectwhere F: FnMut(Gui<'_, T>),
pub fn grow_right<F>(&mut self, value: Scalar, f: F) -> Rectwhere F: FnMut(Gui<'_, T>),
pub fn grow_top<F>(&mut self, value: Scalar, f: F) -> Rectwhere F: FnMut(Gui<'_, T>),
pub fn grow_bottom<F>(&mut self, value: Scalar, f: F) -> Rectwhere F: FnMut(Gui<'_, T>),
pub fn offset<F>(&mut self, value: impl Into<Vec2>, f: F) -> Rectwhere F: FnMut(Gui<'_, T>),
pub fn horizontal_number<F>(&mut self, count: usize, f: F)where F: FnMut(Gui<'_, T>, usize),
pub fn horizontal_separation<F>(&mut self, value: Scalar, f: F)where F: FnMut(Gui<'_, T>, usize),
pub fn vertical_number<F>(&mut self, count: usize, f: F)where F: FnMut(Gui<'_, T>, usize),
pub fn vertical_separation<F>(&mut self, value: Scalar, f: F)where F: FnMut(Gui<'_, T>, usize),
pub fn grid_number<F>(&mut self, cols: usize, rows: usize, f: F)where F: FnMut(Gui<'_, T>, usize, usize),
pub fn grid_separation<F>( &mut self, cell_width: Scalar, cell_height: Scalar, f: F )where F: FnMut(Gui<'_, T>, usize, usize),
pub fn sprite(&mut self, name: impl ToString, tint: Rgba)
pub fn sprite_region(&mut self, name: impl ToString, tint: Rgba, region: Rect)
pub fn sprite_sliced( &mut self, name: impl ToString, tint: Rgba, image_region: Rect, (left, right, top, bottom): (Scalar, Scalar, Scalar, Scalar), frame: bool )
pub fn text( &mut self, font: impl ToString, content: impl Into<HaTextContent>, size: Scalar, color: Rgba, alignment: impl Into<Vec2> )
pub fn gui(&mut self) -> Gui<'_, T>
Auto Trait Implementations§
impl<'a, T> RefUnwindSafe for Gui<'a, T>where T: RefUnwindSafe,
impl<'a, T> Send for Gui<'a, T>where T: Send,
impl<'a, T> Sync for Gui<'a, T>where T: Sync,
impl<'a, T> Unpin for Gui<'a, T>
impl<'a, T> !UnwindSafe for Gui<'a, T>
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