project64/Source/Project64/UserInterface/Settings/SettingsPage.cpp

33 lines
567 B
C++
Raw Normal View History

2016-01-27 09:11:59 +00:00
#include "stdafx.h"
#include "SettingsPage.h"
CConfigSettingSection::CConfigSettingSection(LPCWSTR PageTitle) :
m_PageTitle(PageTitle)
{
}
CConfigSettingSection::~CConfigSettingSection()
{
for (size_t i = 0; i < m_Pages.size(); i++)
{
CSettingsPage * Page = m_Pages[i];
delete Page;
}
m_Pages.clear();
}
void CConfigSettingSection::AddPage(CSettingsPage * Page)
{
m_Pages.push_back(Page);
}
CSettingsPage * CConfigSettingSection::GetPage(int PageNo)
{
if (PageNo < 0 || PageNo >= (int)m_Pages.size())
{
2021-04-12 11:35:39 +00:00
return nullptr;
2016-01-27 09:11:59 +00:00
}
return m_Pages[PageNo];
}