Add 'type', 'label', rename 'icon' to 'img' in widget

This commit is contained in:
Pim van Pelt
2017-11-26 18:41:17 +01:00
parent a11336703e
commit fda8b332db
5 changed files with 108 additions and 12 deletions

View File

@ -13,7 +13,8 @@
"w": 48,
"h": 48,
"label": "One",
"type": 0
"type": 2,
"screen": "screen_one.json"
},
{
"name": "two",
@ -22,7 +23,17 @@
"w": 48,
"h": 48,
"label": "Two",
"type": 0
"type": 2,
"screen": "screen_two.json"
},
{
"name": "logo",
"x": 88,
"y": 48,
"w": 144,
"h": 144,
"type": 1,
"img": "/mongoose-os.jpg"
}
]
}

30
fs/screen_one.json Normal file
View File

@ -0,0 +1,30 @@
{
"name": "One",
"x": 20,
"y": 0,
"w": 320,
"h": 220,
"widgets": [
{
"name": "back",
"x": 16,
"y": 16,
"w": 48,
"h": 48,
"label": "Back",
"type": 2,
"screen": "screen_main.json"
},
{
"name": "one",
"x": 256,
"y": 16,
"w": 48,
"h": 48,
"label": "One",
"type": 1,
"img": "/flower.jpg"
}
]
}

30
fs/screen_two.json Normal file
View File

@ -0,0 +1,30 @@
{
"name": "Two",
"x": 20,
"y": 0,
"w": 320,
"h": 220,
"widgets": [
{
"name": "back",
"x": 16,
"y": 16,
"w": 48,
"h": 48,
"label": "Back",
"type": 2,
"screen": "screen_main.json"
},
{
"name": "two",
"x": 256,
"y": 16,
"w": 48,
"h": 48,
"label": "Two",
"type": 2,
"screen": "screen_two.json"
}
]
}