0ad/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Common/Sidebar.cpp
Ykkrosh 039f26f0c3 Fixed editor brokenness.
# More useful environment (water, lighting) editing
(now saved into the map files).
Fixed no-PCH a bit.

This was SVN commit r4002.
2006-06-11 07:03:59 +00:00

30 lines
557 B
C++

#include "stdafx.h"
#include "Sidebar.h"
IMPLEMENT_DYNAMIC_CLASS(Sidebar, wxPanel)
Sidebar::Sidebar(wxWindow* sidebarContainer, wxWindow* WXUNUSED(bottomBarContainer))
: wxPanel(sidebarContainer), 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);
}