Project

General

Profile

« Previous | Next » 

Revision 8e1231ae

Added by Leszek Koltunski about 4 years ago

Saving Cube state: done

View differences:

src/main/java/org/distorted/uistate/RubikStatePlay.java
43 43
  private static final int MIN_SCRAMBLE =  1;
44 44
  private static final int DEF_SCRAMBLE =  1;
45 45
  public  static final int MAX_SCRAMBLE = 18;
46
  private static final int DEF_BUTTON   = RubikObject.CUBE3.ordinal();
46 47

  
47 48
  private HorizontalNumberPicker mPicker;
48 49
  private int mPickerValue;
49
  private int mButton = RubikObject.CUBE3.ordinal();
50
  private int mButton = DEF_BUTTON;
50 51

  
51 52
///////////////////////////////////////////////////////////////////////////////////////////////////
52 53

  
......
120 121
      {
121 122
      editor.putInt("scramble", mPicker.getValue() );
122 123
      }
124

  
125
    editor.putInt("button", mButton);
123 126
    }
124 127

  
125 128
///////////////////////////////////////////////////////////////////////////////////////////////////
......
127 130
  public void restorePreferences(SharedPreferences preferences)
128 131
    {
129 132
    mPickerValue= preferences.getInt("scramble", DEF_SCRAMBLE);
133
    mButton     = preferences.getInt("button"  , DEF_BUTTON  );
130 134
    }
131 135

  
132 136
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff