SF Symbols
Posted: Tue Feb 01, 2022 12:43 am
Would anyone have any pointers on how to render SF Symbols in a UI - gadgets or menus? I've only seen examples for calling it in Swift vs the Cocoa function that PB supports. Thanks in advance.
Code: Select all
EnableExplicit
OpenWindow(0,#PB_Ignore,#PB_Ignore,300,200,"SF Symbols",#PB_Window_SystemMenu|#PB_Window_ScreenCentered)
Define star = CocoaMessage(0,0,"NSImage imageWithSystemSymbolName:$",@"star","accessibilityDescription:",#Null)
ImageGadget(0,10,10,32,32,star)
CreateImageMenu(0,WindowID(0))
MenuTitle("SF Symbols")
MenuItem(0,"Star",star)
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow