pub struct UiDsl<D = LayoutDsl> { /* private fields */ }Expand description
The DslBundle for bevy_ui.
Implementations§
Source§impl<D> UiDsl<D>
impl<D> UiDsl<D>
Sourcepub fn border_px(&mut self, pixels: u16)
pub fn border_px(&mut self, pixels: u16)
Set the node’s border width, in pixels. Note that this is only visual and has
no effect on the cuicui_layout algorithm.
Due to a limitation of CSS, border will be spawned as a child of the actual node entity.
This is because it would be otherwise impossible to arrange children independently of parent properties.
Sourcepub fn border_color(&mut self, color: Color)
pub fn border_color(&mut self, color: Color)
Set the node’s border color.
Due to a limitation of CSS, border will be spawned as a child of the actual node entity.
This is because it would be otherwise impossible to arrange children independently of parent properties.
Sourcepub fn break_on_char(&mut self)
pub fn break_on_char(&mut self)
If this node contains text, set its break behavior to breaking on individual characters.
By default, text breaks on word.
Sourcepub fn no_wrap(&mut self)
pub fn no_wrap(&mut self)
If this node contains text, only go to next line on ‘\n’ in text.
By default, text breaks on word.
Sourcepub fn text_right_align(&mut self)
pub fn text_right_align(&mut self)
If this node contains text, align it to the left.
By default, text is aligned left
Sourcepub fn text_center_align(&mut self)
pub fn text_center_align(&mut self)
If this node contains text, align it to the center.
By default, text is aligned left.
Trait Implementations§
Source§impl<D: DslBundle> DslBundle for UiDsl<D>
impl<D: DslBundle> DslBundle for UiDsl<D>
Source§fn insert(&mut self, cmds: &mut EntityCommands<'_, '_, '_>)
fn insert(&mut self, cmds: &mut EntityCommands<'_, '_, '_>)
Bundle to the entity.Source§fn node(
&mut self,
cmds: &mut EntityCommands<'_, '_, '_>,
f: impl FnOnce(&mut ChildBuilder<'_, '_, '_>),
)
fn node( &mut self, cmds: &mut EntityCommands<'_, '_, '_>, f: impl FnOnce(&mut ChildBuilder<'_, '_, '_>), )
Source§impl IntoUiBundle<UiDsl> for &str
impl IntoUiBundle<UiDsl> for &str
Source§fn into_ui_bundle(self) -> Self::Target
fn into_ui_bundle(self) -> Self::Target
self into an Self::Target, will be directly inserted by
LayoutDsl::ui with an additional Node component. Read moreSource§impl IntoUiBundle<UiDsl> for Handle<Image>
impl IntoUiBundle<UiDsl> for Handle<Image>
Source§fn into_ui_bundle(self) -> Self::Target
fn into_ui_bundle(self) -> Self::Target
self into an Self::Target, will be directly inserted by
LayoutDsl::ui with an additional Node component. Read moreSource§impl IntoUiBundle<UiDsl> for ImageBundle
impl IntoUiBundle<UiDsl> for ImageBundle
Source§type Target = <ImageBundle as IntoUiBundle<UiDsl>>::Target
type Target = <ImageBundle as IntoUiBundle<UiDsl>>::Target
Bundle this can be converted into.Source§fn into_ui_bundle(self) -> Self::Target
fn into_ui_bundle(self) -> Self::Target
self into an Self::Target, will be directly inserted by
LayoutDsl::ui with an additional Node component. Read moreSource§impl IntoUiBundle<UiDsl> for ImageBundle
impl IntoUiBundle<UiDsl> for ImageBundle
Source§type Target = ImageBundle
type Target = ImageBundle
Bundle this can be converted into.Source§fn into_ui_bundle(self) -> Self::Target
fn into_ui_bundle(self) -> Self::Target
self into an Self::Target, will be directly inserted by
LayoutDsl::ui with an additional Node component. Read moreSource§impl IntoUiBundle<UiDsl> for String
impl IntoUiBundle<UiDsl> for String
Source§fn into_ui_bundle(self) -> Self::Target
fn into_ui_bundle(self) -> Self::Target
self into an Self::Target, will be directly inserted by
LayoutDsl::ui with an additional Node component. Read moreSource§impl IntoUiBundle<UiDsl> for Text
impl IntoUiBundle<UiDsl> for Text
Source§type Target = <TextBundle as IntoUiBundle<UiDsl>>::Target
type Target = <TextBundle as IntoUiBundle<UiDsl>>::Target
Bundle this can be converted into.Source§fn into_ui_bundle(self) -> Self::Target
fn into_ui_bundle(self) -> Self::Target
self into an Self::Target, will be directly inserted by
LayoutDsl::ui with an additional Node component. Read moreSource§impl IntoUiBundle<UiDsl> for TextBundle
impl IntoUiBundle<UiDsl> for TextBundle
Source§type Target = <TextBundle as IntoUiBundle<UiDsl>>::Target
type Target = <TextBundle as IntoUiBundle<UiDsl>>::Target
Bundle this can be converted into.Source§fn into_ui_bundle(self) -> Self::Target
fn into_ui_bundle(self) -> Self::Target
self into an Self::Target, will be directly inserted by
LayoutDsl::ui with an additional Node component. Read moreSource§impl IntoUiBundle<UiDsl> for TextBundle
impl IntoUiBundle<UiDsl> for TextBundle
Source§type Target = TextBundle
type Target = TextBundle
Bundle this can be converted into.Source§fn into_ui_bundle(self) -> Self::Target
fn into_ui_bundle(self) -> Self::Target
self into an Self::Target, will be directly inserted by
LayoutDsl::ui with an additional Node component. Read moreSource§impl IntoUiBundle<UiDsl> for UiImage
impl IntoUiBundle<UiDsl> for UiImage
Source§type Target = <ImageBundle as IntoUiBundle<UiDsl>>::Target
type Target = <ImageBundle as IntoUiBundle<UiDsl>>::Target
Bundle this can be converted into.Source§fn into_ui_bundle(self) -> Self::Target
fn into_ui_bundle(self) -> Self::Target
self into an Self::Target, will be directly inserted by
LayoutDsl::ui with an additional Node component. Read moreAuto Trait Implementations§
impl<D = LayoutDsl> !RefUnwindSafe for UiDsl<D>
impl<D = LayoutDsl> !UnwindSafe for UiDsl<D>
impl<D> Freeze for UiDsl<D>where
D: Freeze,
impl<D> Send for UiDsl<D>where
D: Send,
impl<D> Sync for UiDsl<D>where
D: Sync,
impl<D> Unpin for UiDsl<D>where
D: Unpin,
impl<D> UnsafeUnpin for UiDsl<D>where
D: UnsafeUnpin,
Blanket Implementations§
Source§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
Source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
T ShaderType for self. When used in AsBindGroup
derives, it is safe to assume that all images in self exist.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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
Source§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Self using data from the given World.