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*5;
      else if(PlayTwoScoreW>0)
      PlayTwoScoreXY.x=320+ScorePictureWide*4;
      else if(PlayTwoScoreQ>0)
      PlayTwoScoreXY.x=320+ScorePictureWide*3;
      else if(PlayTwoScoreB>0)
      PlayTwoScoreXY.x=320+ScorePictureWide*2;
      else if(PlayTwoScoreS>0)
      PlayTwoScoreXY.x=320+ScorePictureWide;

     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);
    }

  • 相关阅读:
    记一次file_get_contents报failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request的错
    记一次centos7下配置服务器的过程
    locate: 无法执行 stat () `/var/lib/mlocate/mlocate.db': 没有那个文件或目录
    VM12虚拟机Centos7配置动态IP的网络设置
    记录下防御SSH爆破攻击的经验(CentOS7.3)
    第6次实践作业 17组
    第5次实践作业
    第3次实践作业
    第2次实践作业
    第1次实践作业
  • 原文地址:https://www.cnblogs.com/byfei/p/3112306.html
Copyright © 2011-2022 走看看