MCPcopy Create free account
hub / github.com/axmolengine/axmol / update

Method update

tests/cpp-tests/Source/BugsTest/Bug-14327.cpp:79–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79void Bug14327Layer::update(float dt)
80{
81 int32_t delta = _removeTime - time(nullptr);
82 if (delta > 0)
83 {
84 ldiv_t ret = ldiv(delta, 60L);
85 char buf[100];
86 auto infoStr = fmt::format_to_z(buf, "{}{:02d}:{:02d}", "Edit control will be removed after ", ret.quot, ret.rem);
87 _TTFShowTime->setString(infoStr);
88 }
89 else
90 {
91 _edit->removeFromParent();
92 _edit = nullptr;
93 _TTFShowTime->setString("Edit control has been removed!\nIt should not crash.");
94 this->unscheduleUpdate();
95 }
96}
97
98void Bug14327Layer::editBoxEditingDidBegin(ax::ui::EditBox* editBox)
99{

Callers

nothing calls this directly

Calls 4

format_to_zFunction · 0.85
setStringMethod · 0.45
removeFromParentMethod · 0.45
unscheduleUpdateMethod · 0.45

Tested by

no test coverage detected