Re: Shaped Forms in OSX
Posted: Mon Oct 07, 2013 2:08 pm
The example you mention creates a custom class.
It's too complicated.
I suggest making a PB window transparent and place an image to indicate the basic shape
It's too complicated.
I suggest making a PB window transparent and place an image to indicate the basic shape
Code: Select all
CreateImage(0, 300, 200, 32, #PB_Image_Transparent)
StartDrawing(ImageOutput(0))
DrawingMode(#PB_2DDrawing_AllChannels)
RoundBox(0, 0, 300, 200, 30, 30, RGBA(160, 160, 160, 255))
StopDrawing()
If OpenWindow(0, 0, 0, 300, 200, "PureBasic Window", #PB_Window_BorderLess | #PB_Window_ScreenCentered | #PB_Window_Invisible)
CocoaMessage(0, WindowID(0), "setOpaque:", #NO)
CocoaMessage(0, WindowID(0), "setBackgroundColor:", CocoaMessage(0, 0, "NSColor clearColor"))
HideWindow(0, #False)
ImageGadget(0, 0, 0, 300, 200, ImageID(0))
ButtonGadget(1, 10, 10, 100, 30, "Quit")
Repeat
Event = WaitWindowEvent()
If Event = #PB_Event_Gadget And EventGadget() = 1
Break
EndIf
ForEver
EndIf