Simply renders the hud input message if there is one
| 1019 | |
| 1020 | // Simply renders the hud input message if there is one |
| 1021 | void RenderHUDInputMessage() { |
| 1022 | char message[255]; |
| 1023 | int y, x, lw; |
| 1024 | |
| 1025 | ddgr_color text_color = HUD_COLOR; |
| 1026 | grtext_SetColor(text_color); |
| 1027 | |
| 1028 | if (Doing_input_message == HUD_MESSAGE_TEAM) { |
| 1029 | snprintf(message, sizeof(message), TXT_HUD_TEAMSAY, HudInputMessage); |
| 1030 | } else { |
| 1031 | if (Marker_message) |
| 1032 | snprintf(message, sizeof(message), TXT_HUD_MARKER, HudInputMessage); |
| 1033 | else |
| 1034 | snprintf(message, sizeof(message), TXT_MESSAGE, HudInputMessage); |
| 1035 | } |
| 1036 | |
| 1037 | grtext_SetAlpha(HUD_ALPHA); |
| 1038 | grtext_SetFlags(0); |
| 1039 | |
| 1040 | // RenderHUDTextNoFormatFlags(HUDTEXT_CENTERED, HUD_COLOR, HUD_ALPHA, 1, 0, y, message); |
| 1041 | lw = grtext_GetTextLineWidth(message); |
| 1042 | x = (Game_window_w - lw) / 2; |
| 1043 | if (Small_hud_flag) { |
| 1044 | y = Max_window_h - (int)(40 * ((float)Max_window_h / (float)DEFAULT_HUD_HEIGHT)); |
| 1045 | HUD_inmsg_dirty_rect.set(x, y, x + lw, y + grfont_GetHeight(HUD_FONT)); |
| 1046 | } else { |
| 1047 | y = (Game_window_h * 3 / 5) + Game_window_y; |
| 1048 | } |
| 1049 | grtext_Puts(x, y, message); |
| 1050 | } |
| 1051 | |
| 1052 | int testcolor = 200; |
| 1053 |
no test coverage detected