I have the following code, which does something I didn't expect:
GUI *gui = Leadwerks::GUI::Create(context);
Widget *widget = Widget::TextArea(10, 10, 400, 300, gui->GetBase());
widget->SetText("Text field");
widget->SetText("Adds a second line");
widget->SetLayout(500, 50, 500, 500);
This ends up creating two text fields, with two lines each. The second SetText adds a second line to the first, instead of replacing it (as I would expect). The SetLayout creates an exact copy of the textarea at 500, 50. If you do another SetText after SetLayout, only the second text area gets the additional text line. Is this how this is supposed to work? Since there are no C++ documentation examples, I kind of have to guess at what the Lua stuff does. How do you replace text if SetText just keeps adding to it? How do you move a widget without copying it (SetPosition is there, undocumented, but doesn't work)?
I still didn't figure out what a separate base is supposed to accomplish or if it's necessary. And there's something about adding a script to it which goes over my head.