patch resolution image

This commit is contained in:
marc
2020-09-14 13:41:00 +02:00
parent df32e45c7e
commit a7e72f96f1
5 changed files with 24 additions and 8 deletions
Binary file not shown.
+20
View File
@@ -0,0 +1,20 @@
{
"version": 1,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "com.iutlaval.myapplication",
"variantName": "release",
"elements": [
{
"type": "SINGLE",
"filters": [],
"properties": [],
"versionCode": 1,
"versionName": "1.0",
"enabled": true,
"outputFile": "app-release.apk"
}
]
}
@@ -61,15 +61,8 @@ public class GameActivity extends Activity {
@Override
public boolean onTouchEvent(MotionEvent event) {
if(gameEngine != null)gameEngine.onTouchEvent(event);
System.out.println(event.getX());
return super.onTouchEvent(event);
}
@Override
public boolean onGenericMotionEvent(MotionEvent event) {
System.out.println(event.getX());
return super.onGenericMotionEvent(event);
}
}
@@ -11,6 +11,7 @@ import android.view.SurfaceView;
import androidx.annotation.NonNull;
import com.iutlaval.myapplication.Game.GameLogicThread;
import com.iutlaval.myapplication.GameActivity;
import com.iutlaval.myapplication.Video.Drawables.Drawable;
import com.iutlaval.myapplication.Video.Drawables.DrawableCard;
@@ -67,7 +68,9 @@ public class Renderer extends SurfaceView implements SurfaceHolder.Callback {
*/
@Override
public void surfaceChanged(@NonNull SurfaceHolder surfaceHolder, int i, int i1, int i2) {
//mise a jour de la valleur de la resolution car la premiere obtenus est inexact et prends en compte la bare menu
GameActivity.screenHeight=surfaceHolder.getSurfaceFrame().height();
GameActivity.screenWidth=surfaceHolder.getSurfaceFrame().width();
}
/**
Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 21 KiB