1 // license:BSD-3-Clause 2 // copyright-holders:Nicola Salmoria, Aaron Giles, Nathan Woods 3 /*************************************************************************** 4 5 ui/slotopt.h 6 7 Internal menu for the slot options. 8 9 ***************************************************************************/ 10 #ifndef MAME_FRONTEND_UI_SLOTOPT_H 11 #define MAME_FRONTEND_UI_SLOTOPT_H 12 13 #pragma once 14 15 #include "ui/menu.h" 16 17 #include <unordered_map> 18 19 20 namespace ui { 21 22 class menu_slot_devices : public menu 23 { 24 public: 25 menu_slot_devices(mame_ui_manager &mui, render_container &container); 26 virtual ~menu_slot_devices() override; 27 28 private: 29 enum class step_t 30 { 31 NEXT, 32 PREVIOUS 33 }; 34 35 virtual void populate(float &customtop, float &custombottom) override; 36 virtual void custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2) override; 37 virtual void handle() override; 38 39 device_slot_interface::slot_option const *get_current_option(device_slot_interface &slot) const; 40 void set_slot_device(device_slot_interface &slot, const char *val); 41 void record_current_options(); 42 bool try_refresh_current_options(); 43 void rotate_slot_device(device_slot_interface &slot, step_t step); 44 45 // variables 46 std::unique_ptr<machine_config> m_config; 47 std::unordered_map<std::string, std::string> m_slot_options; 48 std::string m_current_option_list_slot_tag; 49 std::vector<std::string> m_current_option_list; 50 std::vector<std::string>::const_iterator m_current_option_list_iter; 51 }; 52 53 } // namespace ui 54 55 #endif /* MAME_FRONTEND_UI_SLOTOPT_H */ 56