Skip to content

Commit 6c30973

Browse files
author
Jesse Tilro
committed
Fix Plasma Leak Minigame Layout.
This layout was not understood well by nearly all players during the usability experiment, so I cleaned it up a bit.
1 parent a29a93c commit 6c30973

File tree

3 files changed

+42
-37
lines changed

3 files changed

+42
-37
lines changed

app/src/main/java/nl/tudelft/pixelperfect/pixelperfect/minigame/PlasmaLeakActivity.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class PlasmaLeakActivity extends PixelPerfectActivity{
3636
@Override
3737
protected void initialize(Bundle savedInstanceState) {
3838
setContentView(R.layout.activity_minigame_plasma_leak);
39-
progress = (ProgressBar) findViewById(R.id.mini_game_progress_bar);
39+
progress = (ProgressBar) findViewById(R.id.progressbar);
4040
removedBolts = 0;
4141
}
4242

app/src/main/res/layout/activity_minigame_plasma_leak.xml

+40-36
Original file line numberDiff line numberDiff line change
@@ -10,34 +10,28 @@
1010
android:layout_height="match_parent"
1111
android:weightSum="1">
1212

13-
<Button
13+
<TextView
1414
android:layout_width="wrap_content"
1515
android:layout_height="wrap_content"
16-
android:text="@string/button_complete_plasma_leak_minigame"
17-
android:layout_marginBottom="20dp"
18-
android:onClick="complete"
19-
android:id="@+id/button_complete_plasma"
20-
android:layout_alignParentBottom="true"
21-
android:layout_centerHorizontal="true" />
16+
android:text="@string/description_plasma_leak_minigame"
17+
android:clickable="false"
18+
android:id="@+id/textView"
19+
android:layout_alignParentTop="true"
20+
android:layout_margin="16dp"/>
2221

23-
<ProgressBar
24-
style="?android:attr/progressBarStyleHorizontal"
25-
android:layout_width="wrap_content"
22+
<RelativeLayout
23+
android:layout_width="match_parent"
2624
android:layout_height="wrap_content"
27-
android:id="@+id/mini_game_progress_bar"
28-
android:minHeight="20dp"
29-
android:minWidth="300dp"
30-
android:clickable="false"
31-
android:layout_above="@+id/button_complete_plasma"
32-
android:layout_centerHorizontal="true" />
25+
android:layout_below="@id/textView"
26+
android:id="@+id/input_section"
27+
android:paddingLeft="16dp"
28+
android:paddingRight="16dp">
3329

3430
<RadioGroup
3531
android:layout_width="match_parent"
3632
android:layout_height="match_parent"
3733
android:layout_alignParentLeft="true"
38-
android:layout_alignParentStart="true"
39-
android:layout_marginLeft="52dp"
40-
android:layout_marginTop="52dp">
34+
android:layout_alignParentStart="true">
4135
<RadioButton android:id="@+id/radio1"
4236
android:layout_width="wrap_content"
4337
android:layout_height="wrap_content"
@@ -67,41 +61,51 @@
6761
android:text="Remove Bolts"
6862
android:id="@+id/button"
6963
android:layout_alignParentTop="true"
70-
android:layout_marginTop="20dp"
71-
android:onClick="removeBolts"
72-
android:layout_toRightOf="@+id/button_complete_plasma"
73-
android:layout_toEndOf="@+id/button_complete_plasma" />
64+
android:layout_alignParentRight="true"
65+
android:onClick="removeBolts" />
7466

7567
<Button
7668
android:layout_width="wrap_content"
7769
android:layout_height="wrap_content"
7870
android:text="Repair Pipes"
7971
android:id="@+id/button2"
72+
android:layout_alignParentRight="true"
8073
android:layout_below="@id/button"
81-
android:onClick="repairPipe"
82-
android:layout_toRightOf="@+id/button_complete_plasma"
83-
android:layout_toEndOf="@+id/button_complete_plasma" />
74+
android:onClick="repairPipe" />
8475

8576
<Button
8677
android:layout_width="wrap_content"
8778
android:layout_height="wrap_content"
8879
android:text="Insert Bolts"
8980
android:id="@+id/button3"
9081
android:onClick="insertBolts"
91-
android:layout_below="@id/button2"
92-
android:layout_toRightOf="@+id/button_complete_plasma"
93-
android:layout_toEndOf="@+id/button_complete_plasma" />
82+
android:layout_alignParentRight="true"
83+
android:layout_below="@id/button2" />
9484

95-
<TextView
85+
</RelativeLayout>
86+
87+
<ProgressBar
88+
style="?android:attr/progressBarStyleHorizontal"
9689
android:layout_width="wrap_content"
97-
android:layout_height="148dp"
98-
android:text="INSTRUCTIONS: \n\n Select room \n Remove 5 bolts \n Repair pipe 10 times \n Re-insert the bolts"
90+
android:layout_height="wrap_content"
91+
android:id="@+id/progressbar"
92+
android:minHeight="10dp"
93+
android:minWidth="300dp"
94+
android:layout_marginTop="16dp"
9995
android:clickable="false"
100-
android:id="@+id/textView"
101-
android:layout_alignBottom="@+id/button3"
102-
android:layout_alignLeft="@+id/mini_game_progress_bar"
103-
android:layout_alignStart="@+id/mini_game_progress_bar" />
96+
android:layout_below="@+id/input_section"
97+
android:layout_centerHorizontal="true" />
10498

99+
<Button
100+
android:layout_width="wrap_content"
101+
android:layout_height="wrap_content"
102+
android:text="@string/button_complete_plasma_leak_minigame"
103+
android:layout_marginTop="16dp"
104+
android:layout_marginBottom="16dp"
105+
android:onClick="complete"
106+
android:id="@+id/button_complete_plasma"
107+
android:layout_below="@id/progressbar"
108+
android:layout_centerHorizontal="true" />
105109

106110
</RelativeLayout>
107111
</ScrollView>

app/src/main/res/values/strings.xml

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
<string name="button_start_plasma_leak_minigame">Stop Plasma Leak</string>
2626
<string name="button_complete_plasma_leak_minigame">Fix Pipes</string>
27+
<string name="description_plasma_leak_minigame">Select the location of the leak on the left. Then press each button on right a couple of times until the progress bar is full.</string>
2728

2829
<string name="button_role_gunner">Gunner</string>
2930
<string name="button_role_engineer">Engineer</string>

0 commit comments

Comments
 (0)