2011-09-07 23:06:51 +02:00
|
|
|
#ifndef _PREVIEW_H_
|
|
|
|
#define _PREVIEW_H_
|
|
|
|
|
2013-08-09 06:57:18 +02:00
|
|
|
#include "lc_glwidget.h"
|
2011-09-07 23:06:51 +02:00
|
|
|
|
|
|
|
class PieceInfo;
|
|
|
|
|
2013-08-09 06:57:18 +02:00
|
|
|
class PiecePreview : public lcGLWidget
|
2011-09-07 23:06:51 +02:00
|
|
|
{
|
|
|
|
public:
|
2013-08-09 06:57:18 +02:00
|
|
|
PiecePreview();
|
2011-09-07 23:06:51 +02:00
|
|
|
virtual ~PiecePreview();
|
|
|
|
|
|
|
|
void OnDraw();
|
2013-08-09 06:57:18 +02:00
|
|
|
void OnLeftButtonDown();
|
|
|
|
void OnLeftButtonUp();
|
|
|
|
void OnLeftButtonDoubleClick();
|
|
|
|
void OnRightButtonDown();
|
|
|
|
void OnRightButtonUp();
|
|
|
|
void OnMouseMove();
|
2011-09-07 23:06:51 +02:00
|
|
|
|
|
|
|
PieceInfo* GetCurrentPiece() const
|
2015-02-22 03:54:43 +01:00
|
|
|
{
|
|
|
|
return m_PieceInfo;
|
|
|
|
}
|
|
|
|
|
2011-09-07 23:06:51 +02:00
|
|
|
void SetCurrentPiece(PieceInfo* Info);
|
2015-02-22 03:54:43 +01:00
|
|
|
void SetDefaultPiece();
|
2011-09-07 23:06:51 +02:00
|
|
|
|
|
|
|
protected:
|
|
|
|
PieceInfo* m_PieceInfo;
|
|
|
|
|
|
|
|
// Mouse tracking.
|
|
|
|
int m_Tracking;
|
|
|
|
int m_DownX;
|
|
|
|
int m_DownY;
|
|
|
|
|
|
|
|
// Current camera settings.
|
|
|
|
float m_Distance;
|
|
|
|
float m_RotateX;
|
|
|
|
float m_RotateZ;
|
|
|
|
bool m_AutoZoom;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _PREVIEW_H_
|
|
|
|
|