Reputation: 805
In PebbleJS, can you colour menu items individually? As far as I know, you can only colour the entire menu.
An example of what I would like to do would have the first menu item green, the second blue, the third yellow and so on.
Upvotes: 0
Views: 43
Reputation: 3400
A menu is a type of Window that displays a standard Pebble menu on the screen of Pebble.
Just like any window, you can initialize a Menu by passing an object to the constructor or by calling accessors to change the properties.The properties available on a Menu are:
A menu contains one or more sections.The properties available on a section are:
Each section has a title and contains zero or more items. An item must have a title. Items can also optionally have a subtitle and an icon.
So from the docs it looks like the menu only allows for entire menu coloring, however you can include multiple sections in a menu, and each section can define its own colours, although this may mean you'd have a menu made up of multiple single items each with their own title, effectively doubling the size of the menu simply to get different colours in there. It looks like you can have a section with a title and zero items, so perhaps the section itself could act as the menu item.
You'll have to play around with that.
Upvotes: 1