use raui_app::app::declarative::DeclarativeApp;
use raui_core::{
make_widget,
widget::{
component::image_box::{ImageBoxProps, image_box},
unit::image::{ImageBoxFrame, ImageBoxImage, ImageBoxImageScaling, ImageBoxMaterial},
},
};
fn main() {
let tree = make_widget!(image_box).with_props(ImageBoxProps {
material: ImageBoxMaterial::Image(ImageBoxImage {
id: "./demos/in-game/resources/images/slider-background.png".to_owned(),
scaling: ImageBoxImageScaling::Frame(ImageBoxFrame {
source: 3.0.into(),
destination: 64.0.into(),
..Default::default()
}),
..Default::default()
}),
..Default::default()
});
DeclarativeApp::simple("Image Box - Frame", tree);
}