mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-07-01 19:03:36 +00:00
CBasicViewport: Make use of in-class initializers
This commit is contained in:
parent
464b417d24
commit
490e8dfd96
@ -8,11 +8,6 @@
|
||||
|
||||
CBasicViewport::CBasicViewport(QWidget *pParent)
|
||||
: QOpenGLWidget(pParent)
|
||||
, mLastDrawTime(CTimer::GlobalTime())
|
||||
, mKeysPressed(0)
|
||||
, mButtonsPressed(0)
|
||||
, mCursorState(Qt::ArrowCursor)
|
||||
, mCursorVisible(true)
|
||||
{
|
||||
setMouseTracking(true);
|
||||
mCamera.SetAspectRatio((float) width() / height());
|
||||
@ -21,9 +16,7 @@ CBasicViewport::CBasicViewport(QWidget *pParent)
|
||||
mViewInfo.GameMode = false;
|
||||
}
|
||||
|
||||
CBasicViewport::~CBasicViewport()
|
||||
{
|
||||
}
|
||||
CBasicViewport::~CBasicViewport() = default;
|
||||
|
||||
void CBasicViewport::initializeGL()
|
||||
{
|
||||
|
@ -21,19 +21,19 @@ protected:
|
||||
// Render
|
||||
CCamera mCamera;
|
||||
CTimer mFrameTimer;
|
||||
double mLastDrawTime;
|
||||
double mLastDrawTime = CTimer::GlobalTime();
|
||||
SViewInfo mViewInfo;
|
||||
|
||||
// Cursor settings
|
||||
QCursor mCursorState;
|
||||
bool mCursorVisible;
|
||||
QCursor mCursorState{Qt::ArrowCursor};
|
||||
bool mCursorVisible = true;
|
||||
|
||||
// Input
|
||||
QPoint mLastMousePos;
|
||||
bool mMouseMoved;
|
||||
bool mMouseMoved = false;
|
||||
CTimer mMoveTimer;
|
||||
FMouseInputs mButtonsPressed;
|
||||
FKeyInputs mKeysPressed;
|
||||
FMouseInputs mButtonsPressed{0};
|
||||
FKeyInputs mKeysPressed{0};
|
||||
|
||||
public:
|
||||
explicit CBasicViewport(QWidget *pParent = nullptr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user