Revision b1178f5f
Added by Leszek Koltunski almost 2 years ago
src/main/java/org/distorted/bandaged/BandagedPlayView.java | ||
---|---|---|
40 | 40 |
{ |
41 | 41 |
mScreenWidth = width; |
42 | 42 |
mScreenHeight= height; |
43 |
mObjectController.setScreenSize(width,height);
|
|
43 |
mObjectController.setScreenSizeAndScaling(width,height, Math.min(width, (int)(0.75f*height)) );
|
|
44 | 44 |
mObjectController.setObjectScale(1.00f); |
45 | 45 |
|
46 | 46 |
if( !mCreated ) |
src/main/java/org/distorted/config/ConfigSurfaceView.java | ||
---|---|---|
36 | 36 |
{ |
37 | 37 |
mScreenWidth = width; |
38 | 38 |
mScreenHeight= height; |
39 |
mObjectController.setScreenSize(width,height);
|
|
39 |
mObjectController.setScreenSizeAndScaling(width,height, Math.min(width,height));
|
|
40 | 40 |
mObjectController.setObjectScale(1.00f); |
41 | 41 |
|
42 | 42 |
if( !mCreated ) |
src/main/java/org/distorted/main/RubikSurfaceView.java | ||
---|---|---|
44 | 44 |
{ |
45 | 45 |
mScreenWidth = width; |
46 | 46 |
mScreenHeight= height; |
47 |
mObjectController.setScreenSize(width,height);
|
|
47 |
mObjectController.setScreenSizeAndScaling(width,height, Math.min(width, (int)(0.75f*height)));
|
|
48 | 48 |
|
49 | 49 |
if( !mCreated ) |
50 | 50 |
{ |
src/main/java/org/distorted/overlays/OverlayStars.java | ||
---|---|---|
218 | 218 |
MeshJoined wholeMesh = new MeshJoined(mesh); |
219 | 219 |
|
220 | 220 |
DistortedEffects effects = new DistortedEffects(); |
221 |
VertexEffectScale scaleE = new VertexEffectScale(mWidth*0.15f);
|
|
221 |
VertexEffectScale scaleE = new VertexEffectScale(mHeight*0.10f);
|
|
222 | 222 |
scaleE.setMeshAssociation(1,-1); |
223 | 223 |
effects.apply(scaleE); |
224 | 224 |
|
... | ... | |
249 | 249 |
MeshQuad mesh = new MeshQuad(); |
250 | 250 |
|
251 | 251 |
DistortedEffects effects = new DistortedEffects(); |
252 |
float scaleM = mWidth*0.40f;
|
|
252 |
float scaleM = mHeight*0.24f;
|
|
253 | 253 |
Static3D moveM= new Static3D(0,0,1); |
254 | 254 |
MatrixEffectMove move = new MatrixEffectMove(moveM); |
255 | 255 |
MatrixEffectScale scale= new MatrixEffectScale(scaleM); |
src/main/java/org/distorted/purchase/PurchaseSurfaceView.java | ||
---|---|---|
33 | 33 |
|
34 | 34 |
void setScreenSize(int width, int height) |
35 | 35 |
{ |
36 |
mObjectController.setScreenSize(width,height);
|
|
36 |
mObjectController.setScreenSizeAndScaling(width,height, Math.min(width,height));
|
|
37 | 37 |
mObjectController.setObjectScale(1.00f); |
38 | 38 |
|
39 | 39 |
if( !mCreated ) |
src/main/java/org/distorted/tutorials/TutorialSurfaceView.java | ||
---|---|---|
40 | 40 |
{ |
41 | 41 |
mScreenWidth = width; |
42 | 42 |
mScreenHeight= height; |
43 |
mObjectController.setScreenSize(width,height);
|
|
43 |
mObjectController.setScreenSizeAndScaling(width,height, Math.min(width,height));
|
|
44 | 44 |
mObjectController.setObjectMove( (int)(-0.5f*width*TutorialActivity.BAR_RATIO), 0); |
45 | 45 |
mObjectController.setObjectScale(0.80f); |
46 | 46 |
|
Also available in: Unified diff
Move the control of object scaling out the objectlib.
Thee xact way the object is scaled needs to be decided in the app, as only the app knows that e.g. in the Rubik main screen, if it is a square, then obejct needs to be a bit smaller than in case of Config screen (if that one happens to be a square)