void LengthMapLayeredGraphicScene
    ::moveMouse(InputEventData eventData) {
  if (!(eventData.mouseLeftButton())) {
    return;
  }
  
/*  int x = eventData.x();
  int y = eventData.y();
  
  if (mapType_ == mapTypeWidth) {
    if (((int)(x) % MetatileStructure::metatileWidth)
          > (MetatileStructure::metatileWidth / 2)) {
      x = (int)((x / scale_) + 1) * scale_;
    }
  }
  else if (mapType_ == mapTypeHeight) {
    if (((int)(y) % MetatileStructure::metatileHeight)
          > (MetatileStructure::metatileHeight / 2)) {
      y = (int)((y / scale_) + 1) * scale_;
    }
  } */
  
//  alterMagnitude(x, y, true);
  alterMagnitude(eventData.x(), eventData.y());
}
void LengthMapLayeredGraphicScene
    ::doubleClickMouse(InputEventData eventData) {
  if (!(eventData.mouseLeftButton())) {
    return;
  }
  
  doDialogEdit(eventData.x(), eventData.y());
}
void MetatilePickerLayeredGraphicScene
    ::pressMouse(int x, int y, InputEventData eventData) {
  if (eventData.mouseLeftButton()
      || eventData.mouseRightButton()) {
    // Pick tile
    toolManager_->setCurrentTool(LevelEditorTools::metatilePaint);
    toolManager_->setPickedMetatileIndex(coordinateToMetatileIndex(x, y));
  }
}
Example #4
0
void IndexedPickerScene::pressMouse(InputEventData eventData) {
  if (!eventData.mouseLeftButton()) {
    return;
  }
  
  pickedSelectableBoxEnabled_ = true;
  pickedSelectableIndex_ = drawPosToSelectableIndex(
                                  eventData.x(), eventData.y());
}
void LengthMapLayeredGraphicScene
    ::pressMouse(InputEventData eventData) {
  if (eventData.mouseRightButton()) {
    doDialogEdit(eventData.x(), eventData.y());
    return;
  }
  
  alterMagnitude(eventData.x(),
                 eventData.y());
}
void LevelEditorPreviewLabel::mouseReleaseEvent(QMouseEvent* event) {
    InputEventData data;
    data.setMouseLeftButton(event->buttons() & Qt::LeftButton);
    data.setMouseMiddleButton(event->buttons() & Qt::MiddleButton);
    data.setMouseRightButton(event->buttons() & Qt::RightButton);
    data.setControl(event->modifiers() & Qt::ControlModifier);
    data.setAlt(event->modifiers() & Qt::AltModifier);
    data.setShift(event->modifiers() & Qt::ShiftModifier);

    appState_.editor().levelEditor().levelEditorReleaseMouse(
                event->x(), event->y(), data);

    parentEditor_.refreshDisplay();
}
Example #7
0
void IndexedPickerScene::moveMouse(InputEventData eventData) {
  highlightedSelectableBoxEnabled_ = true;
  highlightedSelectableIndex_ = drawPosToSelectableIndex(
                                  eventData.x(), eventData.y());
}