summaryrefslogtreecommitdiff
path: root/src/login/LoginView.h
blob: fe87a3f32ff7cf7da92a949ab7b41bd0ebac060e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
 * LoginView.h
 *
 *  Created on: Jan 24, 2012
 *      Author: Simon
 */

#ifndef LOGINVIEW_H_
#define LOGINVIEW_H_

#include "interface/Window.h"
#include "LoginController.h"
#include "LoginModel.h"

namespace ui
{
	class Textbox;
	class Button;
	class Label;
}

class LoginController;
class LoginMode;
class LoginView: public ui::Window {
	LoginController * c;
	ui::Point targetSize;
	ui::Button * loginButton;
	ui::Button * cancelButton;
	ui::Label * titleLabel;
	ui::Label * infoLabel;
	ui::Textbox * usernameField;
	ui::Textbox * passwordField;
public:
	class LoginAction;
	class CancelAction;
	LoginView();
	virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt);
	void AttachController(LoginController * c_) { c = c_; }
	void NotifyStatusChanged(LoginModel * sender);
	virtual void OnDraw();
	virtual void OnTick(float dt);
	virtual ~LoginView();
};

#endif /* LOGINVIEW_H_ */