summaryrefslogtreecommitdiff
path: root/src/T2DLL/T2TowerMessage.h
blob: 67d40adea635efc9c9a1a95963cb273351e5116a (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#pragma once
#include "common.h"
#include "LAttachment.h"

class InfoBarMsgItem;

enum {
	kAlertType0 = 0,
	kAlertType1 = 1,
	kAlertType2 = 2,
	kAlertType3 = 3
};

class AFX_CLASS_EXPORT T2TowerMessage : public LAttachment {
public:
	T2TowerMessage(HINSTANCE inModuleHandle, T2TowerDoc* inDoc);
	virtual ~T2TowerMessage();
	virtual void ExecuteSelf(unsigned int inMessage, void* ioData);

	void InfoBarMessage(const CString& inText, int inDelay, const char* inSoundID);
	void EquipBalloonMessage(const CString& inText, T2Equip* inEquip);
	void PeopleBalloonMessage(const CString& inText, T2People* inPeople);
	void EquipBalloonMessage(const CString& inText, POINT inPt);
	void BuildErr(const CString&);
	void BuildErr(unsigned int inID, T2EquipDef* inDef);
	BOOL GetBuildErrString(unsigned int inID, CString& outStr);
	void ObjectBalloonMessage(const CString& inText, const RECT& inRect);
	void InfoDialogMessage(const CString& inText, int inID, int inDelay);
	void AleatMessage(const CString& inText, int inAlertType);
	void SpendTime();
	void SpendTime2();
	void CancelInfoBarMessage(const CString& inText);
	void PassiveInfoBarMessage(const char* inText, int inDelay, const char* inSoundID);
	void SetCaptureRect(RECT inRect);

private:
	void SetInfoBarMsg(InfoBarMsgItem* inItem);
	CWnd* FindFloatingWindow(int inID);

	T2TowerDoc *mDocument;
	int _14;
	HINSTANCE mModuleHandle;
	LArray *mInfoBarMsgItems;
	LArray *mEquipBalloonMessages;
	LArray *mObjectBalloonMessages;
	BOOL mHasCapture;
	RECT mCaptureRect;
};

class InfoBarMsgItem {
public:
	InfoBarMsgItem(const CString &inText, int inDelay, const char *inSoundID);
	~InfoBarMsgItem();

	CString mText;
	int mDelay;
	unsigned int mEndTicks;
	CString mSoundID;
};