================ Text_PaintWithCursor ================ */ iMaxPixelWidth is 0 here for no-limit
| 654 | */ |
| 655 | // iMaxPixelWidth is 0 here for no-limit |
| 656 | void Text_PaintWithCursor(float x, float y, float scale, vec4_t color, const char *text, int cursorPos, char cursor, int iMaxPixelWidth, int style, int iFontIndex) |
| 657 | { |
| 658 | Text_Paint(x, y, scale, color, text, iMaxPixelWidth, style, iFontIndex); |
| 659 | |
| 660 | // now print the cursor as well... |
| 661 | // |
| 662 | char sTemp[1024]; |
| 663 | int iCopyCount = iMaxPixelWidth > 0 ? Q_min( (int)strlen( text ), iMaxPixelWidth ) : (int)strlen( text ); |
| 664 | iCopyCount = Q_min(iCopyCount, cursorPos); |
| 665 | iCopyCount = Q_min(iCopyCount,(int)sizeof(sTemp)); |
| 666 | |
| 667 | // copy text into temp buffer for pixel measure... |
| 668 | // |
| 669 | strncpy(sTemp,text,iCopyCount); |
| 670 | sTemp[iCopyCount] = '\0'; |
| 671 | |
| 672 | int iNextXpos = ui.R_Font_StrLenPixels(sTemp, iFontIndex, scale ); |
| 673 | |
| 674 | Text_Paint(x+iNextXpos, y, scale, color, va("%c",cursor), iMaxPixelWidth, style|ITEM_TEXTSTYLE_BLINK, iFontIndex); |
| 675 | } |
| 676 | |
| 677 | |
| 678 | const char *UI_FeederItemText(float feederID, int index, int column, qhandle_t *handle) |
nothing calls this directly
no test coverage detected