1
0
forked from mirrors/0ad
Files
0ad/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Common/Sidebar.cpp
T
Ykkrosh 4e83672579 # Added scripting support to the scenario editor UI
Added modified version of wxJavaScript.
Added Atlas script interface.
Rewrote the Map sidebar in JS.

This was SVN commit r5144.
2007-06-05 18:16:55 +00:00

29 lines
580 B
C++

#include "stdafx.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);
}