void ScoreBoard::Draw() { updateTextInfo(); drawTowerButton(); drawInfoText(); }
void FGIRCNicknames::onRenderCell(GFXSurface *sfc, Point2I offset, Point2I cell, bool sel, bool mouseOver) { IRCClient::Channel *channel = mIRCClient->findChannel(NULL); Point2I parentOffset = parent->localToGlobalCoord(Point2I(0, 0)); bool ghosted = FALSE; if (root) { SimGui::Control *topDialog = root->getDialogNumber(1); if ((! active) || (topDialog && (topDialog != getTopMostParent()) && (topDialog->findControlWithTag(IDCTG_DIALOG)))) { ghosted = TRUE; } } //initialize the font GFXFont *font; if (ghosted || (! cellSelectable(cell))) font = hFontNA; else if (sel) font = hFontHL; else if (mouseOver) font = hFontMO; else font = hFont; //initialize the draw offset Point2I drawOffset = offset; drawOffset.x += 2; //first draw the icon int iconWidth = mOperBMP->getWidth() + 3; GFXBitmap *bmp; if (entryPtrs[cell.y]->status & IRCClient::PERSON_IGNORE) { bmp = mIgnoreBMP; } else { if (entryPtrs[cell.y]->status & IRCClient::PERSON_AWAY) { bmp = mAwayBMP; } else if (entryPtrs[cell.y]->status & IRCClient::PERSON_OPERATOR) { bmp = mOperBMP; } else if (entryPtrs[cell.y]->status & IRCClient::PERSON_SPEAKER || (channel && !(channel->flags & IRCClient::CHANNEL_MODERATED))) { bmp = mSpkrBMP; } else { bmp = mSpecBMP; } } if (bmp && (! ghosted)) { sfc->drawBitmap2d(bmp, &Point2I(drawOffset.x, drawOffset.y + 2 + (cellSize.y - bmp->getHeight()) / 2)); } drawOffset.x += iconWidth; char *entryText = entryPtrs[cell.y]->nick; if (entryText) { drawInfoText(sfc, font, entryText, Point2I(drawOffset.x, drawOffset.y - 2), Point2I(columnInfo[0]->width - 4 - iconWidth, cellSize.y), TRUE, FALSE); } drawOffset.x += columnInfo[0]->width; }