fixed camera control,
removed test exe
This commit is contained in:
@@ -278,6 +278,26 @@ void OglViewerWidget::keyPressEvent(QKeyEvent *e)
|
||||
}
|
||||
}
|
||||
|
||||
void OglViewerWidget::keyReleaseEvent(QKeyEvent *e)
|
||||
{
|
||||
if (e->key() == Qt::Key_W || e->key() == Qt::Key_S)
|
||||
{
|
||||
emit m_camera->wheelAction(0);
|
||||
|
||||
if (m_light.headlight)
|
||||
updateLightPosition();
|
||||
update();
|
||||
}
|
||||
else if (e->key() == Qt::Key_A || e->key() == Qt::Key_D)
|
||||
{
|
||||
emit m_camera->moveAction(QVector2D(0, 0));
|
||||
|
||||
if (m_light.headlight)
|
||||
updateLightPosition();
|
||||
update();
|
||||
}
|
||||
}
|
||||
|
||||
void OglViewerWidget::dragEnterEvent(QDragEnterEvent *e)
|
||||
{
|
||||
if (e->mimeData()->hasUrls())
|
||||
|
||||
Reference in New Issue
Block a user