// ---------------------------------------------------------------------------- // Name: RenderTitleScreen // // Desc: Renders the title screen. // ---------------------------------------------------------------------------- HRESULT CGame::RenderTitleScreen() { // Render the Start Game menu option. Change the color if the mouse is // hovering over it. if( !m_bStartGameSelected ) { m_pText->Print( (m_dwWinWidth / 2) - 55, (m_dwWinHeight / 2) - 20, 0xFF0000FF, "Start Game" ); } else { m_pText->Print( (m_dwWinWidth / 2) - 55, (m_dwWinHeight / 2) - 20, 0xFF00FF00, "Start Game" ); } // Same as above. if( !m_bExitGameSelected ) { m_pText->Print( (m_dwWinWidth / 2) - 50, (m_dwWinHeight / 2) + 10, 0xFF0000FF, "Exit Game" ); } else { m_pText->Print( (m_dwWinWidth / 2) - 50, (m_dwWinHeight / 2) + 10, 0xFF00FF00, "Exit Game" ); } // See the RenderMouse function below. RenderMouse(); return D3D_OK; }
void Render( int realX, int realY, bool highlighted, bool clicked ) { LandscapeGuideGridWindow *parent = (LandscapeGuideGridWindow *) m_parent; LandscapeTile *def = parent->m_tileDef; if( def->m_guideGrid ) { RenderColours ( realX, realY, highlighted, clicked ); RenderGrid ( realX, realY, highlighted, clicked ); RenderBorder ( realX, realY, highlighted, clicked ); RenderMouse ( realX, realY, highlighted, clicked ); HandleMouseInput(); } }
void Screen::Draw(C4FacetEx &cgo, bool fDoBG) { // draw bg, if this won't be done by a fullscreen dialog if (fDoBG) { Dialog *pFSDlg = GetFullscreenDialog(false); if (!pFSDlg || !pFSDlg->HasBackground()) { if (Game.GraphicsSystem.pLoaderScreen) Game.GraphicsSystem.pLoaderScreen->fctBackground.DrawFullScreen(cgo); else // loader not yet loaded: black BG lpDDraw->DrawBoxDw(cgo.Surface, 0,0, cgo.Wdt+1, cgo.Hgt+1, 0x00000000); } } // draw contents (if GUI-gfx are loaded, which is assumed in GUI-drawing-functions) if (IsVisible() && IsResLoaded()) { Window::Draw(cgo); if (pContext) pContext->Draw(cgo); } // draw mouse cursor if (Application.isFullScreen) RenderMouse(cgo); }