Project

General

Profile

« Previous | Next » 

Revision c558f011

Added by Leszek Koltunski over 4 years ago

Improve setting text size in Spinners (forgotten part).

View differences:

src/main/java/org/distorted/main/RubikSurfaceView.java
73 73

  
74 74
    private float mRotAngle;
75 75
    private int mPtrID1, mPtrID2;
76
    private int mNumFingersDown;
77 76
    private float mX, mY;
78 77
    private float mStartRotX, mStartRotY;
79 78
    private float mAxisX, mAxisY;
......
142 141
      mMovement = movement;
143 142
      }
144 143

  
145
///////////////////////////////////////////////////////////////////////////////////////////////////
146

  
147
    private Static4D quatFromAngle(float angle)
148
      {
149
      float cosA = (float)Math.cos(angle);
150
      float sinA =-(float)Math.sin(angle);
151

  
152
      return new Static4D(0, 0, sinA, cosA);
153
      }
154

  
155 144
///////////////////////////////////////////////////////////////////////////////////////////////////
156 145

  
157 146
    private Static4D quatFromDrag(float dragX, float dragY)
......
527 516

  
528 517
    private void actionDown(MotionEvent event)
529 518
      {
530
      mNumFingersDown++;
531 519
      mPtrID1 = event.getPointerId(0);
532 520

  
533 521
      float x = event.getX();
......
543 531

  
544 532
    private void actionUp(MotionEvent event)
545 533
      {
546
      mNumFingersDown--;
547

  
548 534
      mPtrID1 = INVALID_POINTER_ID;
549 535
      mPtrID2 = INVALID_POINTER_ID;
550 536

  
......
556 542
      if( mLastCubitColor>=0 )
557 543
        {
558 544
        mPreRender.setTextureMap( mLastCubit, mLastCubitFace, mLastCubitColor );
545
        mLastCubitColor = -1;
559 546
        }
560 547
      }
561 548

  
......
563 550

  
564 551
    private void actionDown2(MotionEvent event)
565 552
      {
566
      mNumFingersDown++;
567

  
568 553
      int index = event.getActionIndex();
569 554

  
570 555
      if( mPtrID1==INVALID_POINTER_ID )
......
626 611

  
627 612
    private void actionUp2(MotionEvent event)
628 613
      {
629
      mNumFingersDown--;
630

  
631 614
      int index = event.getActionIndex();
632 615

  
633 616
      if( index==event.findPointerIndex(mPtrID1) )
......
672 655
        mPtrID1 = INVALID_POINTER_ID;
673 656
        mPtrID2 = INVALID_POINTER_ID;
674 657

  
675
        mNumFingersDown = 0;
676

  
677 658
        mRenderer  = new RubikRenderer(this);
678 659
        mPreRender = new RubikPreRender(this);
679 660

  

Also available in: Unified diff