dalerank/nanogui-sdl

Programmatic way of setting focus on button?

Fredrum opened this issue · 0 comments

Hi!
I'm trying to select+highlight a button using just a function (I will later tie that to Gamepad input) but I can't get the effect I'm expecting.

I'm trying
button1->requestFocus();
and
button1->setFocused();

but none of those makes the button highlight as if I have the mouse cursor over it.
This works though,
button1->setBackgroundColor(Color(0, 255, 255, 250));

It does seem to activate/focus on the button's parent mini window though. Which is odd as the set color works correctly.

Im I going about it the wrong way?

Cheers