Planeshift
attacklist.h
Go to the documentation of this file.
1 /*
2  * attacklist.h author: hartra344 [at] gmail [dot] com
3  *
4  * Copyright (C) 2001-2011 Atomic Blue (info@planeshift.it, http://www.atomicblue.org)
5  *
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation (version 2 of the License)
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17  *
18  */
19 #ifndef PAWS_ATTACK_WINDOW_HEADER
20 #define PAWS_ATTACK_WINDOW_HEADER
21 
22 #include "paws/pawswidget.h"
23 class pawsTextBox;
24 class pawsListBox;
25 class pawsMessageTextBox;
26 class pawsSlot;
27 
28 #include "net/cmdbase.h"
29 #include "gui/pawscontrolwindow.h"
30 
31 
36 {
37 public:
38 
40  virtual ~pawsAttackBookWindow();
41 
42  bool PostSetup();
43 
44  virtual void HandleMessage(MsgEntry* msg);
45 
46  bool OnButtonPressed(int mouseButton, int keyModifier, pawsWidget* widget);
47  void OnListAction(pawsListBox* listbox, int status);
48  void Show();
49 private:
50 
51  void Queue();
52 
53  void Close();
54 
55  void HandleAttacks(MsgEntry* me);
56 
57  pawsListBox* attackList;
58  pawsMessageTextBox* attackDescription;
59  pawsSlot* attackImage;
60 
61  csString selectedAttack;
62 
63  csHash<csString, csString> descriptions_Hash;
64  csHash<csString, csString> images_Hash;
65 };
66 
68 
69 
70 #endif
71 
72 
73 
This is a window that is controlled by a button on the control bar.
void Show()
When the window is opened let the controller window know about it.
Window managing special attacks list in a queue.
Definition: attacklist.h:35
The main base widget that all other widgets should inherit from.
Definition: pawswidget.h:116
A slot which may contain one item, with icon, and stack count.
Definition: pawsslot.h:22
The structure of 1 queue entry (pointer to a message)
Definition: message.h:143
bool PostSetup()
This is called after the widget and all of it&#39;s children have been created.
void OnListAction(pawsListBox *listbox, int status)
Called whenever an item in a child list box is selected.
A simple list box widget.
Definition: pawslistbox.h:202
virtual void HandleMessage(MsgEntry *msg)
This is a special type of text box that is used for messages.
Definition: pawstextbox.h:285
virtual ~pawsAttackBookWindow()
bool OnButtonPressed(int mouseButton, int keyModifier, pawsWidget *widget)
Called whenever a button is pressed.
CREATE_PAWS_FACTORY(pawsAttackBookWindow)
A basic text box widget.
Definition: pawstextbox.h:42