nim-lang / ui

Beginnings of what might become Nim's official UI library.
MIT License
240 stars 32 forks source link

RadioButton listener added #12

Closed Vishal1707 closed 6 years ago

Vishal1707 commented 6 years ago

type RadioButtons = ref object of Widget impl: ptr rawui.RadioButtons onradiobuttonclick*: proc() {.closure.}

voidCallback(wrapOnRadioButtonClick,RadioButtons,RadioButtons,onradiobuttonclick)

proc add*(r: RadioButtons; text: string) = radioButtonsAppend(r.impl, text)

proc radioButtonsSelected*(r: RadioButtons): int = radioButtonsSelected(r.impl)

dom96 commented 6 years ago

Needed a contribution for today so decided to fix this for @Vishal1707 :)

Vishal1707 commented 6 years ago

Thanks @dom96.