pub trait MockUIInteraction {
    // Required methods
    fn click_button<Marker: Component>(&mut self);
    fn hover_button<Marker: Component>(&mut self);
}
Expand description

Send fake UI interaction for testing purposes.

Required Methods§

source

fn click_button<Marker: Component>(&mut self)

Presses all bevy::ui buttons with the matching Marker component

Changes their [Interaction] component to [Interaction::Pressed]

source

fn hover_button<Marker: Component>(&mut self)

Hovers over all bevy::ui buttons with the matching Marker component

Changes their [Interaction] component to [Interaction::Pressed]

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl MockUIInteraction for App

source§

fn click_button<Marker: Component>(&mut self)

source§

fn hover_button<Marker: Component>(&mut self)

source§

impl MockUIInteraction for World

source§

fn click_button<Marker: Component>(&mut self)

source§

fn hover_button<Marker: Component>(&mut self)

Implementors§