MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / handleMouseWheel

Method handleMouseWheel

source/modes/EditorMode.cpp:282–308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280}
281
282void EditorMode::handleMouseWheel(const OIS::MouseEvent& arg)
283{
284 ODFrameListener& frameListener = ODFrameListener::getSingleton();
285
286 if (arg.state.Z.rel > 0)
287 {
288 if (getKeyboard()->isModifierDown(OIS::Keyboard::Ctrl))
289 {
290 mGameMap->getLocalPlayer()->rotateHand(Player::Direction::left);
291 }
292 else
293 {
294 frameListener.moveCamera(CameraManager::moveDown);
295 }
296 }
297 else if (arg.state.Z.rel < 0)
298 {
299 if (getKeyboard()->isModifierDown(OIS::Keyboard::Ctrl))
300 {
301 mGameMap->getLocalPlayer()->rotateHand(Player::Direction::right);
302 }
303 else
304 {
305 frameListener.moveCamera(CameraManager::moveUp);
306 }
307 }
308}
309
310bool EditorMode::mousePressed(const OIS::MouseEvent &arg, OIS::MouseButtonID id)
311{

Callers

nothing calls this directly

Calls 3

rotateHandMethod · 0.80
getLocalPlayerMethod · 0.80
moveCameraMethod · 0.80

Tested by

no test coverage detected