diff options
Diffstat (limited to 'src/client/savegamemenu.h')
-rw-r--r-- | src/client/savegamemenu.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/src/client/savegamemenu.h b/src/client/savegamemenu.h new file mode 100644 index 0000000..d5b69e3 --- /dev/null +++ b/src/client/savegamemenu.h @@ -0,0 +1,65 @@ +/* + client/savegamewindow.h + This file is part of the Osirion project and is distributed under + the terms of the GNU General Public License version 2 +*/ + +#ifndef __INCLUDED_CLIENT_SAVEGAMEMENU_H__ +#define __INCLUDED_CLIENT_SAVEGAMEMENU_H__ + +#include "ui/button.h" +#include "ui/iconbutton.h" +#include "ui/inputbox.h" +#include "ui/label.h" +#include "ui/listview.h" +#include "ui/window.h" + +namespace client +{ + +class SaveGameMenu : public ui::Window +{ +public: + enum Mode { Save = 0, Load = 1 }; + + SaveGameMenu(ui::Widget *parent = 0, const char *label = 0, const Mode mode = Save); + virtual ~SaveGameMenu(); + +protected: + + /// called when the widget receives a key press + virtual bool on_keypress(const int key, const unsigned int modifier); + + /// called if the widget receives an emit evet + virtual bool on_emit(ui::Widget *sender, const ui::Widget::Event event, void *data); + + virtual void resize(); + + virtual void show(); + + void show_file_info(); + + void refresh(); + +private: + Mode savegamemenu_mode; + + ui::Label *savegamemenu_titlelabel; + ui::IconButton *savegamemenu_closebutton; + ui::ListView *savegamemenu_filelistview; + ui::IconButton *savegamemenu_deletebutton; + + ui::Label *savegamemenu_descrlabel; + ui::InputBox *savegamemenu_descrinput; + + ui::Button *savegamemenu_savebutton; + +}; // class SaveGameMenu + + +} // namespace client + + +#endif // __INCLUDED_CLIENT_SAVEGAMEMENU_H__ + + |