void PhoneWidget::hidePhoneError() { hideError(); if (_signup) { _signup->hide(anim::type::instant); showDescription(); } }
void PhoneWidget::hidePhoneError() { hideError(); if (_signup) { _signup->hideAnimated(); showDescription(); } }
void UIQuestion::process(Event &event) { if (event.eventType == EVENT_BUTTON_DOWN) { CursorType currentCursor = GLOBALS._events.getCursor(); GLOBALS._events.hideCursor(); showDescription(currentCursor); event.handled = true; } }
virtual void doAction() { watch->stop(); Area area; area.add(background, false); area.draw(); showDescription(&area); gameArea->updateMouse(); gameArea->draw(); watch->start(); };
void TalkablePainter::paintDescription(QPainter *painter) { if (!showDescription()) return; QRect rect = DescriptionRect.adjusted(0, VFrameMargin, -HFrameMargin, 0); painter->setFont(Configuration->descriptionFont()); painter->save(); painter->translate(rect.topLeft()); getDescriptionDocument(rect.width())->drawContents(painter); painter->restore(); }
void TalkablePainter::computeDescriptionRect() { DescriptionRect = QRect(); if (!showDescription()) return; int left = NameRect.left(); int right = AvatarRect.left() - 1; int width = right - left + 1; int height = int(getDescriptionDocument(width - HFrameMargin)->size().height() + qreal(0.5)) + VFrameMargin; int top = NameRect.y() + NameRect.height(); DescriptionRect = QRect(left, top, width, height); }
void Inventory::selectSlot(const std::string& selectedSlotId, ItemType type) { if (selectedSlotId.empty()) { deselectCurrentSlot(); return; } m_hasDraggingStarted = true; m_isEquipmentSlotDragged = type != ItemType::VOID; m_startMousePosition = g_inputController->getDefaultViewMousePosition(); if (selectedSlotId.compare(m_selectedSlotId.first) == 0) return; deselectCurrentSlot(); m_selectedSlotId.first = selectedSlotId; m_selectedSlotId.second = type; InventorySlot* selectedSlot = getSelectedSlot(); hideDocument(); if (selectedSlot != nullptr) { selectedSlot->select(); showDescription(selectedSlot->getItem()); } }
void ServerChoice::addServer(const QString &name, const QString &desc, quint16 num, const QString &ip, quint16 max, quint16 port) { mylist->setSortingEnabled(false); QString playerStr; if(max == 0) playerStr = QString::number(num).rightJustified(3); else playerStr = QString::number(num).rightJustified(3) + " / " + QString::number(max); int row = mylist->rowCount(); mylist->setRowCount(row+1); QTableWidgetItem *witem; witem = new QTableWidgetItem(name); witem->setFlags(witem->flags() ^Qt::ItemIsEditable); mylist->setItem(row, 0, witem); witem = new QTableWidgetItem(playerStr); witem->setFlags(witem->flags() ^Qt::ItemIsEditable); mylist->setItem(row, 1, witem); witem = new QTableWidgetItem(ip + ":" + QString::number(port == 0 ? 5080 : port)); witem->setFlags(witem->flags() ^Qt::ItemIsEditable); mylist->setItem(row, 2, witem); descriptionsPerIp.insert(ip + ":" + QString::number(port == 0 ? 5080 : port), desc); /*This needed to be changed because the showDescription function was looking for a ip and port, while only the IP was in the list, and in the end, the description wouldn't be displayed. */ mylist->setSortingEnabled(true); mylist->sortByColumn(1); if (mylist->currentRow() != -1) showDescription(mylist->currentRow()); }