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 
32 {
33 public:
34  bool OnDoubleClick(int button, int modifiers, int x, int y);
35 };
36 
42 {
43 public:
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;
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 
102 #endif
The main base widget that all other widgets should inherit from.
Definition: pawswidget.h:116
The Mods window shows 3 lists of item modifiers when creating items from the pawsGMSpawnWindow.
This widget is used to view a mesh in it&#39;s own seperate world.
bool OnDoubleClick(int button, int modifiers, int x, int y)
Manage mouse double click event.
A combination widget that has a check box and a text label.
Definition: pawscheckbox.h:48
csString name
The name of this widget.
Definition: pawswidget.h:217
The structure of 1 queue entry (pointer to a message)
Definition: message.h:143
virtual bool OnSelected(pawsWidget *widget)
Called whenever a widget is selected.
virtual bool PostSetup()
This is called after the widget and all of it&#39;s children have been created.
An edit box widget/.
Definition: pawstextbox.h:409
virtual void Close()
Simply calls Hide() unless overidden.
Definition: pawswidget.h:470
CREATE_PAWS_FACTORY(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
virtual void Show()
Makes widget visible and brings it to the front.
virtual bool OnButtonPressed(int button, int keyModifier, pawsWidget *widget)
Called whenever a button is pressed.
Definition: pawswidget.h:1190
A basic text box widget.
Definition: pawstextbox.h:42