From c977bc12a320628b0c6b30a935a354ac57b4a287 Mon Sep 17 00:00:00 2001 From: Nomango <569629550@qq.com> Date: Thu, 9 Nov 2017 21:04:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DEFileUtils::getString?= =?UTF-8?q?=E5=87=BD=E6=95=B0=E5=90=8D=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ConsoleDemo/main.cpp | 8 ++++++-- Easy2D/Tool/EFileUtils.cpp | 2 +- Easy2D/etools.h | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ConsoleDemo/main.cpp b/ConsoleDemo/main.cpp index 519cafa3..24e05be8 100644 --- a/ConsoleDemo/main.cpp +++ b/ConsoleDemo/main.cpp @@ -31,20 +31,24 @@ public: }); this->add(button);*/ auto sprite = new ESprite(L"test2.png"); - sprite->setPivot(-1, 0); sprite->setPos(EApp::getWidth() / 2, EApp::getHeight() / 2); this->add(sprite); sprite->runAction(new EActionLoop(new EActionRotateBy(1, 60))); } }; - +#include int main() { EApp app; if (app.init(L"Easy2D Demo", 640, 480)) { + app.showConsole(); + for (int i = 0; i < 20; i++) + { + std::cout << ERandom::between(1, 3) << std::endl; + } ENode::setDefaultPiovt(0.5f, 0.5f); auto scene = new Scene(); diff --git a/Easy2D/Tool/EFileUtils.cpp b/Easy2D/Tool/EFileUtils.cpp index 94a573bd..acea04dc 100644 --- a/Easy2D/Tool/EFileUtils.cpp +++ b/Easy2D/Tool/EFileUtils.cpp @@ -93,7 +93,7 @@ float e2d::EFileUtils::getFloat(const EString & key, float default) return std::stof(temp); } -e2d::EString e2d::EFileUtils::geTString(const EString & key, const EString & default) +e2d::EString e2d::EFileUtils::getString(const EString & key, const EString & default) { TCHAR temp[256] = { 0 }; ::GetPrivateProfileString(L"Default", key.c_str(), default.c_str(), temp, 255, getDefaultSavePath().c_str()); diff --git a/Easy2D/etools.h b/Easy2D/etools.h index 51e904e1..198d1c88 100644 --- a/Easy2D/etools.h +++ b/Easy2D/etools.h @@ -142,7 +142,7 @@ public: ); // 获取 字符串 型的值(若不存在则返回 default 参数的值) - static EString geTString( + static EString getString( const EString & key, const EString & default );