zoukankan      html  css  js  c++  java
  • 数字居中

     

    void CPlay::ScoreTwoPaint()
    {
     if(999999<ScoreTwo)
      ScoreTwo=999999;
     int PlayTwoScoreSW=ScoreTwo/100000;
     int PlayTwoScoreW=(ScoreTwo/10000)%10;
     int PlayTwoScoreQ=(ScoreTwo/1000)%10;
     int PlayTwoScoreB=(ScoreTwo/100)%10;
     int PlayTwoScoreS=(ScoreTwo/10)%10;
     int PlayTwoScoreG=ScoreTwo%10;
     PlayTwoScoreXY.x=320;
     PlayTwoScoreXY.y=440;
     int ScorePictureWide=81;
     
      if(PlayTwoScoreSW>0)
      PlayTwoScoreXY.x=320+ScorePictureWide*2.5;
      else if(PlayTwoScoreW>0)
      PlayTwoScoreXY.x=320+ScorePictureWide*2;
      else if(PlayTwoScoreQ>0)
      PlayTwoScoreXY.x=320+ScorePictureWide*1.5;
      else if(PlayTwoScoreB>0)
      PlayTwoScoreXY.x=320+ScorePictureWide*1;
      else if(PlayTwoScoreS>0)
      PlayTwoScoreXY.x=320+ScorePictureWide*0.5;

     if(PlayTwoScoreSW>0)
     gBack.Image_sp[PlayTwoScoreSW+PlayTwoScoreFrame]->RenderEx(PlayTwoScoreXY.x-ScorePictureWide*5,PlayTwoScoreXY.y,0,bs,bs);
     if(PlayTwoScoreSW+PlayTwoScoreW>0)
     gBack.Image_sp[PlayTwoScoreW+PlayTwoScoreFrame]->RenderEx(PlayTwoScoreXY.x-ScorePictureWide*4,PlayTwoScoreXY.y,0,bs,bs);
     if(PlayTwoScoreSW+PlayTwoScoreW+PlayTwoScoreQ>0)
     gBack.Image_sp[PlayTwoScoreQ+PlayTwoScoreFrame]->RenderEx(PlayTwoScoreXY.x-ScorePictureWide*3,PlayTwoScoreXY.y,0,bs,bs);
     if(PlayTwoScoreSW+PlayTwoScoreW+PlayTwoScoreQ+PlayTwoScoreB>0)
     gBack.Image_sp[PlayTwoScoreB+PlayTwoScoreFrame]->RenderEx(PlayTwoScoreXY.x-ScorePictureWide*2,PlayTwoScoreXY.y,0,bs,bs);
     if(PlayTwoScoreSW+PlayTwoScoreW+PlayTwoScoreQ+PlayTwoScoreB+PlayTwoScoreS>0)
     gBack.Image_sp[PlayTwoScoreS+PlayTwoScoreFrame]->RenderEx(PlayTwoScoreXY.x-ScorePictureWide,PlayTwoScoreXY.y,0,bs,bs);
     
     gBack.Image_sp[PlayTwoScoreG+PlayTwoScoreFrame]->RenderEx(PlayTwoScoreXY.x,PlayTwoScoreXY.y,0,bs,bs);
    }

  • 相关阅读:
    【VUE】自定义组件
    【docker】Dockerfile
    【docker】常用命令
    【Java Web开发学习】跨域请求
    xshell6和xftp6运行提示缺少mfc110u.dll文件的解决办法
    【NPM】使用问题记录
    【Zuul】使用学习
    第八章 泛型程序设计
    第九章 集合
    分布式系列二: 分布式系统的通信
  • 原文地址:https://www.cnblogs.com/byfei/p/3112305.html
Copyright © 2011-2022 走看看