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

  • 相关阅读:
    android开发内存优化之软引用
    java 异步调用与多线程
    【转】生活中的OO智慧——大话面向对象五大原则
    Java算法 -- 顺序表
    Android 画闹钟
    Android 画指南针
    Android 工具类大全
    公共技术点之面向对象六大原则
    xml转对象1
    xml转对象
  • 原文地址:https://www.cnblogs.com/byfei/p/3112305.html
Copyright © 2011-2022 走看看