blob: 91ed10eb286e1f792fbdd74c39e04b452843eb86 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
/*
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/modelview.h"
#include "ui/widget.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::Widget
{
public:
/// create a new menu
BuyMenu(ui::Widget *parent, const char * label = 0);
~BuyMenu();
void set_item(core::Info *info);
protected:
/// resize event
virtual void resize();
/// draw event
virtual void draw();
/// keypress event handler
virtual bool on_keypress(const int key, const unsigned int modifier);
private:
ui::Window *menu_buywindow;
ui::Label *menu_namelabel;
ui::ScrollPane *menu_scrollpane;
ui::ModelView *menu_modelview;
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__
|