Code: Select all
Func _ImGui_CheckBox($text, ByRef $active)
Local $b_active = DllStructCreate("boolean value;")
$b_active.value = $active
Local $result = DllCall($IMGUI_DLL, "boolean:cdecl", "Checkbox", "wstr", $text, "ptr", DllStructGetPtr($b_active))
If @error Then Return SetError(1, 0, 0)
$active = $b_active.value
Return $result[0]
EndFunc
Btw I'm converting Imgui(c++) to ahk, it's nearly done, I'm just stuck with some functions.
It's a checkbox on Imgui, which will toggle a variable, ByRef $active refers to -> (b_show_demo_window = 1/0) (example)
![Image](https://i.ibb.co/D14CSLm/Screenshot-1.png)
please help me out
![Smile :)](./images/smilies/icon_e_smile.gif)