Planeshift
pawsgmspawn.h
Go to the documentation of this file.
1
/*
2
* pawsgmspawn.h - Author: Christian Svensson
3
*
4
* Copyright (C) 2004 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_GMSPAWN_HEADER
20
#define PAWS_GMSPAWN_HEADER
21
22
#include "
paws/pawstree.h
"
23
#include "
psengine.h
"
24
25
class
pawsObjectView
;
26
class
pawsTextBox
;
27
class
pawsEditTextBox
;
28
class
pawsCheckBox
;
29
class
pawsModsWindow
;
30
31
class
pawsItemTree
:
public
pawsSimpleTree
32
{
33
public
:
34
bool
OnDoubleClick
(
int
button,
int
modifiers,
int
x,
int
y);
35
};
36
41
class
pawsGMSpawnWindow
:
public
pawsWidget
,
public
psClientNetSubscriber
,
public
DelayedLoader
42
{
43
public
:
44
pawsGMSpawnWindow
();
45
virtual
~
pawsGMSpawnWindow
();
46
47
bool
PostSetup
();
48
void
Show
();
49
void
Close
();
50
void
HandleMessage(
MsgEntry
* me);
51
bool
OnSelected
(
pawsWidget
* widget);
52
53
bool
OnButtonPressed
(
int
button,
int
keyModifier,
pawsWidget
* widget);
54
55
bool
CheckLoadStatus();
56
57
void
SetItemModifier(
const
char
*
name
, uint32_t
id
, uint32_t type);
58
59
private
:
60
pawsItemTree
* itemTree;
61
pawsObjectView
* objView;
62
pawsWidget
* itemImage;
63
pawsTextBox
* itemName;
64
pawsCheckBox
* cbForce;
65
pawsCheckBox
* cbLockable;
66
pawsCheckBox
* cbLocked;
67
pawsCheckBox
* cbPickupable;
68
pawsCheckBox
* cbPickupableWeak;
69
pawsCheckBox
* cbCollidable;
70
pawsCheckBox
* cbUnpickable;
71
pawsCheckBox
* cbTransient;
72
pawsCheckBox
* cbSettingItem;
73
pawsCheckBox
* cbNPCOwned;
74
pawsEditTextBox
* itemCount;
75
pawsEditTextBox
* itemQuality;
76
pawsEditTextBox
* lockSkill;
77
pawsEditTextBox
* lockStr;
78
pawsTextBox
* factname;
79
pawsTextBox
* meshname;
80
pawsTextBox
* imagename;
81
pawsTextBox
* modname[
psGMSpawnMods::ITEM_NUM_TYPES
];
82
83
struct
Item
84
{
85
csString
name
;
86
csString category;
87
csString mesh;
88
csString icon;
89
};
90
91
csArray<Item> items;
92
93
csString currentItem;
94
bool
loaded;
95
csString factName;
96
csArray<uint32_t> mods;
97
pawsModsWindow
* modwindow;
98
};
99
100
101
CREATE_PAWS_FACTORY
(
pawsGMSpawnWindow
);
102
#endif
pawsWidget
The main base widget that all other widgets should inherit from.
Definition:
pawswidget.h:116
pawsModsWindow
The Mods window shows 3 lists of item modifiers when creating items from the pawsGMSpawnWindow.
Definition:
pawsmodswindow.h:33
pawsObjectView
This widget is used to view a mesh in it's own seperate world.
Definition:
pawsobjectview.h:49
pawsItemTree::OnDoubleClick
bool OnDoubleClick(int button, int modifiers, int x, int y)
Manage mouse double click event.
psengine.h
pawsCheckBox
A combination widget that has a check box and a text label.
Definition:
pawscheckbox.h:48
pawsSimpleTree
Definition:
pawstree.h:542
pawsWidget::name
csString name
The name of this widget.
Definition:
pawswidget.h:217
MsgEntry
The structure of 1 queue entry (pointer to a message)
Definition:
message.h:143
pawstree.h
pawsWidget::OnSelected
virtual bool OnSelected(pawsWidget *widget)
Called whenever a widget is selected.
pawsTree::PostSetup
virtual bool PostSetup()
This is called after the widget and all of it's children have been created.
pawsEditTextBox
An edit box widget/.
Definition:
pawstextbox.h:409
DelayedLoader
Definition:
psengine.h:83
pawsWidget::Close
virtual void Close()
Simply calls Hide() unless overidden.
Definition:
pawswidget.h:470
pawsItemTree
Definition:
pawsgmspawn.h:31
CREATE_PAWS_FACTORY
CREATE_PAWS_FACTORY(pawsGMSpawnWindow)
pawsGMSpawnWindow
Window which allows GM to spawn items in game, shows full tree of items on the left and 3d preview of...
Definition:
pawsgmspawn.h:41
psGMSpawnMods::ITEM_NUM_TYPES
Definition:
messages.h:5061
pawsWidget::Show
virtual void Show()
Makes widget visible and brings it to the front.
pawsWidget::OnButtonPressed
virtual bool OnButtonPressed(int button, int keyModifier, pawsWidget *widget)
Called whenever a button is pressed.
Definition:
pawswidget.h:1190
psClientNetSubscriber
Definition:
cmdbase.h:67
pawsTextBox
A basic text box widget.
Definition:
pawstextbox.h:42
client
gui
pawsgmspawn.h
Generated on Sat Jun 19 2021 05:00:22 for Planeshift by
1.8.11