| 137 | } |
| 138 | |
| 139 | void SampleHelloWorld::helpRender(PxU32 x, PxU32 y, PxU8 textAlpha) |
| 140 | { |
| 141 | Renderer* renderer = getRenderer(); |
| 142 | const PxU32 yInc = 18; |
| 143 | const PxReal scale = 0.5f; |
| 144 | const PxReal shadowOffset = 6.0f; |
| 145 | const RendererColor textColor(255, 255, 255, textAlpha); |
| 146 | const bool isMouseSupported = getApplication().getPlatform()->getSampleUserInput()->mouseSupported(); |
| 147 | const bool isPadSupported = getApplication().getPlatform()->getSampleUserInput()->gamepadSupported(); |
| 148 | const char* msg; |
| 149 | |
| 150 | if (isMouseSupported && isPadSupported) |
| 151 | renderer->print(x, y += yInc, "Use mouse or right stick to rotate", scale, shadowOffset, textColor); |
| 152 | else if (isMouseSupported) |
| 153 | renderer->print(x, y += yInc, "Use mouse to rotate", scale, shadowOffset, textColor); |
| 154 | else if (isPadSupported) |
| 155 | renderer->print(x, y += yInc, "Use right stick to rotate", scale, shadowOffset, textColor); |
| 156 | if (isPadSupported) |
| 157 | renderer->print(x, y += yInc, "Use left stick to move",scale, shadowOffset, textColor); |
| 158 | msg = mApplication.inputMoveInfoMsg("Press "," to move", CAMERA_MOVE_FORWARD,CAMERA_MOVE_BACKWARD, CAMERA_MOVE_LEFT, CAMERA_MOVE_RIGHT); |
| 159 | if(msg) |
| 160 | renderer->print(x, y += yInc, msg,scale, shadowOffset, textColor); |
| 161 | msg = mApplication.inputInfoMsg("Press "," to move fast", CAMERA_SHIFT_SPEED, -1); |
| 162 | if(msg) |
| 163 | renderer->print(x, y += yInc, msg, scale, shadowOffset, textColor); |
| 164 | msg = mApplication.inputInfoMsg("Press "," to throw an object", SPAWN_DEBUG_OBJECT, -1); |
| 165 | if(msg) |
| 166 | renderer->print(x, y += yInc, msg,scale, shadowOffset, textColor); |
| 167 | } |
| 168 | |
| 169 | void SampleHelloWorld::descriptionRender(PxU32 x, PxU32 y, PxU8 textAlpha) |
| 170 | { |
nothing calls this directly
no test coverage detected