* ButtonMappingWindow ***************************************************************************/
| 2833 | * ButtonMappingWindow |
| 2834 | ***************************************************************************/ |
| 2835 | static u32 |
| 2836 | ButtonMappingWindow() |
| 2837 | { |
| 2838 | GuiWindow promptWindow(448,288); |
| 2839 | promptWindow.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); |
| 2840 | promptWindow.SetPosition(0, -10); |
| 2841 | GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM); |
| 2842 | GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM); |
| 2843 | GuiImageData btnOutline(button_png); |
| 2844 | GuiImageData btnOutlineOver(button_over_png); |
| 2845 | |
| 2846 | GuiImageData dialogBox(dialogue_box_png); |
| 2847 | GuiImage dialogBoxImg(&dialogBox); |
| 2848 | |
| 2849 | GuiText titleTxt("Button Mapping", 26, (GXColor){255, 255, 255, 255}); |
| 2850 | titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); |
| 2851 | titleTxt.SetPosition(0,14); |
| 2852 | |
| 2853 | char msg[200]; |
| 2854 | |
| 2855 | switch(mapMenuCtrl) |
| 2856 | { |
| 2857 | case CTRLR_GCPAD: |
| 2858 | #ifdef HW_RVL |
| 2859 | sprintf(msg, "Press any button on the GameCube Controller now. Press Home or the C-Stick in any direction to clear the existing mapping."); |
| 2860 | #else |
| 2861 | sprintf(msg, "Press any button on the GameCube Controller now. Press the C-Stick in any direction to clear the existing mapping."); |
| 2862 | #endif |
| 2863 | break; |
| 2864 | case CTRLR_WIIMOTE: |
| 2865 | sprintf(msg, "Press any button on the Wiimote now. Press Home to clear the existing mapping."); |
| 2866 | break; |
| 2867 | case CTRLR_CLASSIC: |
| 2868 | sprintf(msg, "Press any button on the Classic Controller now. Press Home to clear the existing mapping."); |
| 2869 | break; |
| 2870 | case CTRLR_WUPC: |
| 2871 | sprintf(msg, "Press any button on the Wii U Pro Controller now. Press Home to clear the existing mapping."); |
| 2872 | break; |
| 2873 | case CTRLR_WIIDRC: |
| 2874 | sprintf(msg, "Press any button on the Wii U GamePad now. Press Home to clear the existing mapping."); |
| 2875 | break; |
| 2876 | case CTRLR_NUNCHUK: |
| 2877 | sprintf(msg, "Press any button on the Wiimote or Nunchuk now. Press Home to clear the existing mapping."); |
| 2878 | break; |
| 2879 | } |
| 2880 | |
| 2881 | GuiText msgTxt(msg, 26, (GXColor){0, 0, 0, 255}); |
| 2882 | msgTxt.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); |
| 2883 | msgTxt.SetPosition(0,-20); |
| 2884 | msgTxt.SetWrap(true, 430); |
| 2885 | |
| 2886 | promptWindow.Append(&dialogBoxImg); |
| 2887 | promptWindow.Append(&titleTxt); |
| 2888 | promptWindow.Append(&msgTxt); |
| 2889 | |
| 2890 | HaltGui(); |
| 2891 | mainWindow->SetState(STATE_DISABLED); |
| 2892 | mainWindow->Append(&promptWindow); |
no test coverage detected