------------------------------------------------------------------ NodeNormalizedPositionTest2 ------------------------------------------------------------------
| 1128 | // |
| 1129 | //------------------------------------------------------------------ |
| 1130 | NodeNormalizedPositionTest2::NodeNormalizedPositionTest2() : _accum(0) |
| 1131 | { |
| 1132 | Sprite* sprites[5]; |
| 1133 | Vec2 positions[5]; |
| 1134 | positions[0] = Vec2(0.0f, 0.0f); |
| 1135 | positions[1] = Vec2(0.0f, 1.0f); |
| 1136 | positions[2] = Vec2(0.5f, 0.5f); |
| 1137 | positions[3] = Vec2(1.0f, 0.0f); |
| 1138 | positions[4] = Vec2(1.0f, 1.0f); |
| 1139 | |
| 1140 | for (int i = 0; i < 5; i++) |
| 1141 | { |
| 1142 | sprites[i] = Sprite::create("Images/grossini.png"); |
| 1143 | sprites[i]->setPositionNormalized(positions[i]); |
| 1144 | addChild(sprites[i]); |
| 1145 | } |
| 1146 | scheduleUpdate(); |
| 1147 | |
| 1148 | setContentSize(Director::getInstance()->getWinSize()); |
| 1149 | _copyContentSize = getContentSize(); |
| 1150 | |
| 1151 | // setAnchorPoint(Vec2(0.5,0.5)); |
| 1152 | // setPositionNormalized(Vec2(0.5,0.5)); |
| 1153 | } |
| 1154 | |
| 1155 | std::string NodeNormalizedPositionTest2::title() const |
| 1156 | { |
nothing calls this directly
no test coverage detected