MCPcopy Create free account
hub / github.com/SpartanJ/eepp / centerToDisplay

Method centerToDisplay

src/eepp/window/window.cpp:609–614  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

607void Window::setCurrent() {}
608
609void Window::centerToDisplay() {
610 if ( isWindowed() ) {
611 setPosition( mWindow.DesktopResolution.getWidth() / 2 - mWindow.WindowConfig.Width / 2,
612 mWindow.DesktopResolution.getHeight() / 2 - mWindow.WindowConfig.Height / 2 );
613 }
614}
615
616Rect Window::getBorderSize() const {
617 return Rect();

Callers 3

resizeWindowToLayoutMethod · 0.80
inputMethod · 0.80
mainLoopFunction · 0.80

Calls 3

setPositionFunction · 0.85
getWidthMethod · 0.45
getHeightMethod · 0.45

Tested by 1

inputMethod · 0.64