enum命名改为大驼峰式

This commit is contained in:
Nomango 2018-05-24 20:37:34 +08:00
parent 1eca4fbdf5
commit 2058dfaa7d
15 changed files with 166 additions and 173 deletions

View File

@ -194,23 +194,23 @@ void e2d::Window::setCursor(Cursor cursor)
LPCWSTR pCursorName = nullptr; LPCWSTR pCursorName = nullptr;
switch (cursor) switch (cursor)
{ {
case Cursor::NORMAL: case Cursor::Normal:
pCursorName = IDC_ARROW; pCursorName = IDC_ARROW;
break; break;
case Cursor::HAND: case Cursor::Hand:
pCursorName = IDC_HAND; pCursorName = IDC_HAND;
break; break;
case Cursor::NO: case Cursor::No:
pCursorName = IDC_NO; pCursorName = IDC_NO;
break; break;
case Cursor::WAIT: case Cursor::Wait:
pCursorName = IDC_WAIT; pCursorName = IDC_WAIT;
break; break;
case Cursor::ARROW_WAIT: case Cursor::ArrowWait:
pCursorName = IDC_APPSTARTING; pCursorName = IDC_APPSTARTING;
break; break;

View File

@ -4,7 +4,7 @@
e2d::Collider::Collider() e2d::Collider::Collider()
: _visiable(true) : _visiable(true)
, _color(Color::RED, 0.7f) , _color(Color::Red, 0.7)
, _parentNode(nullptr) , _parentNode(nullptr)
, _transformed(nullptr) , _transformed(nullptr)
, _enable(true) , _enable(true)
@ -77,7 +77,7 @@ e2d::Collider::Relation e2d::Collider::getRelationWith(Collider * pCollider) con
return Relation(relation); return Relation(relation);
} }
} }
return Relation::UNKNOWN; return Relation::Unknown;
} }
void e2d::Collider::_transform() void e2d::Collider::_transform()

View File

@ -3,7 +3,7 @@
e2d::Font::Font() e2d::Font::Font()
: family("") : family("")
, size(22) , size(22)
, weight(Font::Weight::NORMAL) , weight(Font::Weight::Normal)
, italic(false) , italic(false)
{ {
} }

View File

@ -39,7 +39,7 @@ void e2d::ColliderManager::__updateCollider(e2d::Collider * pActiveCollider)
// 判断两碰撞体交集情况 // 判断两碰撞体交集情况
Collider::Relation relation = pActiveCollider->getRelationWith(pPassiveCollider); Collider::Relation relation = pActiveCollider->getRelationWith(pPassiveCollider);
// 忽略 UNKNOWN 和 DISJOIN 情况 // 忽略 UNKNOWN 和 DISJOIN 情况
if (relation != Collider::Relation::UNKNOWN && relation != Collider::Relation::DISJOIN) if (relation != Collider::Relation::Unknown && relation != Collider::Relation::Disjoin)
{ {
// 更新碰撞监听器 // 更新碰撞监听器
Collision::__update(pActiveNode, pPassiveNode); Collision::__update(pActiveNode, pPassiveNode);

View File

@ -6,7 +6,7 @@
e2d::Button::Button() e2d::Button::Button()
: _func(nullptr) : _func(nullptr)
, _state(ButtonState::NORMAL) , _state(ButtonState::Normal)
, _enable(true) , _enable(true)
, _isSelected(false) , _isSelected(false)
, _normal(nullptr) , _normal(nullptr)
@ -18,7 +18,7 @@ e2d::Button::Button()
e2d::Button::Button(Node * normal, const Function& func) e2d::Button::Button(Node * normal, const Function& func)
: _func(nullptr) : _func(nullptr)
, _state(ButtonState::NORMAL) , _state(ButtonState::Normal)
, _enable(true) , _enable(true)
, _isSelected(false) , _isSelected(false)
, _normal(nullptr) , _normal(nullptr)
@ -32,7 +32,7 @@ e2d::Button::Button(Node * normal, const Function& func)
e2d::Button::Button(Node * normal, Node * selected, const Function& func) e2d::Button::Button(Node * normal, Node * selected, const Function& func)
: _func(nullptr) : _func(nullptr)
, _state(ButtonState::NORMAL) , _state(ButtonState::Normal)
, _enable(true) , _enable(true)
, _isSelected(false) , _isSelected(false)
, _normal(nullptr) , _normal(nullptr)
@ -47,7 +47,7 @@ e2d::Button::Button(Node * normal, Node * selected, const Function& func)
e2d::Button::Button(Node * normal, Node * mouseover, Node * selected, const Function& func) e2d::Button::Button(Node * normal, Node * mouseover, Node * selected, const Function& func)
: _func(nullptr) : _func(nullptr)
, _state(ButtonState::NORMAL) , _state(ButtonState::Normal)
, _enable(true) , _enable(true)
, _isSelected(false) , _isSelected(false)
, _normal(nullptr) , _normal(nullptr)
@ -63,7 +63,7 @@ e2d::Button::Button(Node * normal, Node * mouseover, Node * selected, const Func
e2d::Button::Button(Node * normal, Node * mouseover, Node * selected, Node * disabled, const Function& func) e2d::Button::Button(Node * normal, Node * mouseover, Node * selected, Node * disabled, const Function& func)
: _func(nullptr) : _func(nullptr)
, _state(ButtonState::NORMAL) , _state(ButtonState::Normal)
, _enable(true) , _enable(true)
, _isSelected(false) , _isSelected(false)
, _normal(nullptr) , _normal(nullptr)
@ -184,7 +184,7 @@ void e2d::Button::_fixedUpdate()
if (_enable && _visiable && _normal) if (_enable && _visiable && _normal)
{ {
if (Input::isRelease(Input::Mouse::LEFT)) if (Input::isRelease(Input::Mouse::Left))
{ {
// 鼠标左键抬起时,判断鼠标坐标是否在按钮内部 // 鼠标左键抬起时,判断鼠标坐标是否在按钮内部
if (_isSelected && if (_isSelected &&
@ -196,7 +196,7 @@ void e2d::Button::_fixedUpdate()
_isSelected = false; _isSelected = false;
} }
if (Input::isPress(Input::Mouse::LEFT)) if (Input::isPress(Input::Mouse::Left))
{ {
if (_normal->containsPoint(Input::getMousePos())) if (_normal->containsPoint(Input::getMousePos()))
{ {
@ -206,28 +206,28 @@ void e2d::Button::_fixedUpdate()
} }
} }
if (_isSelected && Input::isDown(Input::Mouse::LEFT)) if (_isSelected && Input::isDown(Input::Mouse::Left))
{ {
if (_normal->containsPoint(Input::getMousePos())) if (_normal->containsPoint(Input::getMousePos()))
{ {
_setState(ButtonState::SELECTED); _setState(ButtonState::Selected);
Window::setCursor(Window::Cursor::HAND); Window::setCursor(Window::Cursor::Hand);
return; return;
} }
} }
else if (_normal->containsPoint(Input::getMousePos())) else if (_normal->containsPoint(Input::getMousePos()))
{ {
_setState(ButtonState::MOUSEOVER); _setState(ButtonState::Mouseover);
Window::setCursor(Window::Cursor::HAND); Window::setCursor(Window::Cursor::Hand);
return; return;
} }
_setState(ButtonState::NORMAL); _setState(ButtonState::Normal);
} }
if (_visiable && !_enable && _normal && _normal->containsPoint(Input::getMousePos())) if (_visiable && !_enable && _normal && _normal->containsPoint(Input::getMousePos()))
{ {
Window::setCursor(Window::Cursor::NO); Window::setCursor(Window::Cursor::No);
} }
} }
@ -249,11 +249,11 @@ void e2d::Button::_updateVisiable()
if (_enable) if (_enable)
{ {
if (_state == ButtonState::SELECTED && _selected) if (_state == ButtonState::Selected && _selected)
{ {
_selected->setVisiable(true); _selected->setVisiable(true);
} }
else if (_state == ButtonState::MOUSEOVER && _mouseover) else if (_state == ButtonState::Mouseover && _mouseover)
{ {
_mouseover->setVisiable(true); _mouseover->setVisiable(true);
} }

View File

@ -6,7 +6,7 @@
// ĬÈÏÖÐÐĵãλÖà // ĬÈÏÖÐÐĵãλÖÃ
static float s_fDefaultPiovtX = 0; static float s_fDefaultPiovtX = 0;
static float s_fDefaultPiovtY = 0; static float s_fDefaultPiovtY = 0;
static e2d::Collider::Type s_fDefaultColliderType = e2d::Collider::Type::NONE; static e2d::Collider::Type s_fDefaultColliderType = e2d::Collider::Type::None;
e2d::Node::Node() e2d::Node::Node()
: _nOrder(0) : _nOrder(0)
@ -35,7 +35,7 @@ e2d::Node::Node()
, _autoUpdate(true) , _autoUpdate(true)
, _positionFixed(false) , _positionFixed(false)
{ {
if (s_fDefaultColliderType != Collider::Type::NONE) if (s_fDefaultColliderType != Collider::Type::None)
{ {
this->setCollider(s_fDefaultColliderType); this->setCollider(s_fDefaultColliderType);
} }
@ -542,25 +542,25 @@ void e2d::Node::setCollider(Collider::Type type)
{ {
switch (type) switch (type)
{ {
case Collider::Type::RECT: case Collider::Type::Rect:
{ {
this->setCollider(GC::create<RectCollider>(this)); this->setCollider(GC::create<RectCollider>(this));
break; break;
} }
case Collider::Type::CIRCLE: case Collider::Type::Circle:
{ {
this->setCollider(GC::create<CircleCollider>(this)); this->setCollider(GC::create<CircleCollider>(this));
break; break;
} }
case Collider::Type::ELLIPSE: case Collider::Type::Ellipse:
{ {
this->setCollider(GC::create<EllipseCollider>(this)); this->setCollider(GC::create<EllipseCollider>(this));
break; break;
} }
case Collider::Type::NONE: case Collider::Type::None:
{ {
this->setCollider(nullptr); this->setCollider(nullptr);
break; break;
@ -869,8 +869,8 @@ bool e2d::Node::intersects(Node * node) const
if (this->_collider && node->_collider) if (this->_collider && node->_collider)
{ {
Collider::Relation relation = this->_collider->getRelationWith(node->_collider); Collider::Relation relation = this->_collider->getRelationWith(node->_collider);
if ((relation != Collider::Relation::UNKNOWN) && if ((relation != Collider::Relation::Unknown) &&
(relation != Collider::Relation::DISJOIN)) (relation != Collider::Relation::Disjoin))
{ {
return true; return true;
} }

View File

@ -1,7 +1,7 @@
#include "..\..\e2dshape.h" #include "..\..\e2dshape.h"
e2d::Shape::Shape() e2d::Shape::Shape()
: _style(Style::SOLID) : _style(Style::Solid)
, _fillColor(0x6090A0U) , _fillColor(0x6090A0U)
, _lineColor(0x78B7D0U) , _lineColor(0x78B7D0U)
, _strokeWidth(2) , _strokeWidth(2)
@ -20,7 +20,7 @@ void e2d::Shape::onRender()
switch (_style) switch (_style)
{ {
case Style::FILL: case Style::Fill:
{ {
pBrush->SetColor(_fillColor.toD2DColorF()); pBrush->SetColor(_fillColor.toD2DColorF());
this->_renderFill(); this->_renderFill();
@ -30,14 +30,14 @@ void e2d::Shape::onRender()
break; break;
} }
case Style::ROUND: case Style::Round:
{ {
pBrush->SetColor(_lineColor.toD2DColorF()); pBrush->SetColor(_lineColor.toD2DColorF());
this->_renderLine(); this->_renderLine();
break; break;
} }
case Style::SOLID: case Style::Solid:
{ {
pBrush->SetColor(_fillColor.toD2DColorF()); pBrush->SetColor(_fillColor.toD2DColorF());
this->_renderFill(); this->_renderFill();
@ -93,13 +93,13 @@ void e2d::Shape::setLineJoin(LineJoin lineJoin)
{ {
switch (lineJoin) switch (lineJoin)
{ {
case LineJoin::MITER: case LineJoin::Miter:
_strokeStyle = Renderer::getMiterID2D1StrokeStyle(); _strokeStyle = Renderer::getMiterID2D1StrokeStyle();
break; break;
case LineJoin::BEVEL: case LineJoin::Bevel:
_strokeStyle = Renderer::getBevelID2D1StrokeStyle(); _strokeStyle = Renderer::getBevelID2D1StrokeStyle();
break; break;
case LineJoin::ROUND: case LineJoin::Round:
_strokeStyle = Renderer::getRoundID2D1StrokeStyle(); _strokeStyle = Renderer::getRoundID2D1StrokeStyle();
break; break;
default: default:

View File

@ -5,17 +5,17 @@
//------------------------------------------------------- //-------------------------------------------------------
e2d::Text::Style::Style() e2d::Text::Style::Style()
: color(Color::WHITE) : color(Color::White)
, alignment(Align::LEFT) , alignment(Align::Left)
, wrapping(false) , wrapping(false)
, wrappingWidth(0.0) , wrappingWidth(0.0)
, lineSpacing(0.0) , lineSpacing(0.0)
, hasUnderline(false) , hasUnderline(false)
, hasStrikethrough(false) , hasStrikethrough(false)
, hasOutline(true) , hasOutline(true)
, outlineColor(Color(Color::BLACK, 0.5)) , outlineColor(Color(Color::Black, 0.5))
, outlineWidth(1.0) , outlineWidth(1.0)
, outlineJoin(LineJoin::ROUND) , outlineJoin(LineJoin::Round)
{} {}
e2d::Text::Style::Style( e2d::Text::Style::Style(

View File

@ -13,22 +13,22 @@ void e2d::MoveTransition::_init(Scene * prev, Scene * next)
double width = _windowSize.width; double width = _windowSize.width;
double height = _windowSize.height; double height = _windowSize.height;
if (_direction == Direction::UP) if (_direction == Direction::Up)
{ {
_posDelta = Vector(0, -height); _posDelta = Vector(0, -height);
_startPos = Point(0, height); _startPos = Point(0, height);
} }
else if (_direction == Direction::DOWN) else if (_direction == Direction::Down)
{ {
_posDelta = Vector(0, height); _posDelta = Vector(0, height);
_startPos = Point(0, -height); _startPos = Point(0, -height);
} }
else if (_direction == Direction::LEFT) else if (_direction == Direction::Left)
{ {
_posDelta = Vector(-width, 0); _posDelta = Vector(-width, 0);
_startPos = Point(width, 0); _startPos = Point(width, 0);
} }
else if (_direction == Direction::RIGHT) else if (_direction == Direction::Right)
{ {
_posDelta = Vector(width, 0); _posDelta = Vector(width, 0);
_startPos = Point(-width, 0); _startPos = Point(-width, 0);

View File

@ -57,11 +57,11 @@ public:
// 鼠标指针样式 // 鼠标指针样式
enum class Cursor : int enum class Cursor : int
{ {
NORMAL, /* 默认指针样式 */ Normal, /* 默认指针样式 */
HAND, /* 手状指针 */ Hand, /* 手状指针 */
NO, /* 禁止指针 */ No, /* 禁止指针 */
WAIT, /* 沙漏指针 */ Wait, /* 沙漏指针 */
ARROW_WAIT /* 默认指针和小沙漏 */ ArrowWait /* 默认指针和小沙漏 */
}; };
public: public:
@ -103,7 +103,7 @@ public:
// 打开/隐藏控制台 // 打开/隐藏控制台
static void showConsole( static void showConsole(
bool show bool show = true
); );
// 是否允许响应输入法 // 是否允许响应输入法
@ -194,25 +194,22 @@ public:
// 鼠标键值 // 鼠标键值
enum class Mouse : int enum class Mouse : int
{ {
LEFT, /* 鼠标左键 */ Left, /* 鼠标左键 */
RIGHT, /* 鼠标右键 */ Right, /* 鼠标右键 */
MIDDLE /* 鼠标中键 */ Middle /* 鼠标中键 */
}; };
// 键盘键值 // 键盘键值
enum class Key : int enum class Key : int
{ {
UP = 0xC8, Up = 0xC8,
LEFT = 0xCB, Left = 0xCB,
RIGHT = 0xCD, Right = 0xCD,
DOWN = 0xD0, Down = 0xD0,
ENTER = 0x1C, Enter = 0x1C,
SPACE = 0x39, Space = 0x39,
ESC = 0x01, Esc = 0x01,
BACK = 0x0E,
TAB = 0x0F,
PAUSE = 0xC5,
Q = 0x10, Q = 0x10,
W = 0x11, W = 0x11,
E = 0x12, E = 0x12,
@ -239,26 +236,26 @@ public:
B = 0x30, B = 0x30,
N = 0x31, N = 0x31,
M = 0x32, M = 0x32,
NUM1 = 0x02, Num1 = 0x02,
NUM2 = 0x03, Num2 = 0x03,
NUM3 = 0x04, Num3 = 0x04,
NUM4 = 0x05, Num4 = 0x05,
NUM5 = 0x06, Num5 = 0x06,
NUM6 = 0x07, Num6 = 0x07,
NUM7 = 0x08, Num7 = 0x08,
NUM8 = 0x09, Num8 = 0x09,
NUM9 = 0x0A, Num9 = 0x0A,
NUM0 = 0x0B, Num0 = 0x0B,
NUMPAD7 = 0x47, Numpad7 = 0x47,
NUMPAD8 = 0x48, Numpad8 = 0x48,
NUMPAD9 = 0x49, Numpad9 = 0x49,
NUMPAD4 = 0x4B, Numpad4 = 0x4B,
NUMPAD5 = 0x4C, Numpad5 = 0x4C,
NUMPAD6 = 0x4D, Numpad6 = 0x4D,
NUMPAD1 = 0x4F, Numpad1 = 0x4F,
NUMPAD2 = 0x50, Numpad2 = 0x50,
NUMPAD3 = 0x51, Numpad3 = 0x51,
NUMPAD0 = 0x52 Numpad0 = 0x52
}; };
public: public:

View File

@ -130,20 +130,20 @@ public:
// 碰撞体类别 // 碰撞体类别
enum class Type enum class Type
{ {
NONE, /* 无 */ None, /* 无 */
RECT, /* 矩形 */ Rect, /* 矩形 */
CIRCLE, /* 圆形 */ Circle, /* 圆形 */
ELLIPSE /* 椭圆形 */ Ellipse /* 椭圆形 */
}; };
// 碰撞体交集关系 // 碰撞体交集关系
enum class Relation : int enum class Relation : int
{ {
UNKNOWN = 0, /* 关系不确定 */ Unknown = 0, /* 关系不确定 */
DISJOIN = 1, /* 没有交集 */ Disjoin = 1, /* 没有交集 */
IS_CONTAINED = 2, /* 完全被包含 */ IsContained = 2, /* 完全被包含 */
CONTAINS = 3, /* 完全包含 */ Contains = 3, /* 完全包含 */
OVERLAP = 4 /* 部分重叠 */ Overlap = 4 /* 部分重叠 */
}; };
public: public:

View File

@ -8,19 +8,19 @@ namespace e2d
// 方向 // 方向
enum class Direction : int enum class Direction : int
{ {
UP, /* ÉÏ */ Up, /* ÉÏ */
DOWN, /* ÏÂ */ Down, /* ÏÂ */
LEFT, /* ×ó */ Left, /* ×ó */
RIGHT /* ÓÒ */ Right /* ÓÒ */
}; };
// 线条相交样式 // 线条相交样式
enum class LineJoin : int enum class LineJoin : int
{ {
MITER = 0, /* бÇÐ */ Miter = 0, /* бÇÐ */
BEVEL = 1, /* б½Ç */ Bevel = 1, /* б½Ç */
ROUND = 2 /* Ô²½Ç */ Round = 2 /* Ô²½Ç */
}; };
@ -307,58 +307,56 @@ public:
D2D1_COLOR_F toD2DColorF() const; D2D1_COLOR_F toD2DColorF() const;
public: public:
enum RGB_VALUE : UINT enum Value : UINT
{ {
BLACK = 0x000000, Black = 0x000000,
BLUE = 0x0000FF, Blue = 0x0000FF,
BLUE_VIOLET = 0x8A2BE2, BlueViolet = 0x8A2BE2,
BROWN = 0xA52A2A, Brown = 0xA52A2A,
CHOCOLATE = 0xD2691E, Chocolate = 0xD2691E,
DARK_BLUE = 0x00008B, DarkBlue = 0x00008B,
DARK_GRAY = 0xA9A9A9, DarkGray = 0xA9A9A9,
DARK_GREEN = 0x006400, DarkGreen = 0x006400,
DARK_ORANGE = 0xFF8C00, DarkOrange = 0xFF8C00,
DARK_RED = 0x8B0000, DarkRed = 0x8B0000,
DARK_VIOLET = 0x9400D3, DarkViolet = 0x9400D3,
FOREST_GREEN = 0x228B22, ForestGreen = 0x228B22,
GOLD = 0xFFD700, Gold = 0xFFD700,
GRAY = 0x808080, Gray = 0x808080,
GREEN = 0x008000, Green = 0x008000,
GREEN_YELLOW = 0xADFF2F, GreenYellow = 0xADFF2F,
LIGHT_BLUE = 0xADD8E6, LightBlue = 0xADD8E6,
LIGHT_CYAN = 0xE0FFFF, LightCyan = 0xE0FFFF,
LIGHT_GOLDENROD_YELLOW = 0xFAFAD2, LightGreen = 0x90EE90,
LIGHT_GREEN = 0x90EE90, LightGray = 0xD3D3D3,
LIGHT_GRAY = 0xD3D3D3, LightPink = 0xFFB6C1,
LIGHT_PINK = 0xFFB6C1, LightSeaGreen = 0x20B2AA,
LIGHT_SEA_GREEN = 0x20B2AA, LightSkyBlue = 0x87CEFA,
LIGHT_SKY_BLUE = 0x87CEFA, LightYellow = 0xFFFFE0,
LIGHT_SLATE_GRAY = 0x778899, Orange = 0xFFA500,
LIGHT_YELLOW = 0xFFFFE0, OrangeRed = 0xFF4500,
ORANGE = 0xFFA500, Pink = 0xFFC0CB,
ORANGE_RED = 0xFF4500, Purple = 0x800080,
PINK = 0xFFC0CB, Red = 0xFF0000,
PURPLE = 0x800080, Silver = 0xC0C0C0,
RED = 0xFF0000, SkyBlue = 0x87CEEB,
SILVER = 0xC0C0C0, Snow = 0xFFFAFA,
SKY_BLUE = 0x87CEEB, Violet = 0xEE82EE,
SNOW = 0xFFFAFA, Wheat = 0xF5DEB3,
VIOLET = 0xEE82EE, White = 0xFFFFFF,
WHEAT = 0xF5DEB3, WhiteSmoke = 0xF5F5F5,
WHITE = 0xFFFFFF, Wood = 0xDEB887,
WHITE_SMOKE = 0xF5F5F5, Yellow = 0xFFFF00,
WOOD = 0xDEB887, Yellow_Green = 0x9ACD32
YELLOW = 0xFFFF00,
YELLOW_GREEN = 0x9ACD32
}; };
protected: private:
void _init( void _init(
UINT rgb, UINT rgb,
double alpha double alpha
); );
public: private:
float r; float r;
float g; float g;
float b; float b;
@ -414,17 +412,15 @@ public:
// 字体粗细值 // 字体粗细值
enum Weight : UINT enum Weight : UINT
{ {
THIN = 100, Thin = 100,
EXTRA_LIGHT = 200, ExtraLight = 200,
LIGHT = 300, Light = 300,
SEMI_LIGHT = 350, Normal = 400,
NORMAL = 400, Medium = 500,
MEDIUM = 500, Bold = 700,
DEMI_BOLD = 600, ExtraBold = 800,
BOLD = 700, Black = 900,
EXTRA_BOLD = 800, ExtraBlack = 950
BLACK = 900,
EXTRA_BLACK = 950
}; };
public: public:
@ -433,7 +429,7 @@ public:
explicit Font( explicit Font(
const String& family, const String& family,
double size = 22, double size = 22,
UINT weight = Font::Weight::NORMAL, UINT weight = Font::Weight::Normal,
bool italic = false bool italic = false
); );
}; };

View File

@ -535,11 +535,11 @@ class Text :
{ {
public: public:
// 文本对齐方式 // 文本对齐方式
enum class Align : int enum class Align
{ {
LEFT, /* 左对齐 */ Left, /* 左对齐 */
RIGHT, /* 右对齐 */ Right, /* 右对齐 */
CENTER /* 居中对齐 */ Center /* 居中对齐 */
}; };
// 文本样式 // 文本样式
@ -563,16 +563,16 @@ public:
Style( Style(
Color color, Color color,
Align alignment = Align::LEFT, Align alignment = Align::Left,
bool wrapping = false, bool wrapping = false,
double wrappingWidth = 0.0, double wrappingWidth = 0.0,
double lineSpacing = 0.0, double lineSpacing = 0.0,
bool hasUnderline = false, bool hasUnderline = false,
bool hasStrikethrough = false, bool hasStrikethrough = false,
bool hasOutline = true, bool hasOutline = true,
Color outlineColor = Color(Color::BLACK, 0.5), Color outlineColor = Color(Color::Black, 0.5),
double outlineWidth = 1.0, double outlineWidth = 1.0,
LineJoin outlineJoin = LineJoin::ROUND LineJoin outlineJoin = LineJoin::Round
); );
}; };
@ -657,7 +657,7 @@ public:
double size double size
); );
// 设置字体粗细值(默认值为 Text::Font::Weight::NORMAL // 设置字体粗细值(默认值为 Text::Font::Weight::Normal
void setFontWeight( void setFontWeight(
UINT weight UINT weight
); );
@ -687,7 +687,7 @@ public:
double lineSpacing double lineSpacing
); );
// 设置对齐方式(默认为 Align::LEFT // 设置对齐方式(默认为 Align::Left
void setAlignment( void setAlignment(
Align align Align align
); );
@ -811,7 +811,7 @@ public:
protected: protected:
// 按钮状态枚举 // 按钮状态枚举
enum class ButtonState { NORMAL, MOUSEOVER, SELECTED }; enum class ButtonState { Normal, Mouseover, Selected };
// 设置按钮状态 // 设置按钮状态
virtual void _setState(ButtonState state); virtual void _setState(ButtonState state);

View File

@ -13,9 +13,9 @@ public:
// ÐÎ×´Ñùʽ // ÐÎ×´Ñùʽ
enum class Style enum class Style
{ {
SOLID, /* Ìî³ä */ Solid, /* Ìî³ä */
ROUND, /* ÂÖÀª */ Round, /* ÂÖÀª */
FILL, /* ÂÖÀª + Ìî³ä */ Fill, /* ÂÖÀª + Ìî³ä */
}; };
public: public:

View File

@ -135,7 +135,7 @@ class MoveTransition :
public: public:
explicit MoveTransition( explicit MoveTransition(
double moveDuration, /* 场景移动动画持续时长 */ double moveDuration, /* 场景移动动画持续时长 */
Direction direction = Direction::LEFT /* 场景移动方向 */ Direction direction = Direction::Left /* 场景移动方向 */
); );
protected: protected: