コード例 #1
0
ファイル: ShipCpanel.cpp プロジェクト: MeteoricGames/pioneer
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();
}
コード例 #2
0
ファイル: ShipCpanel.cpp プロジェクト: Luomu/pioneer
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();
	}
}