static Color inactive_color;
static Color label_color;
static Color field_color;
+
private:
/* Action done on the menu */
enum MenuAction {
/** Remove all entries from the menu */
void clear();
- /** Return the index of the menu item that was 'hit' (ie. the user
- clicked on it) in the last event() call */
- int check ();
-
virtual void check_menu() =0;
MenuItem& get_item(int index)
bool is_toggled(int id) const;
void set_toggled(int id, bool toggled);
- Menu* get_parent() const;
-
protected:
- void additem(MenuItem* pmenu_item);
+ /** Return the index of the menu item that was 'hit' (ie. the user
+ clicked on it) in the last event() call */
+ int check ();
+
+ MenuItem* add_item(std::unique_ptr<MenuItem> menu_item);
float get_width() const;
float get_height() const;
public:
bool close;
- std::vector<MenuItem*> items;
+ std::vector<std::unique_ptr<MenuItem> > items;
public:
float effect_progress;
private:
int arrange_left;
int active_item;
-
- SurfacePtr checkbox;
- SurfacePtr checkbox_checked;
- SurfacePtr back;
- SurfacePtr arrow_left;
- SurfacePtr arrow_right;
};
#endif