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

Method ExecModal

source/common/widgets/errorwindow.cpp:10–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8#include <zwidget/widgets/scrollbar/scrollbar.h>
9
10bool ErrorWindow::ExecModal(const std::string& text, const std::string& log)
11{
12 Size screenSize = GetScreenSize();
13 double windowWidth = 1200.0;
14 double windowHeight = 700.0;
15
16 auto window = std::make_unique<ErrorWindow>();
17 window->SetText(text, log);
18 window->SetFrameGeometry((screenSize.width - windowWidth) * 0.5, (screenSize.height - windowHeight) * 0.5, windowWidth, windowHeight);
19 window->Show();
20
21 DisplayWindow::RunLoop();
22
23 return window->Restart;
24}
25
26ErrorWindow::ErrorWindow() : Widget(nullptr, WidgetType::Window)
27{

Callers

nothing calls this directly

Calls 3

SetTextMethod · 0.45
SetFrameGeometryMethod · 0.45
ShowMethod · 0.45

Tested by

no test coverage detected