Revision c95b37a4
Added by Leszek Koltunski almost 2 years ago
src/main/java/org/distorted/helpers/MovesController.java | ||
---|---|---|
165 | 165 |
@Override |
166 | 166 |
public void onClick(View v) |
167 | 167 |
{ |
168 |
backMove(act,control); |
|
168 |
if( control.isScramblingAndSolvingNotBlocked() ) backMove(act,control);
|
|
169 | 169 |
} |
170 | 170 |
}); |
171 | 171 |
} |
src/main/java/org/distorted/screens/RubikScreenBase.java | ||
---|---|---|
30 | 30 |
|
31 | 31 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
32 | 32 |
|
33 |
void createBottomPane(final RubikActivity act, TransparentImageButton left, TransparentImageButton right)
|
|
33 |
void createBottomPane(final RubikActivity act, TransparentImageButton butt)
|
|
34 | 34 |
{ |
35 | 35 |
mMovesController.clearMoves(act); |
36 | 36 |
|
... | ... | |
52 | 52 |
mLockController.setupButton(act,control); |
53 | 53 |
layoutMid.addView(mLockController.getButton()); |
54 | 54 |
|
55 |
if( left !=null ) layoutRight.addView(left); |
|
56 |
if( right!=null ) layoutRight.addView(right); |
|
55 |
if( butt !=null ) layoutRight.addView(butt); |
|
57 | 56 |
|
58 | 57 |
layoutBot.addView(layoutLeft); |
59 | 58 |
layoutBot.addView(layoutMid); |
src/main/java/org/distorted/screens/RubikScreenPlay.java | ||
---|---|---|
116 | 116 |
|
117 | 117 |
// BOTTOM ///////////////////////// |
118 | 118 |
setupObjectButton(act,mScreenWidth); |
119 |
createBottomPane(act,mObjButton,null);
|
|
119 |
createBottomPane(act,mObjButton); |
|
120 | 120 |
} |
121 | 121 |
|
122 | 122 |
////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
133 | 133 |
@Override |
134 | 134 |
public void onClick(View view) |
135 | 135 |
{ |
136 |
if( mObjectPopup==null )
|
|
136 |
if( act.getControl().isScramblingAndSolvingNotBlocked() )
|
|
137 | 137 |
{ |
138 |
float width = act.getScreenWidthInPixels(); |
|
139 |
float height= act.getScreenHeightInPixels(); |
|
140 |
setupObjectWindow(act,width,height); |
|
141 |
} |
|
138 |
if( mObjectPopup==null ) |
|
139 |
{ |
|
140 |
float width = act.getScreenWidthInPixels(); |
|
141 |
float height= act.getScreenHeightInPixels(); |
|
142 |
setupObjectWindow(act,width,height); |
|
143 |
} |
|
142 | 144 |
|
143 |
int rowCount = Math.min(mMaxRowCount,mRowCount); |
|
144 |
View popupView = mObjectPopup.getContentView(); |
|
145 |
popupView.setSystemUiVisibility(RubikActivity.FLAGS); |
|
146 |
displayPopup(act,view,mObjectPopup,mObjectSize*mColCount,mObjectSize*rowCount+5*margin,margin,margin); |
|
145 |
int rowCount = Math.min(mMaxRowCount,mRowCount); |
|
146 |
View popupView = mObjectPopup.getContentView(); |
|
147 |
popupView.setSystemUiVisibility(RubikActivity.FLAGS); |
|
148 |
displayPopup(act,view,mObjectPopup,mObjectSize*mColCount,mObjectSize*rowCount+5*margin,margin,margin); |
|
149 |
} |
|
147 | 150 |
} |
148 | 151 |
}); |
149 | 152 |
} |
... | ... | |
161 | 164 |
@Override |
162 | 165 |
public void onClick(View view) |
163 | 166 |
{ |
164 |
if( mMenuPopup==null )
|
|
167 |
if( act.getControl().isScramblingAndSolvingNotBlocked() )
|
|
165 | 168 |
{ |
166 |
float width = act.getScreenWidthInPixels(); |
|
167 |
setupMenuWindow(act,width,height); |
|
168 |
} |
|
169 |
if( mMenuPopup==null ) |
|
170 |
{ |
|
171 |
float width = act.getScreenWidthInPixels(); |
|
172 |
setupMenuWindow(act,width,height); |
|
173 |
} |
|
169 | 174 |
|
170 |
View popupView = mMenuPopup.getContentView(); |
|
171 |
popupView.setSystemUiVisibility(RubikActivity.FLAGS); |
|
172 |
setupLevelButtonVisibilityAndColor(act); |
|
173 |
displayPopup(act,view,mMenuPopup,mMenuLayoutWidth,mMenuLayoutHeight,(int)(-mMenuLayoutWidth/2 + width/6),0); |
|
175 |
View popupView = mMenuPopup.getContentView(); |
|
176 |
popupView.setSystemUiVisibility(RubikActivity.FLAGS); |
|
177 |
setupLevelButtonVisibilityAndColor(act); |
|
178 |
displayPopup(act,view,mMenuPopup,mMenuLayoutWidth,mMenuLayoutHeight,(int)(-mMenuLayoutWidth/2 + width/6),0); |
|
179 |
} |
|
174 | 180 |
} |
175 | 181 |
}); |
176 | 182 |
} |
src/main/java/org/distorted/screens/RubikScreenReady.java | ||
---|---|---|
50 | 50 |
layoutTop.addView(label); |
51 | 51 |
|
52 | 52 |
setupBackButton(act); |
53 |
createBottomPane(act,mBackButton,null);
|
|
53 |
createBottomPane(act,mBackButton); |
|
54 | 54 |
} |
55 | 55 |
|
56 | 56 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/screens/RubikScreenSolving.java | ||
---|---|---|
75 | 75 |
layoutTop.addView(mTime); |
76 | 76 |
|
77 | 77 |
setupBackButton(act); |
78 |
createBottomPane(act,mBackButton,null);
|
|
78 |
createBottomPane(act,mBackButton); |
|
79 | 79 |
} |
80 | 80 |
|
81 | 81 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Block the object, menu & back moves while we're scrambling!