| 86 | } |
| 87 | |
| 88 | void State::notifyFrameEvent(float _time) |
| 89 | { |
| 90 | mCountTime += _time; |
| 91 | |
| 92 | const int offset = 30; |
| 93 | const float time_diff = 0.3f; |
| 94 | const MyGUI::IntSize& view = MyGUI::RenderManager::getInstance().getViewSize(); |
| 95 | |
| 96 | if (!mMainWidget->getVisible()) |
| 97 | { |
| 98 | mMainWidget->setPosition(-mMainWidget->getWidth(), view.height - mMainWidget->getHeight() - offset); |
| 99 | mMainWidget->setVisible(true); |
| 100 | mMainWidget->setAlpha(1); |
| 101 | |
| 102 | MyGUI::IntPoint point(offset, view.height - mMainWidget->getHeight() - offset); |
| 103 | MyGUI::ControllerManager::getInstance().addItem(mMainWidget, createControllerPosition(point)); |
| 104 | } |
| 105 | |
| 106 | if (!mButton1->getVisible()) |
| 107 | { |
| 108 | mButton1->setPosition(view.width, offset); |
| 109 | mButton1->setVisible(true); |
| 110 | mButton1->setAlpha(1); |
| 111 | MyGUI::IntPoint point(view.width - mButton1->getWidth() - offset, offset); |
| 112 | MyGUI::ControllerManager::getInstance().addItem(mButton1, createControllerPosition(point)); |
| 113 | } |
| 114 | |
| 115 | if (mCountTime > time_diff) |
| 116 | { |
| 117 | if (!mButton2->getVisible()) |
| 118 | { |
| 119 | mButton2->setPosition(view.width, (mButton2->getHeight() + offset) + offset); |
| 120 | mButton2->setVisible(true); |
| 121 | mButton2->setAlpha(1); |
| 122 | MyGUI::IntPoint point( |
| 123 | view.width - mButton1->getWidth() - offset, |
| 124 | (mButton2->getHeight() + offset) + offset); |
| 125 | MyGUI::ControllerManager::getInstance().addItem(mButton2, createControllerPosition(point)); |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | if (mCountTime > time_diff * 2) |
| 130 | { |
| 131 | if (!mButton3->getVisible()) |
| 132 | { |
| 133 | mButton3->setPosition(view.width, (mButton3->getHeight() + offset) * 2 + offset); |
| 134 | mButton3->setVisible(true); |
| 135 | mButton3->setAlpha(1); |
| 136 | MyGUI::IntPoint point( |
| 137 | view.width - mButton3->getWidth() - offset, |
| 138 | (mButton3->getHeight() + offset) * 2 + offset); |
| 139 | MyGUI::ControllerManager::getInstance().addItem(mButton3, createControllerPosition(point)); |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | if (mCountTime > time_diff * 3) |
| 144 | { |
| 145 | if (!mButton4->getVisible()) |
nothing calls this directly
no test coverage detected