MinPlayer option (#113)

* let minplayers to inherit from ini . using enum to define preview save options .
This commit is contained in:
Zero Fanker 2024-11-08 23:43:02 -05:00 committed by GitHub
parent 6364362bd3
commit 18c1956d68
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 64 additions and 38 deletions

View file

@ -42,7 +42,8 @@ CSaveMapOptionsDlg::CSaveMapOptionsDlg(CWnd* pParent /*=NULL*/)
{
//{{AFX_DATA_INIT(CSaveMapOptionsDlg)
m_Compress = 1;
m_PreviewMode = 0;
m_PreviewMode = PREVIEW_MINIMAP;
m_MinPlayers = 2;
m_MapName = _T("");
m_AirWar = FALSE;
m_Cooperative = FALSE;
@ -56,10 +57,12 @@ CSaveMapOptionsDlg::CSaveMapOptionsDlg(CWnd* pParent /*=NULL*/)
//}}AFX_DATA_INIT
CIniFile& ini = Map->GetIniFile();
if (!Map->IsMultiplayer())
m_PreviewMode = 1;
if (!Map->IsMultiplayer()) {
m_PreviewMode = PREVIEW_DONT_CHANGE;
}
m_MapName = ini.GetString("Basic", "Name");
m_MinPlayers = ini.GetInteger("Basic", "MinPlayer");
}
@ -67,9 +70,9 @@ void CSaveMapOptionsDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CSaveMapOptionsDlg)
DDX_Radio(pDX, IDC_COMPRESS, m_Compress);
DDX_Radio(pDX, IDC_PREVIEWMODE, m_PreviewMode);
DDX_Radio(pDX, IDC_PREVIEWMODE, reinterpret_cast<int&>(m_PreviewMode));
DDX_Text(pDX, IDC_MAPNAME, m_MapName);
DDX_Text(pDX, IDC_SAVE_OPT_M_PLAYERS, m_MinPlayers);
#ifdef RA2_MODE
DDX_Check(pDX, IDC_AIRWAR, m_AirWar);
DDX_Check(pDX, IDC_COOPERATIVE, m_Cooperative);
@ -119,3 +122,8 @@ BOOL CSaveMapOptionsDlg::OnInitDialog()
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX-Eigenschaftenseiten sollten FALSE zurückgeben
}
void translateUI()
{
//IDC_SAVE_OPT_MP_TXT;
}