Project

General

Profile

« Previous | Next » 

Revision c95b37a4

Added by Leszek Koltunski over 1 year ago

Block the object, menu & back moves while we're scrambling!

View differences:

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
    }

Also available in: Unified diff