2012-12-19 09:30:18 +00:00
|
|
|
/****************************************************************************
|
|
|
|
* *
|
2015-11-10 05:21:49 +00:00
|
|
|
* Project64 - A Nintendo 64 emulator. *
|
2012-12-19 09:30:18 +00:00
|
|
|
* http://www.pj64-emu.com/ *
|
|
|
|
* Copyright (C) 2012 Project64. All rights reserved. *
|
|
|
|
* *
|
|
|
|
* License: *
|
|
|
|
* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html *
|
|
|
|
* *
|
|
|
|
****************************************************************************/
|
2010-06-07 02:23:58 +00:00
|
|
|
#include "stdafx.h"
|
2015-09-07 19:47:44 +00:00
|
|
|
|
2015-12-04 06:49:31 +00:00
|
|
|
#include "SettingsPage.h"
|
2008-09-18 03:15:49 +00:00
|
|
|
|
2015-11-07 01:11:25 +00:00
|
|
|
CConfigSettingSection::CConfigSettingSection(LPCWSTR PageTitle) :
|
|
|
|
m_PageTitle(PageTitle)
|
2008-09-18 03:15:49 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2015-11-07 01:11:25 +00:00
|
|
|
CConfigSettingSection::~CConfigSettingSection()
|
2008-09-18 03:15:49 +00:00
|
|
|
{
|
2010-09-22 21:43:42 +00:00
|
|
|
for (size_t i = 0; i < m_Pages.size(); i++)
|
2008-09-18 03:15:49 +00:00
|
|
|
{
|
2012-10-04 12:01:08 +00:00
|
|
|
CSettingsPage * Page = m_Pages[i];
|
|
|
|
delete Page;
|
2008-09-18 03:15:49 +00:00
|
|
|
}
|
|
|
|
m_Pages.clear();
|
|
|
|
}
|
|
|
|
|
2015-11-07 01:11:25 +00:00
|
|
|
void CConfigSettingSection::AddPage(CSettingsPage * Page)
|
2008-09-18 03:15:49 +00:00
|
|
|
{
|
|
|
|
m_Pages.push_back(Page);
|
|
|
|
}
|
|
|
|
|
2015-11-07 01:11:25 +00:00
|
|
|
CSettingsPage * CConfigSettingSection::GetPage(int PageNo)
|
2008-09-18 03:15:49 +00:00
|
|
|
{
|
2010-09-22 21:43:42 +00:00
|
|
|
if (PageNo < 0 || PageNo >= (int)m_Pages.size())
|
2008-09-18 03:15:49 +00:00
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
return m_Pages[PageNo];
|
|
|
|
}
|