MCPcopy Create free account
hub / github.com/EasyRPG/Player / HandleErrorOutput

Function HandleErrorOutput

src/output.cpp:169–194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167}
168
169static void HandleErrorOutput(const std::string& err) {
170 // Drawing directly on the screen because message_overlay is not visible
171 // when faded out
172 BitmapRef surface = DisplayUi->GetDisplaySurface();
173 surface->FillRect(surface->GetRect(), Color(255, 0, 0, 128));
174
175 std::string error = err + "\nPress [ENTER] key to exit...";
176
177 Text::Draw(*surface, 11, 11, *Font::DefaultBitmapFont(), Color(0, 0, 0, 255), error);
178 Text::Draw(*surface, 10, 10, *Font::DefaultBitmapFont(), Color(255, 255, 255, 255), error);
179 DisplayUi->UpdateDisplay();
180
181 if (ignore_pause) { return; }
182
183 Input::ResetKeys();
184 while (!Input::IsAnyPressed()) {
185#if !defined(USE_LIBRETRO)
186 Game_Clock::SleepFor(1ms);
187#endif
188 if (!DisplayUi->ProcessEvents() || Player::exit_flag) {
189 break;
190 }
191
192 Input::Update();
193 }
194}
195
196void Output::Quit() {
197 Game_Config::CloseLogFile();

Callers 1

ErrorStrMethod · 0.85

Calls 6

FillRectMethod · 0.80
GetRectMethod · 0.80
ColorClass · 0.70
UpdateFunction · 0.70
UpdateDisplayMethod · 0.45
ProcessEventsMethod · 0.45

Tested by

no test coverage detected