Added SetText()

This commit is contained in:
Alex
2023-02-14 04:53:41 +02:00
parent 5257ff662f
commit b3cbcd474d
3 changed files with 28 additions and 8 deletions

View File

@ -81,6 +81,17 @@ namespace GraphicalUserInterface
return (Handle)button;
}
void WidgetCollection::SetText(Handle handle, const char *Text)
{
HandleMeta *meta = (HandleMeta *)handle;
if (meta->Type[0] == 'L' && meta->Type[1] == 'B' && meta->Type[2] == 'L')
{
LabelObject *label = (LabelObject *)handle;
strcpy(label->Text, Text);
NeedRedraw = true;
}
}
WidgetCollection::WidgetCollection(void *ParentWindow)
{
if (!ParentWindow)