-
-
Couldn't load subscription status.
- Fork 353
Open
Description
The x coordinate of a GuiCheckBox specifies the location of the check button and doesn't take into account a control's text. In the screen shot below the red line shows the controls' x coordinate:
Is this intended? I find it inconvenient as you have to work out the width of the text to line up left aligned checkboxes with other controls.
This is the code I use for the screenshot:
bool dummy;
int x = 150;
DrawLine( x, 0, x, 500, RED );
GuiSetStyle( CHECKBOX, TEXT_ALIGNMENT, TEXT_ALIGN_RIGHT );
const Rectangle toggle_rect_1{ x, 295, 24.0f, 24.0f };
GuiCheckBox( toggle_rect_1, "right align", &dummy );
GuiSetStyle( CHECKBOX, TEXT_ALIGNMENT, TEXT_ALIGN_LEFT );
const Rectangle toggle_rect_2{ x, 350, 24.0f, 24.0f };
GuiCheckBox( toggle_rect_2, "left align", &dummy );
Metadata
Metadata
Assignees
Labels
No labels