Add a button type

This commit is contained in:
Manuel Thalmann 2025-04-11 20:57:18 +02:00
parent 2a7c035a42
commit cbbf0bb596
Signed by: manuth
SSH key fingerprint: SHA256:HsMLC+7kJWALP6YCYCoopxNbUnghwSGLVcG76SECT5c
2 changed files with 19 additions and 0 deletions

7
gui/Cargo.lock generated Normal file
View file

@ -0,0 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "gui"
version = "0.1.0"

View file

@ -13,3 +13,15 @@ impl Screen {
pub trait Draw {
fn draw(&self);
}
pub struct Button {
pub width: u32,
pub height: u32,
pub label: String,
}
impl Draw for Button {
fn draw(&self) {
// code to actually draw a button
}
}