| 5 | namespace GUI |
| 6 | { |
| 7 | Dropdown::Dropdown(int& optionPtr, |
| 8 | const std::string& label, |
| 9 | const std::vector<std::string>& options) |
| 10 | : m_optionPtr (&optionPtr) |
| 11 | { |
| 12 | *m_optionPtr = 0; |
| 13 | initText(m_label, 10, label); |
| 14 | |
| 15 | m_quad.setSize({70, 40}); |
| 16 | m_quad.setTexture(&Component::guiTexture); |
| 17 | m_quad.setOutlineColor(sf::Color::Black); |
| 18 | m_quad.setOutlineThickness(2); |
| 19 | |
| 20 | for (auto& option : options) |
| 21 | { |
| 22 | m_options.emplace_back(initText(15, option)); |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | void Dropdown::input(const sf::Event& e) |
| 27 | { |
nothing calls this directly
no outgoing calls
no test coverage detected