MCPcopy Create free account
hub / github.com/Panzerschrek/Chasm-Reverse / DrawUserMessages

Method DrawUserMessages

PanzerChasm/console.cpp:212–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210}
211
212void Console::DrawUserMessages()
213{
214 const int letter_height= int( shared_drawers_->text->GetLineHeight() );
215 const int scale= int( shared_drawers_->menu->GetConsoleScale() );
216
217 int y= 0;
218 const int c_offset= 5;
219 for( const UserMessage& message : user_messages_ )
220 {
221 shared_drawers_->text->Print(
222 scale * c_offset, y,
223 message.text.c_str(), scale,
224 ITextDrawer::FontColor::YellowGreen, ITextDrawer::Alignment::Left );
225
226 y+= letter_height * scale;
227 }
228}
229
230void Console::LogCallback( std::string str, const Log::LogLevel log_level )
231{

Callers

nothing calls this directly

Calls 3

GetLineHeightMethod · 0.45
GetConsoleScaleMethod · 0.45
PrintMethod · 0.45

Tested by

no test coverage detected