@@ -80,12 +80,17 @@ class MessageListClass
8080
8181 // if pLabel is given, the message will be {$pLabel}:{$pMessage}
8282 // else it will be just {$pMessage}
83- void PrintMessage (const wchar_t * pMessage, int durationFrames = 0x96 , int nColorSchemeIndex = ColorScheme::White, bool bSilent = false )
84- { this ->AddMessage (nullptr , 0 , pMessage, nColorSchemeIndex, static_cast <TextPrintType>(0x4046 ), durationFrames, bSilent); }
83+ // nColorSchemeIndex = -1 will use LightGrey color scheme to print the message, or if it fails to find that color scheme index 0.
84+ void PrintMessage (const wchar_t * pMessage, int durationFrames = 0x96 , int nColorSchemeIndex = -1 , bool bSilent = false )
85+ {
86+ if (nColorSchemeIndex < 0 )
87+ nColorSchemeIndex = Math::max (ColorScheme::FindIndex (" LightGrey" , 53 ), 0 );
8588
86- void PrintMessage ( const wchar_t * pMessage, double durationMinutes, int nColorSchemeIndex = ColorScheme::White, bool bSilent = false )
87- { this -> AddMessage ( nullptr , 0 , pMessage, nColorSchemeIndex, static_cast <TextPrintType>( 0x4046 ), static_cast < int >(durationMinutes * 900 ), bSilent); }
89+ this -> AddMessage ( nullptr , 0 , pMessage, nColorSchemeIndex, static_cast <TextPrintType>( 0x4046 ), durationFrames, bSilent);
90+ }
8891
92+ void PrintMessage (const wchar_t * pMessage, double durationMinutes, int nColorSchemeIndex = -1 , bool bSilent = false )
93+ { PrintMessage (pMessage, static_cast <int >(durationMinutes * 900 ), nColorSchemeIndex, bSilent); }
8994
9095 TextLabelClass* MessageList;
9196 Point2D MessagePos;
0 commit comments