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));
  }
}
Ejemplo n.º 4
0
void IndexedPickerScene::pressMouse(InputEventData eventData) {
  if (!eventData.mouseLeftButton()) {
    return;
  }
  
  pickedSelectableBoxEnabled_ = true;
  pickedSelectableIndex_ = drawPosToSelectableIndex(
                                  eventData.x(), eventData.y());
}