diff options
author | Stijn Buys <ingar@osirion.org> | 2009-04-15 17:08:51 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2009-04-15 17:08:51 +0000 |
commit | a95028547981614e06ea7a6d22b853b85418cea3 (patch) | |
tree | d4d6998a4118a4d8690ce138d586abfba4893179 /src/client/buymenu.h | |
parent | 4f33f59571f10019c1e7a0e3640b2f69c159a8cf (diff) |
added info registry, list_info
added network info transfer
added info based buy menu and related game changes
Diffstat (limited to 'src/client/buymenu.h')
-rw-r--r-- | src/client/buymenu.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/src/client/buymenu.h b/src/client/buymenu.h new file mode 100644 index 0000000..81a87bd --- /dev/null +++ b/src/client/buymenu.h @@ -0,0 +1,58 @@ +/* + client/buymenu.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_BUYMENU_H__ +#define __INCLUDED_CLIENT_BUYMENU_H__ + +#include "core/info.h" +#include "ui/container.h" +#include "ui/button.h" +#include "ui/label.h" +#include "ui/window.h" +#include "ui/scrollpane.h" + +namespace client +{ + +/// The buy menu is used to trade a single item, like a ship or an upgrade +class BuyMenu : public ui::Window +{ +public: + /// create a new menu + BuyMenu(ui::Widget *parent, const char * label = 0); + ~BuyMenu(); + + void set_item(std::string const & itemtype, std::string const & itemname); + +protected: + /// resize event + virtual void resize(); + + /// draw event + virtual void draw(); + +private: + + ui::Window *menu_modelpane; + ui::Window *menu_textpane; + ui::Label *menu_namelabel; + ui::ScrollPane *menu_scrollpane; + + ui::Button *menu_closebutton; + ui::Button *menu_buybutton; + + std::string menu_itemtype; + std::string menu_itemname; + + core::Info *menu_inforecord; + ui::Text menu_infotext; + unsigned long menu_infotimestamp; +}; + +} + +#endif // __INCLUDED_CLIENT_BUYMENU_H__ + |