修复单词拼写错误
This commit is contained in:
parent
c8771231b4
commit
c0acf3a56c
|
|
@ -67,8 +67,7 @@ bool e2d::Renderer::__createDeviceResources()
|
|||
{
|
||||
HWND hWnd = Window::getInstance()->getHWnd();
|
||||
|
||||
// 创建设备相关资源。这些资源应在 Direct3D 设备消失时重建,
|
||||
// 比如当 isVisiable 被修改,等等
|
||||
// 创建设备相关资源。这些资源应在 Direct3D 设备消失时重建
|
||||
RECT rc;
|
||||
GetClientRect(hWnd, &rc);
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#include "..\e2dnode.h"
|
||||
|
||||
e2d::Collider::Collider()
|
||||
: _visiable(true)
|
||||
: _visible(true)
|
||||
, _color(Color::Red, 0.7)
|
||||
, _parentNode(nullptr)
|
||||
, _transformed(nullptr)
|
||||
|
|
@ -44,9 +44,9 @@ void e2d::Collider::setEnabled(bool enabled)
|
|||
_enabled = enabled;
|
||||
}
|
||||
|
||||
void e2d::Collider::setVisiable(bool bVisiable)
|
||||
void e2d::Collider::setVisible(bool visible)
|
||||
{
|
||||
_visiable = bVisiable;
|
||||
_visible = visible;
|
||||
}
|
||||
|
||||
void e2d::Collider::setColor(Color color)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ e2d::Config::Config()
|
|||
, _nodeDefPivot()
|
||||
, _soundEnabled(true)
|
||||
, _collisionEnabled(false)
|
||||
, _colliderVisiable(false)
|
||||
, _colliderVisible(false)
|
||||
, _nodeDefColliderType(Collider::Type::None)
|
||||
, _unconfigured(true)
|
||||
{
|
||||
|
|
@ -48,9 +48,9 @@ void e2d::Config::setDefaultColliderType(Collider::Type type)
|
|||
_nodeDefColliderType = type;
|
||||
}
|
||||
|
||||
void e2d::Config::setColliderVisiable(bool visiable)
|
||||
void e2d::Config::setColliderVisible(bool visible)
|
||||
{
|
||||
_colliderVisiable = visiable;
|
||||
_colliderVisible = visible;
|
||||
}
|
||||
|
||||
e2d::String e2d::Config::getGameName() const
|
||||
|
|
@ -78,9 +78,9 @@ e2d::Collider::Type e2d::Config::getDefaultColliderType() const
|
|||
return _nodeDefColliderType;
|
||||
}
|
||||
|
||||
bool e2d::Config::isColliderVisiable() const
|
||||
bool e2d::Config::isColliderVisible() const
|
||||
{
|
||||
return _colliderVisiable;
|
||||
return _colliderVisible;
|
||||
}
|
||||
|
||||
void e2d::Config::_update()
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ void e2d::Scene::_render()
|
|||
{
|
||||
_root->_render();
|
||||
|
||||
if (Game::getInstance()->getConfig().isColliderVisiable())
|
||||
if (Game::getInstance()->getConfig().isColliderVisible())
|
||||
{
|
||||
// 恢复矩阵转换
|
||||
Renderer::getInstance()->getRenderTarget()->SetTransform(D2D1::Matrix3x2F::Identity());
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ void e2d::Button::setNormal(Node * normal)
|
|||
}
|
||||
_normal = normal;
|
||||
|
||||
_updateVisiable();
|
||||
_updateVisible();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -119,7 +119,7 @@ void e2d::Button::setMouseOver(Node * mouseover)
|
|||
this->addChild(mouseover);
|
||||
}
|
||||
_mouseover = mouseover;
|
||||
_updateVisiable();
|
||||
_updateVisible();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -138,7 +138,7 @@ void e2d::Button::setSelected(Node * selected)
|
|||
this->addChild(selected);
|
||||
}
|
||||
_selected = selected;
|
||||
_updateVisiable();
|
||||
_updateVisible();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -157,7 +157,7 @@ void e2d::Button::setDisabled(Node * disabled)
|
|||
this->addChild(disabled);
|
||||
}
|
||||
_disabled = disabled;
|
||||
_updateVisiable();
|
||||
_updateVisible();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -166,7 +166,7 @@ void e2d::Button::setEnabled(bool enabled)
|
|||
if (_enabled != enabled)
|
||||
{
|
||||
_enabled = enabled;
|
||||
_updateVisiable();
|
||||
_updateVisible();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -183,7 +183,7 @@ void e2d::Button::_fixedUpdate()
|
|||
auto input = Input::getInstance();
|
||||
auto window = Window::getInstance();
|
||||
|
||||
if (_enabled && _visiable && _normal)
|
||||
if (_enabled && _visible && _normal)
|
||||
{
|
||||
if (input->isRelease(Input::Mouse::Left))
|
||||
{
|
||||
|
|
@ -226,7 +226,7 @@ void e2d::Button::_fixedUpdate()
|
|||
_setState(ButtonState::Normal);
|
||||
}
|
||||
|
||||
if (_visiable && !_enabled && _normal && _normal->containsPoint(input->getMousePos()))
|
||||
if (_visible && !_enabled && _normal && _normal->containsPoint(input->getMousePos()))
|
||||
{
|
||||
window->setCursor(Window::Cursor::No);
|
||||
}
|
||||
|
|
@ -237,41 +237,41 @@ void e2d::Button::_setState(ButtonState state)
|
|||
if (_state != state)
|
||||
{
|
||||
_state = state;
|
||||
_updateVisiable();
|
||||
_updateVisible();
|
||||
}
|
||||
}
|
||||
|
||||
void e2d::Button::_updateVisiable()
|
||||
void e2d::Button::_updateVisible()
|
||||
{
|
||||
SAFE_SET(_normal, setVisiable, false);
|
||||
SAFE_SET(_mouseover, setVisiable, false);
|
||||
SAFE_SET(_selected, setVisiable, false);
|
||||
SAFE_SET(_disabled, setVisiable, false);
|
||||
SAFE_SET(_normal, setVisible, false);
|
||||
SAFE_SET(_mouseover, setVisible, false);
|
||||
SAFE_SET(_selected, setVisible, false);
|
||||
SAFE_SET(_disabled, setVisible, false);
|
||||
|
||||
if (_enabled)
|
||||
{
|
||||
if (_state == ButtonState::Selected && _selected)
|
||||
{
|
||||
_selected->setVisiable(true);
|
||||
_selected->setVisible(true);
|
||||
}
|
||||
else if (_state == ButtonState::Mouseover && _mouseover)
|
||||
{
|
||||
_mouseover->setVisiable(true);
|
||||
_mouseover->setVisible(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_normal) _normal->setVisiable(true);
|
||||
if (_normal) _normal->setVisible(true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_disabled)
|
||||
{
|
||||
_disabled->setVisiable(true);
|
||||
_disabled->setVisible(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_normal) _normal->setVisiable(true);
|
||||
if (_normal) _normal->setVisible(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ e2d::Node::Node()
|
|||
, _pivotY(0.f)
|
||||
, _initialMatri(D2D1::Matrix3x2F::Identity())
|
||||
, _finalMatri(D2D1::Matrix3x2F::Identity())
|
||||
, _visiable(true)
|
||||
, _visible(true)
|
||||
, _collider(nullptr)
|
||||
, _parent(nullptr)
|
||||
, _parentScene(nullptr)
|
||||
|
|
@ -100,7 +100,7 @@ void e2d::Node::_update()
|
|||
|
||||
void e2d::Node::_render()
|
||||
{
|
||||
if (!_visiable)
|
||||
if (!_visible)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -150,7 +150,7 @@ void e2d::Node::_render()
|
|||
void e2d::Node::_drawCollider()
|
||||
{
|
||||
// »æÖÆ×ÔÉíµÄ¼¸ºÎÅöײÌå
|
||||
if (_collider && _collider->_visiable)
|
||||
if (_collider && _collider->_visible)
|
||||
{
|
||||
_collider->_render();
|
||||
}
|
||||
|
|
@ -235,9 +235,9 @@ void e2d::Node::_updateOpacity()
|
|||
}
|
||||
}
|
||||
|
||||
bool e2d::Node::isVisiable() const
|
||||
bool e2d::Node::isVisible() const
|
||||
{
|
||||
return _visiable;
|
||||
return _visible;
|
||||
}
|
||||
|
||||
e2d::String e2d::Node::getName() const
|
||||
|
|
@ -338,7 +338,7 @@ double e2d::Node::getOpacity() const
|
|||
e2d::Node::Property e2d::Node::getProperty() const
|
||||
{
|
||||
Property prop;
|
||||
prop.visable = _visiable;
|
||||
prop.visible = _visible;
|
||||
prop.posX = _posX;
|
||||
prop.posY = _posY;
|
||||
prop.width = _width;
|
||||
|
|
@ -534,7 +534,7 @@ void e2d::Node::setSize(Size size)
|
|||
|
||||
void e2d::Node::setProperty(Property prop)
|
||||
{
|
||||
this->setVisiable(prop.visable);
|
||||
this->setVisible(prop.visible);
|
||||
this->setPos(prop.posX, prop.posY);
|
||||
this->setSize(prop.width, prop.height);
|
||||
this->setOpacity(prop.opacity);
|
||||
|
|
@ -925,9 +925,9 @@ void e2d::Node::stopAllActions()
|
|||
ActionManager::getInstance()->stopAllBindedWith(this);
|
||||
}
|
||||
|
||||
void e2d::Node::setVisiable(bool value)
|
||||
void e2d::Node::setVisible(bool value)
|
||||
{
|
||||
_visiable = value;
|
||||
_visible = value;
|
||||
}
|
||||
|
||||
void e2d::Node::setName(const String& name)
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ void e2d::ToggleButton::setState(bool bState)
|
|||
{
|
||||
_toggle = bState;
|
||||
_updateState();
|
||||
_updateVisiable();
|
||||
_updateVisible();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -107,7 +107,7 @@ void e2d::ToggleButton::setNormal(Node * normal)
|
|||
_normal = normal;
|
||||
|
||||
_updateState();
|
||||
_updateVisiable();
|
||||
_updateVisible();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -128,7 +128,7 @@ void e2d::ToggleButton::setMouseOver(Node * mouseover)
|
|||
_mouseover = mouseover;
|
||||
|
||||
_updateState();
|
||||
_updateVisiable();
|
||||
_updateVisible();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -149,7 +149,7 @@ void e2d::ToggleButton::setSelected(Node * selected)
|
|||
_selected = selected;
|
||||
|
||||
_updateState();
|
||||
_updateVisiable();
|
||||
_updateVisible();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -170,7 +170,7 @@ void e2d::ToggleButton::setDisabled(Node * disabled)
|
|||
_disabled = disabled;
|
||||
|
||||
_updateState();
|
||||
_updateVisiable();
|
||||
_updateVisible();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -191,7 +191,7 @@ void e2d::ToggleButton::setNormalOff(Node * normal)
|
|||
_normalOff = normal;
|
||||
|
||||
_updateState();
|
||||
_updateVisiable();
|
||||
_updateVisible();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -212,7 +212,7 @@ void e2d::ToggleButton::setMouseOverOff(Node * mouseover)
|
|||
_mouseoverOff = mouseover;
|
||||
|
||||
_updateState();
|
||||
_updateVisiable();
|
||||
_updateVisible();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -233,7 +233,7 @@ void e2d::ToggleButton::setSelectedOff(Node * selected)
|
|||
_selectedOff = selected;
|
||||
|
||||
_updateState();
|
||||
_updateVisiable();
|
||||
_updateVisible();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -254,7 +254,7 @@ void e2d::ToggleButton::setDisabledOff(Node * disabled)
|
|||
_disabledOff = disabled;
|
||||
|
||||
_updateState();
|
||||
_updateVisiable();
|
||||
_updateVisible();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -267,10 +267,10 @@ void e2d::ToggleButton::_updateState()
|
|||
_selected = _selected;
|
||||
_disabled = _disabled;
|
||||
|
||||
if (_normalOff) _normalOff->setVisiable(false);
|
||||
if (_mouseoverOff) _mouseoverOff->setVisiable(false);
|
||||
if (_selectedOff) _selectedOff->setVisiable(false);
|
||||
if (_disabledOff) _disabledOff->setVisiable(false);
|
||||
if (_normalOff) _normalOff->setVisible(false);
|
||||
if (_mouseoverOff) _mouseoverOff->setVisible(false);
|
||||
if (_selectedOff) _selectedOff->setVisible(false);
|
||||
if (_disabledOff) _disabledOff->setVisible(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -279,10 +279,10 @@ void e2d::ToggleButton::_updateState()
|
|||
_selected = _selectedOff;
|
||||
_disabled = _disabledOff;
|
||||
|
||||
if (_normal) _normal->setVisiable(false);
|
||||
if (_mouseover) _mouseover->setVisiable(false);
|
||||
if (_selected) _selected->setVisiable(false);
|
||||
if (_disabled) _disabled->setVisiable(false);
|
||||
if (_normal) _normal->setVisible(false);
|
||||
if (_mouseover) _mouseover->setVisible(false);
|
||||
if (_selected) _selected->setVisible(false);
|
||||
if (_disabled) _disabled->setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -682,8 +682,8 @@ public:
|
|||
);
|
||||
|
||||
// 设置碰撞体的可见性
|
||||
void setVisiable(
|
||||
bool bVisiable
|
||||
void setVisible(
|
||||
bool visible
|
||||
);
|
||||
|
||||
// 设置绘制颜色
|
||||
|
|
@ -722,7 +722,7 @@ protected:
|
|||
|
||||
protected:
|
||||
bool _enabled;
|
||||
bool _visiable;
|
||||
bool _visible;
|
||||
Color _color;
|
||||
Node * _parentNode;
|
||||
Type _type;
|
||||
|
|
@ -775,8 +775,8 @@ public:
|
|||
|
||||
// 打开或关闭碰撞体可视化
|
||||
// 默认:关闭
|
||||
void setColliderVisiable(
|
||||
bool visiable
|
||||
void setColliderVisible(
|
||||
bool visible
|
||||
);
|
||||
|
||||
// 获取游戏名称
|
||||
|
|
@ -795,7 +795,7 @@ public:
|
|||
Collider::Type getDefaultColliderType() const;
|
||||
|
||||
// 获取碰撞体可视化状态
|
||||
bool isColliderVisiable() const;
|
||||
bool isColliderVisible() const;
|
||||
|
||||
protected:
|
||||
virtual void _update();
|
||||
|
|
@ -804,7 +804,7 @@ protected:
|
|||
bool _unconfigured;
|
||||
bool _soundEnabled;
|
||||
bool _collisionEnabled;
|
||||
bool _colliderVisiable;
|
||||
bool _colliderVisible;
|
||||
String _gameName;
|
||||
Point _nodeDefPivot;
|
||||
Collider::Type _nodeDefColliderType;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ public:
|
|||
// 节点属性
|
||||
struct Property
|
||||
{
|
||||
bool visable; // 可见性
|
||||
bool visible; // 可见性
|
||||
double posX; // X 坐标
|
||||
double posY; // Y 坐标
|
||||
double width; // 宽度
|
||||
|
|
@ -46,7 +46,7 @@ public:
|
|||
virtual void onRender() {}
|
||||
|
||||
// 获取节点显示状态
|
||||
virtual bool isVisiable() const;
|
||||
virtual bool isVisible() const;
|
||||
|
||||
// 判断点是否在节点内
|
||||
virtual bool containsPoint(
|
||||
|
|
@ -163,7 +163,7 @@ public:
|
|||
virtual void clearAllChildren();
|
||||
|
||||
// 设置节点是否显示
|
||||
virtual void setVisiable(
|
||||
virtual void setVisible(
|
||||
bool value
|
||||
);
|
||||
|
||||
|
|
@ -421,7 +421,7 @@ protected:
|
|||
float _pivotX;
|
||||
float _pivotY;
|
||||
int _nOrder;
|
||||
bool _visiable;
|
||||
bool _visible;
|
||||
bool _autoUpdate;
|
||||
bool _needSort;
|
||||
bool _needTransform;
|
||||
|
|
@ -788,7 +788,7 @@ protected:
|
|||
virtual void _setState(ButtonState state);
|
||||
|
||||
// 刷新按钮显示
|
||||
virtual void _updateVisiable();
|
||||
virtual void _updateVisible();
|
||||
|
||||
// 更新按钮状态
|
||||
virtual void _fixedUpdate() override;
|
||||
|
|
|
|||
Loading…
Reference in New Issue