Inheritable operations
| 178 | |
| 179 | // Inheritable operations |
| 180 | void UIConsoleGadget::OnDraw() { |
| 181 | int x, y, cy, index; |
| 182 | char *linebuf; |
| 183 | |
| 184 | // draw frame |
| 185 | if (m_Flags & UIF_BORDER) { |
| 186 | ui_DrawBox(GR_GREEN, 1, 1, m_W - 1, m_H - 1); |
| 187 | ui_DrawBox(GR_RGB(64, 255, 64), 3, 3, m_W - 3, m_H - 3); |
| 188 | } |
| 189 | |
| 190 | // draw text |
| 191 | ui_SetCharAlpha(255); |
| 192 | ui_DrawSetFont(m_ConsoleFont); |
| 193 | |
| 194 | x = m_OffX; |
| 195 | y = m_OffY; |
| 196 | |
| 197 | index = 0; |
| 198 | |
| 199 | for (cy = m_VisRowStart; cy < (m_VisRowStart + m_VisRows); cy++) { |
| 200 | linebuf = m_ConsoleBuffer + (m_Rowsize * cy); |
| 201 | ui_DrawString(m_ColorRows[cy], x, y, linebuf); |
| 202 | y = y + ui_GetFontHeight() + 1; |
| 203 | } |
| 204 | } |
| 205 | |
| 206 | // OnUserProcess |
| 207 | // Takes care of scrolling of text and any keyboard input. |
nothing calls this directly
no test coverage detected