📋 Metadata
- Author: roaoao
- Date: 2019-05-26 21:33:37
- Type:
answer - Reply to: post_02352
- Replies (1): post_02360
💬 Content
casterle:
how to apply state highlighting to my pie menu slots
Depends on the button/slot you want to highlight.
casterle:
For example, on the standard Z menu, the state is displayed by highlighting enabled items with a blue background.
Z menu “uses” this code in the first slot of the pie (Custom tab):
L.prop(C.space_data.shading, "type", expand=True)
In Blender 2.80+ you can highlight tool buttons using depress=True argument (Custom tab):
L.operator("pme.exec", text="Hello World", depress=True).cmd = "print('Hello World')"