2012-12-19 09:30:18 +00:00
|
|
|
/****************************************************************************
|
|
|
|
* *
|
|
|
|
* Project 64 - A Nintendo 64 emulator. *
|
|
|
|
* 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"
|
2008-09-18 03:15:49 +00:00
|
|
|
#include "Settings Page.h"
|
|
|
|
|
2015-03-04 09:36:08 +00:00
|
|
|
CConfigSettingSection::CConfigSettingSection( LPCWSTR PageTitle ) :
|
2008-09-18 03:15:49 +00:00
|
|
|
m_PageTitle(PageTitle)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
CConfigSettingSection::~CConfigSettingSection ()
|
|
|
|
{
|
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();
|
|
|
|
}
|
|
|
|
|
|
|
|
void CConfigSettingSection::AddPage(CSettingsPage * Page )
|
|
|
|
{
|
|
|
|
m_Pages.push_back(Page);
|
|
|
|
}
|
|
|
|
|
|
|
|
CSettingsPage * CConfigSettingSection::GetPage ( int PageNo )
|
|
|
|
{
|
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];
|
|
|
|
}
|