Project

General

Profile

« Previous | Next » 

Revision 3c27ff9e

Added by Leszek Koltunski over 2 years ago

Progress with central menu popup.
What remains is the colors in the Menu Level Buttons

View differences:

src/main/java/org/distorted/main/RubikActivity.java
84 84
    public static final float TUTORIAL_ITEM_TEXT  = 0.100f;
85 85
    public static final float DIALOG_BUTTON_SIZE  = 0.06f;
86 86
    public static final float MENU_BIG_TEXT_SIZE  = 0.05f;
87
    public static final float MENU_MAIN_TEXT_SIZE = 0.047f;
87 88
    public static final float MENU_MED_TEXT_SIZE  = 0.04f;
88 89
    public static final float MENU_SMALL_TEXT_SIZE= 0.035f;
89 90
    public static final float TAB_WIDTH           = 0.100f;
src/main/java/org/distorted/screens/RubikScreenPlay.java
94 94
    mUpperBarHeight = act.getHeightUpperBar();
95 95

  
96 96
    mMenuButtonHeight = (int)(mScreenWidth*RubikActivity.MENU_BUTTON_HEIGHT);
97
    mMenuTextSize     = (int)(mScreenWidth*RubikActivity.MENU_BIG_TEXT_SIZE);
97
    mMenuTextSize     = (int)(mScreenWidth*RubikActivity.MENU_MAIN_TEXT_SIZE);
98 98

  
99 99
    mRowCount = (numObjects + NUM_COLUMNS-1) / NUM_COLUMNS;
100 100
    mColCount = NUM_COLUMNS;
......
151 151

  
152 152
  private void setupMenuButton(final RubikActivity act, final float width)
153 153
    {
154
    final int margin = (int)(width*RubikActivity.SMALL_MARGIN);
155 154
    final int icon = RubikActivity.getDrawable(R.drawable.ui_small_menu,R.drawable.ui_medium_menu, R.drawable.ui_big_menu, R.drawable.ui_huge_menu);
156 155
    LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,LinearLayout.LayoutParams.MATCH_PARENT,1.0f);
157 156
    mMenuButton = new TransparentImageButton(act, icon, TransparentImageButton.GRAVITY_MIDDLE, params);
......
171 170
          {
172 171
          View popupView = mMenuPopup.getContentView();
173 172
          popupView.setSystemUiVisibility(RubikActivity.FLAGS);
174
          displayPopup(act,view,mMenuPopup,mMenuLayoutWidth,mMenuLayoutHeight,(int)(-mMenuLayoutWidth/2 + width/6),margin);
173
          displayPopup(act,view,mMenuPopup,mMenuLayoutWidth,mMenuLayoutHeight,(int)(-mMenuLayoutWidth/2 + width/6),0);
175 174
          }
176 175
        }
177 176
      });
......
466 465
  private void setupLevelButtons(RubikActivity act, View layout, int padding)
467 466
    {
468 467
    int sizeW = (mMenuLayoutWidth-4*padding)/3;
469
    int sizeH = (int)(sizeW*0.85f);
468
    int sizeH = (int)(sizeW*0.8f);
470 469
    LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(sizeW,sizeH);
471 470
    params.setMargins(padding/2,0,padding/2,0);
472 471

  

Also available in: Unified diff