| 9 | using namespace c2d; |
| 10 | |
| 11 | MenuMainOptionsSubmenu::MenuMainOptionsSubmenu( |
| 12 | Main *main, const c2d::FloatRect &rect, const std::string &_title, |
| 13 | const std::vector<MenuItem> &items, const std::string &optionName) |
| 14 | : Menu(main, rect, _title, items, true) { |
| 15 | |
| 16 | option_name = optionName; |
| 17 | |
| 18 | // highlight |
| 19 | highlight_selection = new Highlight({MenuMainOptionsSubmenu::getSize().x, BUTTON_HEIGHT * main->getScaling().x}, |
| 20 | Highlight::CursorPosition::Left); |
| 21 | highlight_selection->setFillColor(COLOR_BLUE); |
| 22 | highlight_selection->setAlpha(60); |
| 23 | highlight_selection->setCursorColor(COLOR_RED); |
| 24 | highlight_selection->setOrigin(Origin::Left); |
| 25 | highlight_selection->setPosition(0, 200); |
| 26 | highlight_selection->setLayer(-1); |
| 27 | MenuMainOptionsSubmenu::add(highlight_selection); |
| 28 | } |
| 29 | |
| 30 | void MenuMainOptionsSubmenu::setSelection(const std::string &name) { |
| 31 | for (auto btn: buttons) { |
nothing calls this directly
no test coverage detected