Planeshift
pawscraftcancelwindow.h
Go to the documentation of this file.
1
/*
2
* pawscraftcancelwindow.h by Tapped
3
*
4
* Copyright (C) 2010 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
20
#ifndef PAWS_CRAFTCANCEL_WINDOW_HEADER
21
#define PAWS_CRAFTCANCEL_WINDOW_HEADER
22
23
#include "
paws/pawswidget.h
"
24
class
pawsProgressBar
;
25
26
#include "
net/cmdbase.h
"
27
#include "
net/msghandler.h
"
28
33
class
pawsCraftCancelWindow
:
public
pawsWidget
,
public
psClientNetSubscriber
34
{
35
public
:
36
virtual
~pawsCraftCancelWindow
();
37
virtual
void
HandleMessage
(
MsgEntry
* me);
38
39
virtual
bool
PostSetup
();
40
virtual
void
Draw
();
44
void
Start
(csTicks craftTime);
45
46
virtual
bool
OnButtonPressed
(
int
mouseButton,
int
keyModifier,
pawsWidget
* widget );
47
private
:
50
void
Cancel();
51
52
pawsProgressBar
* craftProgress;
53
csTicks startTime,craftTime;
54
};
55
56
CREATE_PAWS_FACTORY
(
pawsCraftCancelWindow
);
57
58
#endif
pawsWidget
The main base widget that all other widgets should inherit from.
Definition:
pawswidget.h:116
MsgEntry
The structure of 1 queue entry (pointer to a message)
Definition:
message.h:143
CREATE_PAWS_FACTORY
CREATE_PAWS_FACTORY(pawsCraftCancelWindow)
pawsCraftCancelWindow
This handles all the details about how the craft cancel works.
Definition:
pawscraftcancelwindow.h:33
cmdbase.h
pawsCraftCancelWindow::~pawsCraftCancelWindow
virtual ~pawsCraftCancelWindow()
pawswidget.h
pawsCraftCancelWindow::HandleMessage
virtual void HandleMessage(MsgEntry *me)
pawsCraftCancelWindow::Start
void Start(csTicks craftTime)
This is called every time the client is crafting something.
pawsCraftCancelWindow::OnButtonPressed
virtual bool OnButtonPressed(int mouseButton, int keyModifier, pawsWidget *widget)
Called whenever a button is pressed.
pawsCraftCancelWindow::PostSetup
virtual bool PostSetup()
This is called after the widget and all of it's children have been created.
msghandler.h
psClientNetSubscriber
Definition:
cmdbase.h:67
pawsProgressBar
Definition:
pawsprogressbar.h:28
pawsCraftCancelWindow::Draw
virtual void Draw()
Draws the widget and all of it's children.
client
gui
pawscraftcancelwindow.h
Generated on Sat Jun 19 2021 05:00:22 for Planeshift by
1.8.11