Project

General

Profile

« Previous | Next » 

Revision 96e1f0ad

Added by Leszek Koltunski over 3 years ago

Make Dynamic's resetToBegin() done on the next frame.
This is necessary if we want to reset many Dynamics at one go and have all of them start synchronized.
Otherwise it can happen that when we reset, we do it when some objects which the Dynamics belong to are already rendered and others are not, and then some of the Dynamics will be delayed by one frame which is visible already.

View differences:

src/main/java/org/distorted/screens/RubikScreenBase.java
176 176

  
177 177
///////////////////////////////////////////////////////////////////////////////////////////////////
178 178

  
179
  public void setLockState(RubikActivity act)
179
  public void setLockState(final RubikActivity act)
180 180
    {
181
    mLockButton.setImageResource(getLockIcon(act));
181
    act.runOnUiThread(new Runnable()
182
      {
183
      @Override
184
      public void run()
185
        {
186
        mLockButton.setImageResource(getLockIcon(act));
187
        }
188
      });
182 189
    }
183 190

  
184 191
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff