Then probably it's most easy to add all buttons to one column.
GIve 'hoofdmenu' width 12, so it spans the full column width.
Give the other buttons width 4, so they have 4/12 = 33% of the column width.
I guess 'bt_Hoofdmenu' should be a blocktitle, not a button.
With the following:
Code: Select all
var blocks={}
blocks['bt_Hoofdmenu'] = {
type: 'blocktitle',
title: 'Hoofdmenu',
width:12
}
var buttons = {}
//buttons.hoofdmenu= {width:12, image: 'img/hoofdmenu_mirror.png', title: 'Hoofdmenu' ,slide:0 }
buttons.huismodus= {width:4, image: 'img/house_mirror.png', title: 'Huismodus' ,slide:1 }
buttons.alarm= {width:4, image: 'img/alarmpanel_mirror.png', title: 'Alarm',slide: 2}
buttons.utility= {width:4, image: 'img/power_mirror.png', title: 'Elektra, Gas & Water' ,slide:3 }
buttons.verlichting= {width:4, image: 'img/Light-off_mirror.png', title: 'Verlichting',slide: 4}
buttons.temperatuur= {width:4, image: 'img/temp_mirror.png', title: 'Temperatuur' ,slide:5 }
buttons.weerstation= {width:4, image: 'img/weer_mirror.png', title: 'Weerstation',slide: 6}
buttons.kas_en_moestuin= {width:4, image: 'img/kas_mirror.png', title: 'Kas & Moestuin' ,slide:7 }
buttons.instellingen= {width:4, image: 'img/settings_mirror.png', title: 'Instellingen',slide: 8}
buttons.media= {width:4, image: 'img/media_mirror.png', title: 'Media' ,slide:9 }
buttons.nieuws= {width:4, image: 'img/nieuws_mirror.png', title: 'Nieuws' ,slide:10 }
buttons.plattegrond= {width:4, image: 'img/floorplan_mirror.png', title: 'Plattegrond' ,slide:11 }//buttons.domoticz= {width:3, image: 'img/weer_mirror.png', title: 'Weather',slide: 0}
var columns = {}
//Column[0] contains the 'goto mainmenu' button, so add column[0] on every screen.
columns[0] ={}
columns[0]['blocks'] = ['bt_Hoofdmenu',buttons.huismodus, buttons.alarm, buttons.utility, buttons.verlichting, buttons.temperatuur, buttons.weerstation, buttons.kas_en_moestuin, buttons.instellingen, buttons.media, buttons.nieuws, buttons.plattegrond]
columns[0]['width']=12;
//with columns[1] [2] [3] I define the first screen, the mainmenu
columns[1] = {}
columns[1]['width'] = 3;
columns[2] = {}
columns[2]['blocks'] = [];
columns[2]['width'] = 6;
columns[3] = {}
columns[3]['width'] = 3;
//Definition of screens
screens = {}
screens[1] = {
columns: [0, 1, 2, 3]
}
screens[2] = {
columns: [0]
}
screens[3] = {
columns: [0]
}