24 |
24 |
import android.graphics.drawable.BitmapDrawable;
|
25 |
25 |
import android.os.Build;
|
26 |
26 |
import android.os.Bundle;
|
|
27 |
import android.util.DisplayMetrics;
|
27 |
28 |
import android.util.TypedValue;
|
28 |
29 |
import android.view.Gravity;
|
29 |
30 |
import android.view.LayoutInflater;
|
... | ... | |
73 |
74 |
private AppCompatSpinner mLevelSpinner;
|
74 |
75 |
private ArrayAdapter<String> mSpinnerAdapter;
|
75 |
76 |
private int mLevelValue;
|
|
77 |
private int mBarHeight;
|
76 |
78 |
private float mButtonSize, mTitleSize, mMenuItemSize, mMenuTextSize;
|
77 |
79 |
|
78 |
80 |
private ArrayList<Move> mMoves;
|
... | ... | |
285 |
287 |
mMenuButton.setPadding(padding,0,padding,0);
|
286 |
288 |
mMenuButton.setImageResource(icon);
|
287 |
289 |
|
288 |
|
final int barHeight = act.getScreenHeightInPixels()/10;
|
289 |
|
|
290 |
290 |
mMenuButton.setOnClickListener( new View.OnClickListener()
|
291 |
291 |
{
|
292 |
292 |
@Override
|
... | ... | |
294 |
294 |
{
|
295 |
295 |
if( act.getPreRender().canPlay() )
|
296 |
296 |
{
|
297 |
|
mMenuPopup.showAsDropDown(view, 0, -mMenuLayoutHeight-barHeight, Gravity.LEFT);
|
|
297 |
if( mBarHeight<=0 )
|
|
298 |
{
|
|
299 |
DisplayMetrics displaymetrics = new DisplayMetrics();
|
|
300 |
act.getWindowManager().getDefaultDisplay().getMetrics(displaymetrics);
|
|
301 |
mBarHeight=displaymetrics.heightPixels/10;
|
|
302 |
}
|
|
303 |
|
|
304 |
mMenuPopup.showAsDropDown(view, 0, -mMenuLayoutHeight-mBarHeight, Gravity.LEFT);
|
298 |
305 |
mMenuPopup.update(view, mMenuLayoutWidth, mMenuLayoutHeight);
|
299 |
306 |
}
|
300 |
307 |
}
|
Fix: nwo we need to explicitly set mesh center to negative Z if we want to GLOW a flat object.