1 /*---------------------------------------------------------------------------* 2 3 Copyright (C) Nintendo. All rights reserved. 4 5 These coded instructions, statements, and computer programs contain 6 proprietary information of Nintendo of America Inc. and/or Nintendo 7 Company Ltd., and are protected by Federal copyright law. They may 8 not be disclosed to third parties or copied or duplicated in any form, 9 in whole or in part, without the prior written consent of Nintendo. 10 11 *---------------------------------------------------------------------------*/ 12 13 //------------------------------------------------------------------------------ 14 /** @file erreula_AppearArg.h 15 * @brief Error Viewer Appearance Information 16 */ 17 //------------------------------------------------------------------------------ 18 #ifndef NN_ERREULA_APPEAR_ARG_H_ 19 #define NN_ERREULA_APPEAR_ARG_H_ 20 21 #include "erreula_Types.h" 22 23 /** @namespace nn::erreula 24 * The namespace for <tt>erreula</tt>. 25 */ 26 namespace nn { 27 //------------------------------------------------------------------------------ 28 namespace erreula { 29 //------------------------------------------------------------------------------ 30 /** 31 * Error Viewer Appearance Information 32 */ 33 class ErrorArg 34 { 35 public: ErrorArg()36 explicit ErrorArg() 37 : mErrorType( cErrorType_Code ) 38 , mScreenType( cScreenType_Dual ) 39 , mControllerType( cControllerType_Remo0 ) 40 , mRemoCtrlHoldType( cRemoCtrlHoldType_Normal ) 41 , mErrorCode( 0 ) 42 , mFrameRate( 1 ) 43 , mpMainText( NULL ) 44 , mpBtn1Text( NULL ) 45 , mpBtn2Text( NULL ) 46 , mpTitleText( NULL ) 47 , mbDrawDpdCursor( true ) 48 { } 49 public: 50 /// Error type.<br/>Specify the method of setting the error message to display (code specification or free text). Defaults to code specification if not set. 51 ErrorType mErrorType; 52 /// Display screen.<br/>Specify the screen to display the error viewer on. Defaults to display to both the Wii U GamePad and TV if not set. 53 ScreenType mScreenType; 54 /// Controller type.<br/>Specify the controller to use to operate the error viewer. Defaults to Wii Remote 0 if not set. 55 ControllerType mControllerType; 56 /// How the Wii Remote is held.<br/>If the controller type was set to the Wii Remote, specify whether it is held vertically or horizontally. Defaults to held vertically if not set. 57 RemoCtrlHoldType mRemoCtrlHoldType; 58 /// Error code.<br/>If the error type is code specification, specify the error code returned by the Cafe SDK API and other libraries. 59 s32 mErrorCode; 60 /// Frame rate.<br/>Specify 1 for 60 fps, or 2 for 30 fps. Defaults to 60 fps if not set. 61 s32 mFrameRate; 62 /// Message body.<br/>If the error type is free text, specify the text to display in the error message. (Maximum of 500 characters per line and 2000 characters total. UTF16.) 63 const char16* mpMainText; 64 /// Button label (for the left button in a set of two buttons).<br/>If the error type includes a specification for one or two buttons, set the string to display as the label of the button, or of the left-hand button if there are two. (Maximum of 24 characters. UTF16.) 65 const char16* mpBtn1Text; 66 /// Button label (for the right button in a set of two buttons).<br/>If the error type includes a specification for two buttons, set the string to display as the label of the right-hand button. (Maximum of 24 characters. UTF16.) 67 const char16* mpBtn2Text; 68 /// Title message.<br/>If the error type specifies free text, set the string to display in the title of the dialog box. (Maximum of 10 characters.) 69 const char16* mpTitleText; 70 /// Drawing of the DPD pointer.<br/>If the error viewer is set to appear on the TV, specify <tt>true</tt> to draw the Wii Remote's direct pointing device, or <tt>false</tt> to not draw. The pointer is drawn if not set. 71 bool mbDrawDpdCursor; 72 }; 73 74 //------------------------------------------------------------------------------ 75 /** 76 * Display Settings for the Error Viewer 77 */ 78 class AppearArg 79 { 80 public: AppearArg()81 explicit AppearArg() 82 : mErrorArg() 83 { } 84 /// Error type setting.<br/>Specify the method of setting the error message to display (code specification or free text). Defaults to code specification if not set. setErrorType(ErrorType type)85 void setErrorType( ErrorType type ) 86 { 87 mErrorArg.mErrorType = type; 88 } 89 90 /// Display screen setting.<br/>Specify the screen to display the error viewer on. Defaults to display to both the Wii U GamePad and TV if not set. setScreenType(ScreenType type)91 void setScreenType( ScreenType type ) 92 { 93 mErrorArg.mScreenType = type; 94 } 95 96 /// Controller type setting.<br/>Specify the controller to use to operate the error viewer. Defaults to Wii Remote 0 if not set. setControllerType(ControllerType type)97 void setControllerType( ControllerType type ) 98 { 99 mErrorArg.mControllerType = type; 100 } 101 102 /// How the Wii Remote is held.<br/>If the controller type was set to the Wii Remote, specify whether it is held vertically or horizontally. Defaults to held vertically if not set. setRemoCtrlHoldType(RemoCtrlHoldType type)103 void setRemoCtrlHoldType( RemoCtrlHoldType type ) 104 { 105 mErrorArg.mRemoCtrlHoldType = type; 106 } 107 108 /// Error code setting.<br/>If the error type is code specification, specify the error code returned by the Cafe SDK API and other libraries. setErrorCode(s32 code)109 void setErrorCode( s32 code ) 110 { 111 mErrorArg.mErrorCode = code; 112 } 113 114 /// Frame rate setting.<br/>Specify 1 for 60 fps, or 2 for 30 fps. Defaults to 60 fps if not set. setFrameRate(s32 rate)115 void setFrameRate( s32 rate ) 116 { 117 mErrorArg.mFrameRate = rate; 118 } 119 120 /// Message body setting.<br/>If the error type is free text, specify the text to display in the error message. (Maximum of 500 characters per line and 2000 characters total. UTF16.) setMainTextString(const char16 * string)121 void setMainTextString( const char16* string ) 122 { 123 mErrorArg.mpMainText = string; 124 } 125 126 /// Button label setting.<br/>If the error type includes a button, specify the string to display as the label of the button. (Maximum of 24 characters. UTF16.) setButtonString(const char16 * string)127 void setButtonString( const char16* string ) 128 { 129 mErrorArg.mpBtn1Text = string; 130 } 131 132 /// Label setting for two buttons (left).<br/>If the error type includes two buttons, specify the string to display as the label of the left-hand button. (Maximum of 24 characters. UTF16.) Specify what to display when the choice is <b>no (cancel)</b>. setLeftButtonString(const char16 * string)133 void setLeftButtonString( const char16* string ) 134 { 135 mErrorArg.mpBtn1Text = string; 136 } 137 138 /// Label setting for two buttons (right).<br/>If the error type includes two buttons, specify the string to display as the label of the right-hand button. (Maximum of 24 characters. UTF16.) Specify what to display when the choice is to <b>yes (run)</b> setRightButtonString(const char16 * string)139 void setRightButtonString( const char16* string ) 140 { 141 mErrorArg.mpBtn2Text = string; 142 } 143 144 /// Title message setting.<br/>If the error type specifies free text, set the string to display in the title of the dialog box. (Maximum of 10 characters.) The title is displayed in the form [ error_code: specified_string ]. setTitleString(const char16 * string)145 void setTitleString( const char16* string ) 146 { 147 mErrorArg.mpTitleText = string; 148 } 149 150 /// Draw setting of the DPD pointer.<br/>If the error viewer is set to appear on the TV, specify <tt>true</tt> to draw the Wii Remote's direct pointing device, or <tt>false</tt> to not draw. The pointer is drawn if not set. setDrawDpdCursor(bool draw_dpd)151 void setDrawDpdCursor( bool draw_dpd ) 152 { 153 mErrorArg.mbDrawDpdCursor = draw_dpd; 154 } 155 156 public: 157 /// Error viewer appearance information. 158 ErrorArg mErrorArg; 159 }; 160 161 //------------------------------------------------------------------------------ 162 /** 163 * Appearance information for the HOME button prohibition icon. 164 */ 165 class HomeNixSignArg 166 { 167 public: HomeNixSignArg()168 explicit HomeNixSignArg() 169 : mFrameRate( 1 ) 170 { } 171 /// Frame rate setting.<br/>Specify 1 for 60 fps, or 2 for 30 fps. Defaults to 60 fps if not set. setFrameRate(s32 rate)172 void setFrameRate( s32 rate ) 173 { 174 mFrameRate = rate; 175 } 176 177 public: 178 /// Frame rate. 179 s32 mFrameRate; 180 }; 181 182 //------------------------------------------------------------------------------ 183 } // namespace erreula 184 //------------------------------------------------------------------------------ 185 } // namespace nn 186 187 #endif // NN_ERREULA_APPEAR_ARG_H_ 188