MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / centerClientWindowOnPlayer

Method centerClientWindowOnPlayer

source/game/StarWorldClient.cpp:444–446  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

442}
443
444void WorldClient::centerClientWindowOnPlayer(Vec2U const& windowSize) {
445 setClientWindow(RectI::withCenter(Vec2I::floor(m_mainPlayer->position()), Vec2I(windowSize)));
446}
447
448void WorldClient::centerClientWindowOnPlayer() {
449 centerClientWindowOnPlayer(Vec2U(clientWindow().size()));

Callers 1

Calls 2

positionMethod · 0.45
sizeMethod · 0.45

Tested by 1