void ShowEscortMenu(char *msg) { int w,h,aw; int x,y; bkg bg; memset (&bg, 0, sizeof (bg)); bg.bIgnoreBg = 1; WINDOS( DDGrSetCurrentCanvas(&dd_VR_screen_pages[0]), GrSetCurrentCanvas(&VR_screen_pages[0]) ); GrSetCurFont( GAME_FONT ); GrGetStringSize(msg,&w,&h,&aw); x = (grdCurScreen->sc_w-w)/2; y = (grdCurScreen->sc_h-h)/4; GrSetFontColorRGBi (RGBA (0, PAL2RGBA (28), 0, 255), 1, 0, 0); PA_DFX (pa_set_frontbuffer_current()); PA_DFX (NMDrawBackground(x-15,y-15,x+w+15-1,y+h+15-1)); PA_DFX (pa_set_backbuffer_current()); NMDrawBackground(NULL,x-15,y-15,x+w+15-1,y+h+15-1); WIN(DDGRLOCK(dd_grd_curcanv)); PA_DFX (pa_set_frontbuffer_current()); PA_DFX (GrUString( x, y, msg )); PA_DFX (pa_set_backbuffer_current()); GrUString( x, y, msg ); WIN(DDGRUNLOCK(dd_grd_curcanv)); ResetCockpit(); }
int _CDECL_ GrUPrintf (int x, int y, const char * format, ...) { char buffer[1000]; va_list args; va_start (args, format); vsprintf (buffer, format, args); return GrUString (x, y, buffer); }
void ShowPauseMessage (const char* msg) { int w, h, aw; int x, y; CCanvas::SetCurrent (NULL); fontManager.SetCurrent (SMALL_FONT); fontManager.Current ()->StringSize (msg, w, h, aw); x = (screen.Width () - w) / 2; y = (screen.Height () - h) / 2; CCanvas::Current ()->SetColorRGB (0, 0, 0, 255); OglDrawFilledRect (x-BOX_BORDER/2, y-BOX_BORDER/2, x+w+BOX_BORDER/2-1, y+h+BOX_BORDER/2-1); fontManager.SetColor (255, -1); GrUString (0x8000, y, msg); GrUpdate (0); }