// // Created by robtor on 04.01.23. // #ifndef FLOATPUMP_MENU_ENTRY_H #define FLOATPUMP_MENU_ENTRY_H #include namespace floatpump { namespace menu { class Menu_Entry { public: Menu_Entry_Type_Delegate *m_type; Menu_Entry(Menu_Entry_Type_Delegate *type, std::string name) : m_type(type), m_name(name) {}; std::string printLine() { return m_name + ": " + m_type->toString(); } void action_press() { m_type->u_press(); } void action_increase() { m_type->u_increase(1); } void action_decrease() { m_type->u_decrease(1); } private: std::string m_name; }; } // floatpump } // menu #endif //FLOATPUMP_MENU_ENTRY_H