这篇教程C++ GetScreenHeight函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中GetScreenHeight函数的典型用法代码示例。如果您正苦于以下问题:C++ GetScreenHeight函数的具体用法?C++ GetScreenHeight怎么用?C++ GetScreenHeight使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了GetScreenHeight函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: DrawTitleScreen// Title Screen Draw logicvoid DrawTitleScreen(void){ // TODO: Draw TITLE screen here! DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), BLUE); //DrawTextureEx(titleTexture, (Vector2){GetScreenWidth()/2-titleTexture.width/2, GetScreenHeight()/2-titleTexture.height/2}, 0, 1, Fade(WHITE, titleAlpha)); DrawRectangle(GetScreenWidth()/2-200, GetScreenHeight()/2-100, 400, 150, Fade(YELLOW, titleAlpha)); DrawText("PRESS <ENTER> to START the GAME", 208, GetScreenHeight()-75, 20, Fade(BLACK, startTextAlpha));}
开发者ID:MarcMDE,项目名称:TapToJump,代码行数:9,
示例2: HandleLostGraphicsContext void HandleLostGraphicsContext() { spriteBatch.reset(new NinjaParty::SpriteBatch(GetScreenWidth(), GetScreenHeight())); texture = assetManager->LoadTexture("Star.png", true); renderTexture.reset(new NinjaParty::RenderTexture(GetScreenWidth() / 2, GetScreenHeight())); }
开发者ID:ThirdPartyNinjas,项目名称:NinjaParty,代码行数:8,
示例3: LoadContent void LoadContent(const std::string &assetPath, const std::string &assetArchivePath) { assetManager.reset(new NinjaParty::AssetManager(assetPath, assetArchivePath)); spriteBatch.reset(new NinjaParty::SpriteBatch(GetScreenWidth(), GetScreenHeight())); texture = assetManager->LoadTexture("Star.png"); renderTexture.reset(new NinjaParty::RenderTexture(GetScreenWidth() / 2, GetScreenHeight())); }
开发者ID:ThirdPartyNinjas,项目名称:NinjaParty,代码行数:9,
示例4: Draw void Draw() { ClearScreen(NinjaParty::Color::Black); spriteBatch->Begin(); spriteBatch->Draw(texture, NinjaParty::Vector2::ZERO, nullptr, NinjaParty::Vector2::ZERO, rotation, NinjaParty::Color(0, 1, 0, 1)); spriteBatch->Draw(texture, NinjaParty::Vector2(GetScreenWidth() / 2, GetScreenHeight() / 2), nullptr, NinjaParty::Vector2(0.5f, 0.5f), rotation, NinjaParty::Color(1, 1, 1, 0.5f)); spriteBatch->Draw(texture, NinjaParty::Vector2(GetScreenWidth(), GetScreenHeight()), nullptr, NinjaParty::Vector2(1.0f, 1.0f), rotation, NinjaParty::Color(1, 0, 0, 1)); spriteBatch->End(); }
开发者ID:ThirdPartyNinjas,项目名称:NinjaParty,代码行数:10,
示例5: GetScreenWidthvoid Home::InitTheUsernameLabel(){ usernameLabelColor = {255, 255, 255, 0}; //White color as rgba usernameLabelText = "Welcome " + User::username + "..."; usernameLabelRect.x = GetScreenWidth() / 16; usernameLabelRect.y = GetScreenHeight() / 15; usernameLabelRect.w = GetScreenWidth() / usernameLabelText.length() * 3; usernameLabelRect.h = GetScreenHeight() / usernameLabelText.length() * 2;}
开发者ID:nooro,项目名称:Kagan,代码行数:10,
示例6: GetPhyScreenWidthvoid XGraphicsOpenGL::SetViewport( int left, int top, int right, int bottom ){ XGraphics::SetViewport( left, top, right, bottom ); // float ratioX = GetPhyScreenWidth() / GetScreenWidth(); float ratioY = GetPhyScreenHeight() / GetScreenHeight(); int w = (int)((right - left) * ratioX); int h = (int)((bottom - top) * ratioY); int x = (int)(left * ratioX); int y = (int)((GetScreenHeight() - (top + (bottom - top)))) * ratioY; glViewport( x, y, w, h ); // EAGLView C++ GetScreenPosition函数代码示例 C++ GetScreen函数代码示例
|