App improvements (#103)
This commit is contained in:
committed by
GitHub
parent
c7314546fe
commit
f31c7f00ae
@@ -42,7 +42,7 @@ UI is created with [lvgl](https://github.com/lvgl/lvgl) which has lots of [widge
|
||||
Creating a touch-capable UI is [easy](https://docs.lvgl.io/9.0/get-started/quick-overview.html) and doesn't require your own render loop!
|
||||
|
||||
```C++
|
||||
static void app_show(tt::app::App app, lv_obj_t* parent) {
|
||||
static void onShow(tt::app::App app, lv_obj_t* parent) {
|
||||
// Default toolbar with app name and close button
|
||||
lv_obj_t* toolbar = tt::lvgl::toolbar_create(parent, app);
|
||||
lv_obj_align(toolbar, LV_ALIGN_TOP_MID, 0, 0);
|
||||
@@ -57,7 +57,7 @@ static void app_show(tt::app::App app, lv_obj_t* parent) {
|
||||
extern const tt::app::Manifest manifest = {
|
||||
.id = "HelloWorld", // Used to identify and start an app
|
||||
.name = "Hello World", // Shown on the desktop and app's toolbar
|
||||
.onShow = &app_show // A minimal setup sets the on_show() function
|
||||
.onShow = onShow // A minimal setup sets the onShow() function
|
||||
};
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user