We will port our client to MacOS, too. If we are finished, I will update the source to work on MacOS, too. Like Bisonte said, it is only about the mouse pointer.Any chance for a MacOS adaption?
Kukulkan
We will port our client to MacOS, too. If we are finished, I will update the source to work on MacOS, too. Like Bisonte said, it is only about the mouse pointer.Any chance for a MacOS adaption?
Code: Select all
; TEST AND EXAMPLE CODE
XIncludeFile "rbutton_include.pbi"
OpenWindow(0, 100, 200, 290, 50, "rButton test window", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget)
SetWindowColor(0, RGB(255, 255, 255))
rbutton_SetFont("Arial", 9, #PB_Font_Bold | #PB_Font_Italic, RGB(255,255,255), -120)
rbutton_Init_OwnerDrawn(80, 30, GetWindowColor(0), RGBA(214,236,255,255), RGBA(0,220,255,255), RGBA(255,255,255,255), RGBA(60,225,137,255),5, 2)
Define regSmall1.i = rbutton_Create(#PB_Any, 0, "open", 10, 10, 0)
Define regSmall2.i = rbutton_Create(#PB_Any, 0, "infos", 105, 10, 0)
rbutton_Init_OwnerDrawn(80, 30, GetWindowColor(0), RGBA(236,214,214,255), RGBA(191,120,120,255), RGBA(255,255,255,255), RGBA(225,60,60,255),5, 2)
Define regSmall3.i = rbutton_Create(#PB_Any, 0, "Quit", 200, 10, 0)
Define Quit.i = 0
Repeat
Define Event.i = WaitWindowEvent()
If Event.i = #PB_Event_CloseWindow ; If the user has pressed on the close button
Quit.i = 1
EndIf
If Event.i = #PB_Event_Gadget
If EventGadget() = regSmall1.i
File$ = OpenFileRequester("Chose a file", "C:\", "file txt|*.txt",1)
EndIf
If EventGadget() = regSmall2.i
MessageRequester("Infos","Dummy")
EndIf
If EventGadget() = regSmall3.i
Quit.i = 1
EndIf
EndIf
rbutton_CheckHover(0)
Until Quit.i = 1
End
Code: Select all
; TEST AND EXAMPLE CODE
XIncludeFile "rbutton_include.pbi"
OpenWindow(0, 100, 200, 290, 50, "rButton test window", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget)
SetWindowColor(0, RGB(255, 255, 255))
rbutton_SetFont("Arial", 9, #PB_Font_Bold | #PB_Font_Italic, RGB(255,255,255), -120)
rbutton_Init_OwnerDrawn(80, 30, GetWindowColor(0), RGBA(214,236,255,255), RGBA(0,220,255,255), RGBA(255,255,255,255), RGBA(60,225,137,255),5, 2)
Define regSmall1.i = rbutton_Create(#PB_Any, 0, "open", 10, 10, 0)
Define regSmall2.i = rbutton_Create(#PB_Any, 0, "infos", 105, 10, 0)
rbutton_Init_OwnerDrawn(80, 30, GetWindowColor(0), RGBA(236,214,214,255), RGBA(191,120,120,255), RGBA(255,255,255,255), RGBA(225,60,60,255),5, 2)
Define regSmall3.i = rbutton_Create(#PB_Any, 0, "Quit", 200, 10, 0)
Define Quit.i = 0
Repeat
Define Event.i = WaitWindowEvent()
; I would do this before the handling. Depending on the used event you might want to have hover done before working.
rbutton_CheckHover(0)
If Event.i = #PB_Event_CloseWindow ; If the user has pressed on the close button
Quit.i = 1
EndIf
If Event.i = #PB_Event_Gadget
Define EG.i = EventGadget()
Define ET.i = EventType()
If ET.i = #PB_EventType_LeftClick ; somebody clicked the button with left click
Select EG.i
Case regSmall1.i
File$ = OpenFileRequester("Chose a file", "C:\", "file txt|*.txt",1)
Case regSmall2.i
MessageRequester("Infos","Dummy")
Case regSmall3.i
Quit.i = 1
EndSelect
EndIf
EndIf
Until Quit.i = 1
End
I dont wanted to sound bugged. Its absolutely ok to ask questions and I'm willing to help. It was not that stupid. No problemMrPrimus wrote:Hi kukulkan,
Thank you for your quick response and your explanation, I'll be more careful in the future before asking a question so stupid.