MCPcopy Create free account
hub / github.com/ZDoom/Raze / AddString

Method AddString

source/core/console/c_notifybuffer.cpp:87–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87void 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
110void FNotifyBuffer::DrawNative()

Callers 2

WriteSavegameFunction · 0.45
Mus_SerializeFunction · 0.45

Calls 5

GetNotifyFontFunction · 0.85
ActiveRatioFunction · 0.50
IsEmptyMethod · 0.45
GetWidthMethod · 0.45
GetHeightMethod · 0.45

Tested by

no test coverage detected