fix #963 Checkbox tips only get displayed if checkbox is checked

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@7934 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: dddb068ad8f83448b1983bd20137a89a554eb063
Former-commit-id: 0ab15458145df594da95f6db3b13cecbce8a674e
This commit is contained in:
iobyte 2022-01-23 02:28:39 +00:00
parent 16bba4f7a8
commit f59c6286b3

View file

@ -106,7 +106,8 @@ GfuiCheckboxCreate(void *scr, int font, int x, int y, int imagewidth, int imageh
GfuiGrButtonCreate(scr, "data/img/unchecked.png", "data/img/unchecked.png",
"data/img/unchecked.png", "data/img/unchecked.png",
x, y, imagewidth, imageheight, GFUI_MIRROR_NONE, false, GFUI_MOUSE_UP,
(void*)(long)(object->id), gfuiUnchecked, 0, 0, 0);
(void*)(long)(object->id), gfuiUnchecked,
userDataOnFocus, onFocus, onFocusLost);
// Compute total height (text or buttons)
tGfuiGrButton* pCheckedBut = &(gfuiGetObject(scr, checkbox->checkId)->u.grbutton);
@ -138,7 +139,8 @@ GfuiCheckboxCreate(void *scr, int font, int x, int y, int imagewidth, int imageh
yl += (height - gfuiFont[font]->getHeight()) / 2;
checkbox->labelId =
GfuiLabelCreate(scr, pszText, font, xl, yl, 0, GFUI_ALIGN_HL, strlen(pszText));
GfuiLabelCreate(scr, pszText, font, xl, yl, 0, GFUI_ALIGN_HL, strlen(pszText),
0, 0, userDataOnFocus, onFocus, onFocusLost);
gfuiAddObject(screen, object);