| 85 | } |
| 86 | |
| 87 | void FNotifyBuffer::AddString(int printlevel, FString source) |
| 88 | { |
| 89 | if (!(printlevel & PRINT_NOTIFY) && !con_notify_advanced) return; |
| 90 | |
| 91 | if (hud_messages == 0 || |
| 92 | screen == nullptr || |
| 93 | source.IsEmpty() || |
| 94 | gamestate == GS_FULLCONSOLE || |
| 95 | gamestate == GS_MENUSCREEN || |
| 96 | con_notifylines == 0) |
| 97 | return; |
| 98 | |
| 99 | auto screenratio = ActiveRatio(screen->GetWidth(), screen->GetHeight()); |
| 100 | |
| 101 | FFont* font = GetNotifyFont(); |
| 102 | if (font == nullptr) return; // Without an initialized font we cannot handle the message (this is for those which come here before the font system is ready.) |
| 103 | double fontscale = (generic_ui? 0.7 : NotifyFontScale) * con_notifyscale; |
| 104 | |
| 105 | int width = int(320 * (screenratio / 1.333) / fontscale); |
| 106 | FNotifyBufferBase::AddString(printlevel & PRINT_TYPES, font, source, width, con_notifytime, con_notifylines); |
| 107 | } |
| 108 | |
| 109 | |
| 110 | void FNotifyBuffer::DrawNative() |
no test coverage detected