use derive macro in examples

This commit is contained in:
griffi-gh 2024-03-25 17:51:34 +01:00
parent 72ff23ac0b
commit 4e4c16ce76
3 changed files with 6 additions and 8 deletions

View file

@ -1,7 +1,6 @@
use hui::{
color, size,
color, size, Signal,
draw::TextureFormat,
signal::Signal,
layout::{Alignment, Direction},
element::{
container::Container,
@ -13,11 +12,11 @@ use hui::{
},
};
#[derive(Signal)]
enum CounterSignal {
Increment,
Decrement,
}
impl Signal for CounterSignal {}
#[path = "../boilerplate.rs"]
#[macro_use]

View file

@ -9,14 +9,13 @@ use hui::{
UiElementExt,
},
layout::{Alignment, Direction},
signal::Signal,
size,
size, Signal,
};
#[derive(Signal)]
enum CounterSignal {
ChangeValue(u32)
}
impl Signal for CounterSignal {}
#[path = "../boilerplate.rs"]
#[macro_use]

View file

@ -11,7 +11,7 @@ use hui::{
frame::nine_patch::{NinePatchAsset, NinePatchFrame},
layout::Alignment,
rect::Rect,
signal::Signal,
Signal,
size,
};
@ -19,8 +19,8 @@ use hui::{
#[macro_use]
mod boilerplate;
#[derive(Signal)]
struct SetValue(f32);
impl Signal for SetValue {}
ui_main!(
"hUI: 9-Patch demo",