| 839 | } |
| 840 | |
| 841 | void SampleVehicle::helpRender(PxU32 x, PxU32 y, PxU8 textAlpha) |
| 842 | { |
| 843 | Renderer* renderer = getRenderer(); |
| 844 | const PxU32 yInc=18; |
| 845 | const PxF32 scale=0.5f; |
| 846 | const PxF32 shadowOffset=6.0f; |
| 847 | const RendererColor textColor(255, 255, 255, textAlpha); |
| 848 | const bool isKeyboardSupported = getApplication().getPlatform()->getSampleUserInput()->keyboardSupported(); |
| 849 | const bool isPadSupported = getApplication().getPlatform()->getSampleUserInput()->gamepadSupported(); |
| 850 | const char* msg; |
| 851 | |
| 852 | |
| 853 | if(ePLAYER_VEHICLE_TYPE_TANK4W==mPlayerVehicleType || ePLAYER_VEHICLE_TYPE_TANK6W==mPlayerVehicleType) |
| 854 | { |
| 855 | renderer->print(x, y += yInc, "TODO: document inputs for ePLAYER_VEHICLE_TYPE_TANK4W, ePLAYER_VEHICLE_TYPE_TANK6W", scale, shadowOffset, textColor); |
| 856 | if(PxVehicleDriveTankControlModel::eSPECIAL==mTankDriveModel) |
| 857 | { |
| 858 | } |
| 859 | else |
| 860 | { |
| 861 | } |
| 862 | } |
| 863 | else |
| 864 | { |
| 865 | if (isPadSupported && isKeyboardSupported) |
| 866 | renderer->print(x, y += yInc, "Use right stick or numpad keys to rotate the camera", scale, shadowOffset, textColor); |
| 867 | else if (isPadSupported) |
| 868 | renderer->print(x, y += yInc, "Use right stick to rotate the camera", scale, shadowOffset, textColor); |
| 869 | else if (isKeyboardSupported) |
| 870 | renderer->print(x, y += yInc, "Use numpad keys to rotate the camera", scale, shadowOffset, textColor); |
| 871 | |
| 872 | if (isPadSupported) |
| 873 | renderer->print(x, y += yInc, "Use left stick to steer", scale, shadowOffset, textColor); |
| 874 | |
| 875 | msg = mApplication.inputInfoMsg("Press "," for accelerate", VEH_ACCELERATE_PAD, VEH_ACCELERATE_KBD); |
| 876 | if(msg) |
| 877 | renderer->print(x, y += yInc, msg, scale, shadowOffset, textColor); |
| 878 | msg = mApplication.inputInfoMsg("Press "," for brake", CAR_BRAKE_PAD, CAR_BRAKE_KBD); |
| 879 | if(msg) |
| 880 | renderer->print(x, y += yInc, msg, scale, shadowOffset, textColor); |
| 881 | msg = mApplication.inputInfoMsg("Press "," to steer", CAR_STEER_LEFT_KBD, CAR_STEER_RIGHT_KBD); |
| 882 | if(msg) |
| 883 | renderer->print(x, y += yInc, msg, scale, shadowOffset, textColor); |
| 884 | } |
| 885 | |
| 886 | msg = mApplication.inputInfoMsg("Press "," for handbrake", CAR_HANDBRAKE_PAD, CAR_HANDBRAKE_KBD); |
| 887 | if(msg) |
| 888 | renderer->print(x, y += yInc, msg, scale, shadowOffset, textColor); |
| 889 | |
| 890 | if(!getFocusVehicleUsesAutoGears()) |
| 891 | { |
| 892 | msg = mApplication.inputInfoMsg("Press "," to gear up", VEH_GEAR_UP_PAD, VEH_GEAR_UP_KBD); |
| 893 | if(msg) |
| 894 | renderer->print(x, y += yInc, msg, scale, shadowOffset, textColor); |
| 895 | msg = mApplication.inputInfoMsg("Press "," to gear down", VEH_GEAR_DOWN_PAD, VEH_GEAR_DOWN_KBD); |
| 896 | if(msg) |
| 897 | renderer->print(x, y += yInc, msg, scale, shadowOffset, textColor); |
| 898 | } |
nothing calls this directly
no test coverage detected