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

Method onSelectObjects

source/Gui/EditorController.cpp:235–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233}
234
235void EditorController::onSelectObjects(RealVector2D const& viewPos, bool modifierKeyPressed)
236{
237 auto pos = Viewport::get().mapViewToWorldPosition({viewPos.x, viewPos.y});
238 auto zoom = Viewport::get().getZoomFactor();
239 if (!modifierKeyPressed) {
240 _simulationFacade->switchSelection(pos, std::max(0.5f, 10.0f / zoom));
241 } else {
242 _simulationFacade->swapSelection(pos, std::max(0.5f, 10.0f / zoom));
243 }
244
245 EditorModel::get().update();
246}
247
248void EditorController::onMoveSelectedObjects(
249 RealVector2D const& viewPos,

Callers 1

Calls 5

getZoomFactorMethod · 0.80
switchSelectionMethod · 0.45
swapSelectionMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected