File tree 2 files changed +38
-0
lines changed
2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ local lvgl = require (" lvgl" )
2
+
3
+ Object {
4
+ flex = {
5
+ flex_direction = " row" ,
6
+ flex_wrap = " wrap" ,
7
+ justify_content = " center" ,
8
+ align_items = " center" ,
9
+ align_content = " center" ,
10
+ },
11
+ w = 400 ,
12
+ h = 100 ,
13
+ align = lvgl .ALIGN .CENTER ,
14
+
15
+ -- Button with label, inside a container
16
+ Object {
17
+ w = 150 ,
18
+ h = lvgl .PCT (80 ),
19
+ bg_color = " #aa0" ,
20
+
21
+ Button {
22
+ Label {
23
+ text = string.format (" BUTTON %d" , 1 ),
24
+ align = lvgl .ALIGN .CENTER
25
+ }
26
+ }:center ()
27
+ }:clear_flag (lvgl .FLAG .SCROLLABLE ),
28
+
29
+ -- Label inside a container
30
+ Object {
31
+ w = 150 ,
32
+ h = lvgl .PCT (80 ),
33
+ Label {
34
+ text = string.format (" label %d" , 2 )
35
+ }:center ()
36
+ }:clear_flag (lvgl .FLAG .SCROLLABLE )
37
+ }
Original file line number Diff line number Diff line change 41
41
42
42
createBtn (container , " keyboard" )
43
43
createBtn (container , " animation" )
44
+ createBtn (container , " declarative" )
44
45
createBtn (container , " pointer" )
45
46
createBtn (container , " analogTime" )
46
47
createBtn (container , " userdata" )
You can’t perform that action at this time.
0 commit comments