Esempio n. 1
0
bool  WidgetProperties::Inhibit() const
{
    GUI::Widget *w = static_cast<GUI::Widget*>(_item->GetData());
    if (w != NULL)
        return w->Inhibited();
    return false;
}
Esempio n. 2
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();
}
void EditorFileList::MouseDoubleClick(const IPoint &mouse_pos)
{
	if (_currentName >= 0)
	{
		_fileName = _names[_currentName];
		_cursorPos = (int) _fileName.length();

		GUI::Widget *target = Core::guiManager.getLayer(_destLayer) -> getWidget(_destWidget);
		target->AcceptMessage(Message("LoadLevelForEdit", _fileName));
	}
}
Esempio n. 4
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();
	}
}
Esempio n. 5
0
File: Gui.cpp Progetto: LCClyde/Nyra
//===========================================================================//
void Gui::addChild(gui::Widget& child)
{
    reinterpret_cast<QWidget*>(child.getNative())->setParent(&mWidget);
    reinterpret_cast<QWidget*>(child.getNative())->show();
}
Esempio n. 6
0
void  WidgetProperties::Inhibit(bool state)
{
    GUI::Widget *w = static_cast<GUI::Widget*>(_item->GetData());
    if (w != NULL)
        w->Inhibit(state);
}