1 Star 0 Fork 0

tectim/engine-sim

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
engine_view.h 854 Bytes
一键复制 编辑 原始数据 按行查看 历史
Ange Yaghi 提交于 2022-07-25 14:24 +08:00 . Updated game engine version
#ifndef ATG_ENGINE_SIM_ENGINE_VIEW_H
#define ATG_ENGINE_SIM_ENGINE_VIEW_H
#include "ui_element.h"
class EngineView : public UiElement {
public:
EngineView();
virtual ~EngineView();
virtual void update(float dt);
virtual void render();
virtual void onMouseDown(const Point &mouseLocal);
virtual void onDrag(const Point &p0, const Point &mouse0, const Point &mouse);
virtual void onMouseScroll(int scroll);
void setDrawFrame(bool drawFrame) { m_drawFrame = drawFrame; }
void setBounds(const Bounds &bounds);
Point getCenter() const;
Point getCameraPosition() const;
float m_zoom;
protected:
Point m_pan;
Point m_dragStart;
int m_lastScroll;
bool m_drawFrame;
};
#endif /* ATG_ENGINE_SIM_ENGINE_VIEW_H */
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/tectim/engine-sim.git
git@gitee.com:tectim/engine-sim.git
tectim
engine-sim
engine-sim
master

搜索帮助