> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectreal.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# ImGuiWindow.Checkbox

> Appends a checkbox element to an ImGuiWindow. The callback is invoked with the new boolean value when the checkbox changes, and the method returns the same ImGuiWindow object.

<div className="real-function-page">
  ```lua theme={null}
  ImGuiWindow.Checkbox(window: ImGuiWindow, label: string, checked: any, onChange: function): ImGuiWindow
  ```

  ## Argumen

  <ParamField path={"window"} type={"ImGuiWindow"} required>
    ImGuiWindow object returned by imgui.create. A destroyed or invalid window raises a Lua error.
  </ParamField>

  <ParamField path={"label"} type={"string"} required>
    Checkbox label string passed to the rendered ImGui checkbox.
  </ParamField>

  <ParamField path={"checked"} type={"any"} required>
    Initial checked value. nil and false are treated as false; other values are treated as true.
  </ParamField>

  <ParamField path={"onChange"} type={"function"} required>
    Function stored for this checkbox and invoked with the new boolean state after a change event is processed.
  </ParamField>

  ## Return

  <ResponseField name={"window"} type={"ImGuiWindow"}>
    The same ImGuiWindow object, allowing chained method calls.
  </ResponseField>

  ## Tipe

  ### ImGuiWindow

  Pegangan dikembalikan oleh imgui.create. Metode pembuatan kontrol mengembalikan pegangan yang sama sehingga panggilan dapat dirangkai.

  | Name               | Type                                                                                                                                            | Required | Deskripsi                                                                            |
  | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------ |
  | `Button`           | `(label: string, onClick: () -> ()) -> ImGuiWindow`                                                                                             | Yes      | Menambahkan tombol dan memanggil panggilan balik setelah klik.                       |
  | `Checkbox`         | `(label: string, checked: any, onChange: (boolean) -> ()) -> ImGuiWindow`                                                                       | Yes      | Menambahkan kotak centang yang diinisialisasi ke status yang disediakan.             |
  | `CollapsingHeader` | `(label: string, content: (ImGuiWindow) -> ()) -> ImGuiWindow`                                                                                  | Yes      | Kontrol grup ditambahkan oleh callback konten di bawah header yang diciutkan.        |
  | `ColorPicker`      | `(label: string, red: number?, green: number?, blue: number?, alpha: number?, onChange: (number, number, number, number) -> ()) -> ImGuiWindow` | Yes      | Menambahkan editor RGBA; menghilangkan komponen warna default ke 1.0.                |
  | `InputText`        | `(label: string, text: string?, onChange: (string) -> ()) -> ImGuiWindow`                                                                       | Yes      | Menambahkan input teks satu baris; menghilangkan default teks awal ke string kosong. |
  | `SameLine`         | `() -> ImGuiWindow`                                                                                                                             | Yes      | Tempatkan kontrol berikutnya pada baris yang sama.                                   |
  | `Separator`        | `() -> ImGuiWindow`                                                                                                                             | Yes      | Menambahkan pemisah horizontal.                                                      |
  | `SliderFloat`      | `(label: string, value: number, minimum: number, maximum: number, onChange: (number) -> ()) -> ImGuiWindow`                                     | Yes      | Menambahkan penggeser titik mengambang.                                              |
  | `SliderInt`        | `(label: string, value: integer, minimum: integer, maximum: integer, onChange: (number) -> ()) -> ImGuiWindow`                                  | Yes      | Menambahkan penggeser bilangan bulat.                                                |
  | `Text`             | `(text: string) -> ImGuiWindow`                                                                                                                 | Yes      | Menambahkan teks non-interaktif.                                                     |
  | `destroy`          | `() -> ()`                                                                                                                                      | Yes      | Menghapus jendela dan melepaskan panggilan balik terdaftarnya.                       |
</div>
