From dc0e2f947a7fa5e44da0ecd4922dab48a52531be Mon Sep 17 00:00:00 2001 From: Rafael Caricio Date: Sat, 20 Jun 2020 12:31:37 +0200 Subject: [PATCH] Add some guiding comments to example --- examples/button_click.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/button_click.rs b/examples/button_click.rs index 75ca15b..383f12d 100644 --- a/examples/button_click.rs +++ b/examples/button_click.rs @@ -21,16 +21,15 @@ fn main() -> Result<(), LvError> { let mut ui = UI::init()?; - // Implement and register your display: + // Register your display: ui.disp_drv_register(display)?; - // Initial state of input + // Define the initial state of your input let latest_touch_status: Cell = Cell::new(InputData::Touch(Point::new(0, 0)).released().once()); - // Register the input mode + // Register a new input device that's capable of reading the current state of the input let mut touch_screen = Pointer::new(|| latest_touch_status.get()); - ui.indev_drv_register(&mut touch_screen)?; // Create screen and widgets