Planeshift
pawsscripthirednpcwindow.h
Go to the documentation of this file.
1
/*
2
* pawsscripthirednpcwindow.h creator <andersr@pvv.org>
3
*
4
* Copyright (C) 2013 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_SCRIPT_HIRED_NPC_WSINOW_HEADER
20
#define PAWS_SCRIPT_HIRED_NPC_WSINOW_HEADER
21
22
//====================================================================================
23
// Crystal Space Includes
24
//====================================================================================
25
26
//====================================================================================
27
// Project Includes
28
//====================================================================================
29
#include "
net/cmdbase.h
"
30
#include "
net/messages.h
"
31
32
#include "
paws/pawswidget.h
"
33
#include "
paws/pawsbutton.h
"
34
#include "
paws/pawstextbox.h
"
35
#include "
paws/pawsstringpromptwindow.h
"
36
37
//====================================================================================
38
// Local Includes
39
//====================================================================================
40
41
//------------------------------------------------------------------------------------
42
// Forward Declarations
43
//------------------------------------------------------------------------------------
44
45
50
class
pawsScriptHiredNPCWindow
:
public
pawsWidget
,
public
psClientNetSubscriber
,
public
iOnStringEnteredAction
51
{
52
public
:
55
pawsScriptHiredNPCWindow
();
56
59
virtual
~pawsScriptHiredNPCWindow
();
60
63
virtual
bool
PostSetup
();
64
67
void
HandleMessage
(
MsgEntry
* me);
68
71
void
HandleHiredNPCScript
(
const
psHiredNPCScriptMessage
&msg);
72
75
virtual
bool
OnButtonPressed
(
int
mouseButton,
int
keyModifier,
pawsWidget
* widget);
76
79
virtual
void
OnStringEntered
(
const
char
*
name
,
int
param,
const
char
* value);
80
83
virtual
bool
OnChange
(
pawsWidget
* widget);
84
89
void
SetVerified
(
bool
status);
90
91
protected
:
92
private
:
93
bool
verified;
// Set to true when script is verified ok.
94
pawsMultilineEditTextBox
* script;
95
pawsButton
* verifyButton;
96
pawsButton
* okButton;
97
EID hiredEID;
98
};
99
100
CREATE_PAWS_FACTORY
(
pawsScriptHiredNPCWindow
);
101
102
#endif
pawsWidget
The main base widget that all other widgets should inherit from.
Definition:
pawswidget.h:116
pawsbutton.h
messages.h
pawsWidget::name
csString name
The name of this widget.
Definition:
pawswidget.h:217
pawsScriptHiredNPCWindow::~pawsScriptHiredNPCWindow
virtual ~pawsScriptHiredNPCWindow()
Destructor.
MsgEntry
The structure of 1 queue entry (pointer to a message)
Definition:
message.h:143
pawsScriptHiredNPCWindow::PostSetup
virtual bool PostSetup()
Do post setup of the window.
CREATE_PAWS_FACTORY
CREATE_PAWS_FACTORY(pawsScriptHiredNPCWindow)
cmdbase.h
pawsScriptHiredNPCWindow::pawsScriptHiredNPCWindow
pawsScriptHiredNPCWindow()
Constructor.
pawsScriptHiredNPCWindow::OnChange
virtual bool OnChange(pawsWidget *widget)
Called when some of the chiled parents change.
psHiredNPCScriptMessage
Handle scripting of hired NPCs.
Definition:
messages.h:6156
pawsScriptHiredNPCWindow::SetVerified
void SetVerified(bool status)
Set Verified status on dialog.
pawsScriptHiredNPCWindow::OnStringEntered
virtual void OnStringEntered(const char *name, int param, const char *value)
Handle enter string dialog result.
pawsScriptHiredNPCWindow::OnButtonPressed
virtual bool OnButtonPressed(int mouseButton, int keyModifier, pawsWidget *widget)
Handle button pressed.
pawsstringpromptwindow.h
pawswidget.h
pawsButton
A simple button widget.
Definition:
pawsbutton.h:43
iOnStringEnteredAction
This interface defines the callback used by pawsStringPromptWindow to notify another window of a supp...
Definition:
pawsstringpromptwindow.h:37
pawstextbox.h
pawsMultilineEditTextBox
Definition:
pawstextbox.h:740
psClientNetSubscriber
Definition:
cmdbase.h:67
pawsScriptHiredNPCWindow::HandleMessage
void HandleMessage(MsgEntry *me)
Handle reception of subscribed messages.
pawsScriptHiredNPCWindow
A window that allows scripting of hired NPCs.
Definition:
pawsscripthirednpcwindow.h:50
pawsScriptHiredNPCWindow::HandleHiredNPCScript
void HandleHiredNPCScript(const psHiredNPCScriptMessage &msg)
Handle the script message.
client
gui
pawsscripthirednpcwindow.h
Generated on Sat Jun 19 2021 05:00:22 for Planeshift by
1.8.11