mirror of
https://github.com/griffi-gh/hUI.git
synced 2024-11-21 22:58:42 -06:00
use derive macro in examples
This commit is contained in:
parent
72ff23ac0b
commit
4e4c16ce76
|
@ -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]
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue