button: make pill [ tip: { USAGE: button "Hello" button -1 "Go!" button "Click me!" [print "click"] DESCRIPTION: Performs action when clicked. OPTIONS: 'info specifies read-only } size: 15x5 text: "" color: colors/theme-dark font: make default-font-heading [size: sizes/font - 2] feel: make feel [ over: make function! [face act pos] [ set-color face either all [act not find face/options 'info] [colors/theme-light] [colors/theme-dark] ] engage: make function! [face act event /local f] [ unless find face/options 'info [ do select [ down [set-color face colors/theme-light] alt-down [set-color face colors/theme-light] up [set-color face colors/theme-dark face/action/on-click face] alt-up [set-color face colors/theme-dark face/action/on-alt-click face] away [set-color face colors/theme-dark] ] act ] ] ] rebind: make function! [] [ color: colors/theme-dark font/size: sizes/font - 2 ] init: make function! [] [ all [negative? size/x size/x: 10000 size/x: 8 + first size-text self] all [find options 'info color = colors/theme-dark color: colors/outline-light] action/on-resize self ] ]