summaryrefslogtreecommitdiff
path: root/src/gui/char_select.h
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2006-01-22 13:31:13 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2006-01-22 13:31:13 +0000
commitbd56bf8afdab16383ed8ad08412a8c807f84af85 (patch)
tree0e963ada63bcbe3c50dd77986aaa15b9ba49816a /src/gui/char_select.h
parent5359640b6f271af31f6423df9d661433eff89a3e (diff)
downloadmana-client-bd56bf8afdab16383ed8ad08412a8c807f84af85.tar.gz
mana-client-bd56bf8afdab16383ed8ad08412a8c807f84af85.tar.bz2
mana-client-bd56bf8afdab16383ed8ad08412a8c807f84af85.tar.xz
mana-client-bd56bf8afdab16383ed8ad08412a8c807f84af85.zip
Merged NETWORK branch (includes BEING_OVERHAUL).
Diffstat (limited to 'src/gui/char_select.h')
-rw-r--r--src/gui/char_select.h59
1 files changed, 12 insertions, 47 deletions
diff --git a/src/gui/char_select.h b/src/gui/char_select.h
index 7db67699..94d69e06 100644
--- a/src/gui/char_select.h
+++ b/src/gui/char_select.h
@@ -24,15 +24,14 @@
#ifndef _CHAR_SELECT_H
#define _CHAR_SELECT_H
-#include "confirm_dialog.h"
#include "window.h"
#include "../guichanfwd.h"
+#include "../lockedarray.h"
-#include <SDL_events.h>
-
+class LocalPlayer;
+class Network;
class PlayerBox;
-struct PLAYER_INFO;
/**
* Character selection dialog.
@@ -42,18 +41,22 @@ struct PLAYER_INFO;
class CharSelectDialog : public Window, public gcn::ActionListener
{
public:
+ friend class CharDeleteConfirm;
/**
* Constructor.
*/
- CharSelectDialog();
+ CharSelectDialog(Network *network, LockedArray<LocalPlayer*> *charInfo);
void action(const std::string& eventId);
- void setPlayerInfo(PLAYER_INFO* pi);
+ void updatePlayerInfo();
void logic();
private:
+ Network *mNetwork;
+ LockedArray<LocalPlayer*> *mCharInfo;
+
gcn::Button *selectButton;
gcn::Button *cancelButton;
gcn::Button *newCharButton;
@@ -65,47 +68,18 @@ class CharSelectDialog : public Window, public gcn::ActionListener
gcn::Label *levelLabel;
gcn::Label *jobLevelLabel;
gcn::Label *moneyLabel;
-
- int mStatus;
- int mCurrentSlot;
PlayerBox *playerBox;
-
- void changeSlot(int slot);
/**
* Communicate character deletion to the server.
*/
void attemptCharDelete();
-
- /**
- * Check server answer.
- */
- void checkCharDelete();
/**
* Communicate character selection to the server.
*/
void attemptCharSelect();
-
- /**
- * Check server answer.
- */
- void checkCharSelect();
-
- /**
- * Listener for confirming character deletion.
- */
- class CharDeleteConfirm : public ConfirmDialog
- {
- public:
- CharDeleteConfirm(CharSelectDialog *master);
- void action(const std::string &eventId);
- void logic();
- private:
- CharSelectDialog *master;
- int mStatus;
- };
};
/**
@@ -119,15 +93,14 @@ class CharCreateDialog : public Window, public gcn::ActionListener
/**
* Constructor.
*/
- CharCreateDialog(Window *parent = NULL, int slot = 0);
-
- void logic();
+ CharCreateDialog(Window *parent, int slot, Network *network);
void action(const std::string& eventId);
std::string getName();
private:
+ Network *mNetwork;
gcn::TextField *nameField;
gcn::Label *nameLabel;
gcn::Button *nextHairColorButton;
@@ -140,21 +113,13 @@ class CharCreateDialog : public Window, public gcn::ActionListener
gcn::Button *cancelButton;
PlayerBox *playerBox;
-
- int mStatus;
+
int mSlot;
/**
* Communicate character creation to the server.
*/
void attemptCharCreate();
-
- /**
- * Receive new char info.
- */
- void checkCharCreate();
};
-void charSelectInputHandler(SDL_KeyboardEvent *keyEvent);
-
#endif