-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathZChannelListItem.h
37 lines (29 loc) · 947 Bytes
/
ZChannelListItem.h
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
#ifndef _ZCHANNELLISTITEM_H
#define _ZCHANNELLISTITEM_H
#include "MListBox.h"
class ZChannelListItem : public MListItem {
MUID m_uidChannel;
char m_szChannelName[64];
int m_nChannelType;
int m_nChannelNumber;
int m_nPlayers,m_nMaxPlayers;
char m_szItemString[256];
public:
ZChannelListItem(const MUID& uid, const int nChannelNumber, const char* szChannelName,
const int nChannelType, const int nPlayers, const int nMaxPlayers)
{
m_uidChannel = uid; strcpy(m_szChannelName, szChannelName);
m_nChannelType = nChannelType;
m_nChannelNumber = nChannelNumber;
m_nPlayers = nPlayers;
m_nMaxPlayers = nMaxPlayers;
}
virtual ~ZChannelListItem() {}
virtual const char* GetString(void) {
sprintf(m_szItemString,"%s (%d/%d)",m_szChannelName,m_nPlayers,m_nMaxPlayers);
return m_szItemString;
}
MUID GetUID() { return m_uidChannel; }
char* GetName() { return m_szChannelName; }
};
#endif