1786009593
This commit is contained in:
5248
Cargo.lock
generated
5248
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -8,4 +8,8 @@ embedded-graphics = "0.8.2"
|
||||
embedded-graphics-core = "0.4.1"
|
||||
evdev = "0.13.2"
|
||||
framebuffer = "0.3.1"
|
||||
linfb = "0.2.1"
|
||||
linfb = { version = "0.2.1", default-features = false }
|
||||
slint = { version = "1.17.1", default-features = false, features = ["compat-1-2", "libm", "renderer-software", "unsafe-single-threaded"] }
|
||||
|
||||
[build-dependencies]
|
||||
slint-build = "1.17.1"
|
||||
|
||||
8
build.rs
Normal file
8
build.rs
Normal file
@@ -0,0 +1,8 @@
|
||||
fn main() {
|
||||
slint_build::compile_with_config(
|
||||
"ui/main.slint",
|
||||
slint_build::CompilerConfiguration::new()
|
||||
.embed_resources(slint_build::EmbedResourcesKind::EmbedForSoftwareRenderer),
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
@@ -17,7 +17,6 @@ fn main() {
|
||||
let mut trekstor = Trekstor::new(60, app_state);
|
||||
|
||||
trekstor.update(|ctx, state| {
|
||||
// retuyrningf false will exit loop
|
||||
if ctx.input.is_just_released(KeyCode::BTN_TOUCH) {
|
||||
println!("Released {}x{}", ctx.input.x, ctx.input.y);
|
||||
state.x = ctx.input.x;
|
||||
|
||||
16
ui/main.slint
Normal file
16
ui/main.slint
Normal file
@@ -0,0 +1,16 @@
|
||||
import { AboutSlint, Button, VerticalBox } from "std-widgets.slint";
|
||||
|
||||
export component Demo {
|
||||
VerticalBox {
|
||||
alignment: start;
|
||||
Text {
|
||||
text: "Hello World!";
|
||||
font-size: 24px;
|
||||
horizontal-alignment: center;
|
||||
}
|
||||
AboutSlint {
|
||||
preferred-height: 150px;
|
||||
}
|
||||
HorizontalLayout { alignment: center; Button { text: "OK!"; } }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user