Menu Icons
Using Icons on our Menus
While we can't really add our own icons on the fly as easily, something we can do somewhat easily is use the existing Slate Icons!
Finding Icons To Use
To browse available icons, I recommend thee Slate Style Browser plugin available on FAB:
We can launch this plugin's tool from the Tools dropdown menu:

The Slate Style Browse allows us to quickly scan through all available Slate Icons, providing the exact information we need for our Python menu classes:

Adding Icons in our Menu Class
The key thing we want to add to our class' init is the following line:
That's all there is to it! Just find a Slate Icon we like and copy its Style Set and Property Name
Using the Details Button icon as an example, here's what our class now looks like:
And now our menu class has an icon:

Dynamic Icon
We can also make it dynamic, too!
Note: The Icon does not refresh on Tick like the Label does, most menus only call this function once when the menu list is displayed
Full Class Code
Last updated