Skip to content

Commit

Permalink
Configuration GUI: Make radio buttons properly tabbable
Browse files Browse the repository at this point in the history
  • Loading branch information
joncampbell123 committed Mar 29, 2024
1 parent 6aa42c6 commit 09ae256
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/gui/sdl_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,24 @@ class ShowOptions : public GUI::MessageBox2 {
close->move(155,scroll_h+90);
resize(310, scroll_h+156);
move(parent->getWidth()>this->getWidth()?(parent->getWidth()-this->getWidth())/2:0,parent->getHeight()>this->getHeight()?(parent->getHeight()-this->getHeight())/2:0);

/* first child is first tabbable */
if (pv.size() > 0) {
Window *w = opt[0];
if (w) w->first_tabbable = true;
}

/* last child is first tabbable */
if (pv.size() > 0) {
Window *w = opt[pv.size()-1];
if (w) w->last_tabbable = true;
}

/* the FIRST field needs to come first when tabbed to */
if (pv.size() > 0) {
Window *w = opt[0];
if (w) w->raise();
}
}

void actionExecuted(GUI::ActionEventSource *b, const GUI::String &arg) override {
Expand Down

0 comments on commit 09ae256

Please sign in to comment.