def __init__(
        self,
        parent=None,
        x=0,
        y=0,
        chb_callback=None,
        chb_args=None,
        chb_checked=True,
        text="",
        text_size=16,
        radio=False,
        text_color=None,
        expand_width=100,
        enabled=True
    ):
        """ Constructs a new checkbox, forwarding most of the elements to the
        underlying Checkbox and Text. """
        RPObject.__init__(self)
        if chb_args is None:
            chb_args = []

        if text_color is None:
            text_color = Vec3(1)

        if not enabled:
            text_color = Vec3(1.0, 0, 0.28)

        self.text_color = text_color

        self._checkbox = Checkbox(
            parent=parent,
            x=x,
            y=y,
            enabled=enabled,
            callback=chb_callback,
            extra_args=chb_args,
            checked=chb_checked,
            radio=radio,
            expand_width=expand_width
        )
        self._text = Text(
            x=x + 26,
            y=y + 9 + text_size // 4,
            text=text,
            align="left",
            parent=parent,
            size=text_size,
            color=text_color,
            may_change=True
        )

        if enabled:
            self._checkbox.node.bind(DGG.WITHIN, self._on_node_enter)
            self._checkbox.node.bind(DGG.WITHOUT, self._on_node_leave)
 Constructs a new checkbox, forwarding most of the elements to the
        underlying Checkbox and Text. 
metadrive/render_pipeline/rpcore/gui/labeled_checkbox.py