Ooo… today is a difficult coding day. I could use some advice creating a context-menu text field. I tried modeling my code after Ahornberg’s Tape module and have something “working” which looks like this:
struct LabelTextField : TextField {
DigitalProgrammer* module;
LabelTextField()
{
box.size = Vec(20, 20); // this value doesn't seem to matter!?
multiline = false;
}
};
void appendContextMenu(Menu *menu) override
{
...
menu->addChild(new LabelTextField());
Pretty bare minimum. I know that I’ll need to eventually add onChange and keep track of the entered value.
My question is: Is it possible to label the input, like this?
And if so, could someone steer me to some sample code?
Thanks!