bool WidgetProperties::Inhibit() const { GUI::Widget *w = static_cast<GUI::Widget*>(_item->GetData()); if (w != NULL) return w->Inhibited(); return false; }
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)); } }
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(); } }
//===========================================================================// void Gui::addChild(gui::Widget& child) { reinterpret_cast<QWidget*>(child.getNative())->setParent(&mWidget); reinterpret_cast<QWidget*>(child.getNative())->show(); }
void WidgetProperties::Inhibit(bool state) { GUI::Widget *w = static_cast<GUI::Widget*>(_item->GetData()); if (w != NULL) w->Inhibit(state); }