This is my function for changing the edit box text:
static void ChangeEditBox(D4D_OBJECT_PTR editBox, int value)
{
D4D_EditBoxClearAll(editBox);
int x, y, z;
x = (value/100);
D4D_SprintDecU8(x, &tmp_txt[0], 0);
y = ((value - x*100)/10);
D4D_SprintDecU8(y, &tmp_txt[1], 0);
z = (value - x*100 - y*10);
D4D_SprintDecU8(z, &tmp_txt[2], 0);
tmp_txt[3] = NULL;
if (x != 0)
{
D4D_EditBoxPutChar(editBox, tmp_txt[0]);
D4D_EditBoxPutChar(editBox, tmp_txt[1]);
D4D_EditBoxPutChar(editBox, tmp_txt[2]);
}
else
{
D4D_EditBoxPutChar(editBox, tmp_txt[1]);
D4D_EditBoxPutChar(editBox, tmp_txt[2]);
}
}
I call it every second from the screen's main function.