0ad/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Common/Sidebar.cpp
Ykkrosh 914e5f7c2f Rename stdafx.h to precompiled.h
This was SVN commit r5146.
2007-06-05 18:35:05 +00:00

28 lines
585 B
C++

#include "precompiled.h"
#include "Sidebar.h"
Sidebar::Sidebar(ScenarioEditor& scenarioEditor, wxWindow* sidebarContainer, wxWindow* WXUNUSED(bottomBarContainer))
: wxPanel(sidebarContainer), m_ScenarioEditor(scenarioEditor), m_BottomBar(NULL), m_AlreadyDisplayed(false)
{
m_MainSizer = new wxBoxSizer(wxVERTICAL);
SetSizer(m_MainSizer);
}
void Sidebar::OnSwitchAway()
{
if (m_BottomBar)
m_BottomBar->Show(false);
}
void Sidebar::OnSwitchTo()
{
if (! m_AlreadyDisplayed)
{
m_AlreadyDisplayed = true;
OnFirstDisplay();
}
if (m_BottomBar)
m_BottomBar->Show(true);
}