MCPcopy Create free account
hub / github.com/chrxh/alien / processCenterButton

Method processCenterButton

source/Gui/SpatialControlWindow.cpp:113–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113void SpatialControlWindow::processCenterButton()
114{
115 if (AlienImGui::ToolbarButton(AlienImGui::ToolbarButtonParameters().text(ICON_FA_CROSSHAIRS))) {
116 Viewport::get().setZoomFactor(1.0f);
117 auto worldSize = toRealVector2D(_simulationFacade->getWorldSize());
118 Viewport::get().setCenterInWorldPos({worldSize.x / 2, worldSize.y / 2});
119 }
120 AlienImGui::Tooltip("Center");
121}
122
123void SpatialControlWindow::processResizeButton()
124{

Callers

nothing calls this directly

Calls 4

toRealVector2DFunction · 0.85
setZoomFactorMethod · 0.80
getWorldSizeMethod · 0.80
setCenterInWorldPosMethod · 0.80

Tested by

no test coverage detected