fix: minor fixes

This commit is contained in:
Nomango 2018-10-18 13:38:31 +08:00
parent b42c977aab
commit 05849422a4
4 changed files with 153 additions and 151 deletions

View File

@ -99,7 +99,7 @@ namespace easy2d
float pivot_y float pivot_y
) override; ) override;
protected: private:
E2D_DISABLE_COPY(Button); E2D_DISABLE_COPY(Button);
// 按钮状态枚举 // 按钮状态枚举
@ -122,7 +122,7 @@ namespace easy2d
// 遍历节点 // 遍历节点
virtual void Visit() override; virtual void Visit() override;
protected: private:
Node * normal_; Node * normal_;
Node * mouseover_; Node * mouseover_;
Node * selected_; Node * selected_;
@ -169,10 +169,10 @@ namespace easy2d
// 获取所有按钮 // 获取所有按钮
const std::vector<Button*>& GetAllButtons() const; const std::vector<Button*>& GetAllButtons() const;
protected: private:
E2D_DISABLE_COPY(Menu); E2D_DISABLE_COPY(Menu);
protected: private:
bool enabled_; bool enabled_;
std::vector<Button*> buttons_; std::vector<Button*> buttons_;
}; };

View File

@ -27,25 +27,6 @@
namespace easy2d namespace easy2d
{ {
// 方向
enum class Direction : int
{
Up, /* 上 */
Down, /* 下 */
Left, /* 左 */
Right /* 右 */
};
// 线条相交样式
enum class Stroke : int
{
Miter = 0, /* 斜切 */
Bevel = 1, /* 斜角 */
Round = 2 /* 圆角 */
};
class Size; class Size;
// 坐标 // 坐标
@ -395,7 +376,7 @@ namespace easy2d
WhiteSmoke = 0xF5F5F5, WhiteSmoke = 0xF5F5F5,
Wood = 0xDEB887, Wood = 0xDEB887,
Yellow = 0xFFFF00, Yellow = 0xFFFF00,
Yellow_Green = 0x9ACD32 YellowGreen = 0x9ACD32
}; };
public: public:
@ -406,6 +387,25 @@ namespace easy2d
}; };
// 方向
enum class Direction : int
{
Up, /* 上 */
Down, /* 下 */
Left, /* 左 */
Right /* 右 */
};
// 线条相交样式
enum class Stroke : int
{
Miter = 0, /* 斜切 */
Bevel = 1, /* 斜角 */
Round = 2 /* 圆角 */
};
// 键盘键值 // 键盘键值
enum class KeyCode : int enum class KeyCode : int
{ {

View File

@ -29,7 +29,9 @@
# error 仅能在 C++ 环境下使用 Easy2D # error 仅能在 C++ 环境下使用 Easy2D
#endif #endif
#if _MSC_VER < 1700 #ifndef _MSC_VER
# error 仅支持在 MSVC 环境下编译
#elif _MSC_VER < 1700
# error Easy2D 不支持 Visual Studio 2012 以下版本 # error Easy2D 不支持 Visual Studio 2012 以下版本
#endif #endif