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