MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / createWindowCentred

Function createWindowCentred

src/OpenLoco/src/Ui/WindowManager.cpp:808–813  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

806 }
807
808 Window* createWindowCentred(WindowType type, Ui::Size size, WindowFlags flags, const WindowEventList& events)
809 {
810 auto x = (Ui::width() / 2) - (size.width / 2);
811 auto y = std::max(28, (Ui::height() / 2) - (size.height / 2));
812 return createWindow(type, { x, y }, size, flags, events);
813 }
814
815 // 0x004C5FC8
816 static void drawSingle(Gfx::DrawingContext& drawingCtx, Window* w, int32_t left, int32_t top, int32_t right, int32_t bottom)

Callers 15

openFunction · 0.85
openFunction · 0.85
openFunction · 0.85
internalOpenFunction · 0.85
openFunction · 0.85
openFunction · 0.85
openFunction · 0.85
openFunction · 0.85
openFunction · 0.85
openFunction · 0.85
openFunction · 0.85
openFunction · 0.85

Calls 3

widthFunction · 0.85
heightFunction · 0.85
createWindowFunction · 0.70

Tested by

no test coverage detected