pioneer/src/View.cpp

31 lines
509 B
C++
Raw Permalink Normal View History

2020-12-31 07:32:16 -08:00
// Copyright © 2008-2021 Pioneer Developers. See AUTHORS.txt for details
2012-09-15 17:59:15 -07:00
// Licensed under the terms of the GPL v3. See licenses/GPL-3.txt
2012-09-12 04:38:30 -07:00
2012-04-01 17:00:11 -07:00
#include "View.h"
#include "Pi.h"
View::View() :
Gui::Fixed(float(Gui::Screen::GetWidth()), float(Gui::Screen::GetHeight() - 64))
{
2012-04-01 17:00:11 -07:00
}
View::~View()
{
2012-04-01 17:00:11 -07:00
Gui::Screen::RemoveBaseWidget(this);
}
void View::Attach()
{
2012-09-22 23:44:36 -07:00
OnSwitchTo();
2012-04-01 17:00:11 -07:00
Gui::Screen::AddBaseWidget(this, 0, 0);
ShowAll();
2012-04-01 17:00:11 -07:00
}
void View::Detach()
{
2012-04-01 17:00:11 -07:00
Gui::Screen::RemoveBaseWidget(this);
OnSwitchFrom();
2012-04-01 17:00:11 -07:00
}