Skip to content

Commit

Permalink
(Spelling) rename getSubtitleLable(), add setSubtitleLabel() (axmolen…
Browse files Browse the repository at this point in the history
…gine#2025)

* rename getSubtitleLable(), add setSubtitleLabel()

* Update PhysicsTest.cpp
  • Loading branch information
aismann authored Jul 11, 2024
1 parent fe0adcb commit fe0b243
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tests/cpp-tests/Source/BaseTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ class TestCase : public ax::Scene
*/
void setTestCaseName(std::string_view name) { _testCaseName = name; }
std::string getTestCaseName() const { return _testCaseName; }

const ax::Label* getSubtitleLable() const { return _subtitleLabel; }
const ax::Label* getSubtitleLabel() const { return _subtitleLabel; }
void setSubtitleLabel(std::string_view title) { _subtitleLabel->setString(title); }
const ax::MenuItemImage* getRestartTestItem() const { return _restartTestItem; }

virtual void onEnter() override;
Expand Down
8 changes: 4 additions & 4 deletions tests/cpp-tests/Source/PhysicsTest/PhysicsTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1311,8 +1311,8 @@ void PhysicsContactTest::onEnter()
decrease1->setTag(1);
increase1->setTag(1);

float prevMenuPos = getSubtitleLable()->getPosition().y - getSubtitleLable()->getContentSize().height;
float menuStep = (getSubtitleLable()->getPosition().y - getRestartTestItem()->getPosition().y) * 0.25f;
float prevMenuPos = getSubtitleLabel()->getPosition().y - getSubtitleLabel()->getContentSize().height;
float menuStep = (getSubtitleLabel()->getPosition().y - getRestartTestItem()->getPosition().y) * 0.25f;
auto menu1 = Menu::create(decrease1, increase1, nullptr);
menu1->alignItemsHorizontally();
menu1->setPosition(Vec2(s.width / 2, prevMenuPos));
Expand Down Expand Up @@ -1433,8 +1433,8 @@ void PhysicsContactTest::resetTest()
this->addChild(root);

auto s = VisibleRect::getVisibleRect().size;
float prevMenuPos = getSubtitleLable()->getPosition().y - getSubtitleLable()->getContentSize().height;
float menuStep = (getSubtitleLable()->getPosition().y - getRestartTestItem()->getPosition().y) * 0.25f;
float prevMenuPos = getSubtitleLabel()->getPosition().y - getSubtitleLabel()->getContentSize().height;
float menuStep = (getSubtitleLabel()->getPosition().y - getRestartTestItem()->getPosition().y) * 0.25f;
std::string strNum;
char buffer[10];

Expand Down

0 comments on commit fe0b243

Please sign in to comment.