Esempio n. 1
0
void ShipCpanel::ChangeMultiFunctionDisplay(multifuncfunc_t f)
{
	Gui::Widget *selected = 0;
	if (f == MFUNC_EQUIPMENT) selected = m_useEquipWidget;
	//if (f == MFUNC_MSGLOG) selected = m_msglog;

	Remove(m_scanner);
	Remove(m_useEquipWidget);
	//Remove(m_msglog);
	Remove(m_inflog);
	if (selected) {
		//if (selected == m_msglog)
		//	Add(selected, 214, -34 + 520);
		//else
			Add(selected, 200, 18 + 520);
		selected->ShowAll();
	}

	//XXX hack to keep the scanner on, always.
	Add(m_scanner, 200, 18 + 520);
	m_scanner->ShowAll();

	//XXX hack to keep InfoBanner on
	//Add(m_inflog, 350, -340 + 520);
	Add(m_inflog, Gui::Screen::GetWidth() / 2, -340 + 520);
	m_inflog->ShowAll();

	//XXX hack to always show missiles
	Add(m_useEquipWidget, 200, 18 + 520);
	m_useEquipWidget->ShowAll();
}
Esempio n. 2
0
void ShipCpanel::ChangeMultiFunctionDisplay(multifuncfunc_t f)
{
	Gui::Widget *selected = 0;
	if (f == MFUNC_SCANNER) selected = m_scanner;
	if (f == MFUNC_EQUIPMENT) selected = m_useEquipWidget;
	if (f == MFUNC_MSGLOG) selected = m_msglog;

	Remove(m_scanner);
	Remove(m_useEquipWidget);
	Remove(m_msglog);
	if (selected) {
		m_mfsel->SetSelected(f);
		Add(selected, 200, 18);
		selected->ShowAll();
	}
}