diff --git a/app/src/main/java/com/rubenvandeven/emotionhero/GamingActivity.java b/app/src/main/java/com/rubenvandeven/emotionhero/GamingActivity.java index b00ee59..458fca9 100644 --- a/app/src/main/java/com/rubenvandeven/emotionhero/GamingActivity.java +++ b/app/src/main/java/com/rubenvandeven/emotionhero/GamingActivity.java @@ -88,6 +88,7 @@ public class GamingActivity extends AppCompatActivity implements Detector.ImageL mContentView = (TextView) findViewById(R.id.fullscreen_content); RelativeLayout videoLayout = (RelativeLayout) findViewById(R.id.video_layout); + TextView titleText = (TextView) findViewById(R.id.titleText); //We create a custom SurfaceView that resizes itself to match the aspect ratio of the incoming camera frames cameraPreview = new SurfaceView(this) { @@ -143,6 +144,7 @@ public class GamingActivity extends AppCompatActivity implements Detector.ImageL // currentScenario = new ScenarioAnger(this); currentScenario = new Scenario(scenarioLvlId, this); + currentScenario.init(); // "start the clock"... scenarioView = new ScenarioView(this, currentScenario); @@ -159,6 +161,8 @@ public class GamingActivity extends AppCompatActivity implements Detector.ImageL Typeface font = Typeface.createFromAsset(getAssets(), "unifont-9.0.02.ttf"); mContentView.setTypeface(font); + titleText.setText(currentScenario.game.toString()); + titleText.setTypeface(font); } public void startGame() { diff --git a/app/src/main/res/layout/activity_gaming.xml b/app/src/main/res/layout/activity_gaming.xml index 35cdd1d..80133e7 100644 --- a/app/src/main/res/layout/activity_gaming.xml +++ b/app/src/main/res/layout/activity_gaming.xml @@ -30,21 +30,11 @@ android:paddingBottom="100dp" /> - - - - - +