* Draw a border. * * @param left Left position of the border. * @param top Top position of the border. * @param width Width of the border. * @param height Height of the border. * @param colourSchemaIndex Index of the colourSchema used. * @param fill True if you want the border to be filled. */
| 1965 | * @param fill True if you want the border to be filled. |
| 1966 | */ |
| 1967 | void GUI_DrawBorder(uint16 left, uint16 top, uint16 width, uint16 height, uint16 colourSchemaIndex, bool fill) |
| 1968 | { |
| 1969 | uint16 *colourSchema; |
| 1970 | |
| 1971 | if (!fill) GFX_Screen_SetDirty(SCREEN_ACTIVE, left, top, left + width, top + height); |
| 1972 | |
| 1973 | width -= 1; |
| 1974 | height -= 1; |
| 1975 | |
| 1976 | colourSchema = s_colourBorderSchema[colourSchemaIndex]; |
| 1977 | |
| 1978 | if (fill) GUI_DrawFilledRectangle(left, top, left + width, top + height, colourSchema[0] & 0xFF); |
| 1979 | |
| 1980 | GUI_DrawLine(left, top + height, left + width, top + height, colourSchema[1] & 0xFF); |
| 1981 | GUI_DrawLine(left + width, top, left + width, top + height, colourSchema[1] & 0xFF); |
| 1982 | GUI_DrawLine(left, top, left + width, top, colourSchema[2] & 0xFF); |
| 1983 | GUI_DrawLine(left, top, left, top + height, colourSchema[2] & 0xFF); |
| 1984 | |
| 1985 | GFX_PutPixel(left, top + height, colourSchema[3] & 0xFF); |
| 1986 | GFX_PutPixel(left + width, top, colourSchema[3] & 0xFF); |
| 1987 | } |
| 1988 | |
| 1989 | /** |
| 1990 | * Display a hint to the user. Only show each hint exactly once. |
no test coverage detected