author | Xeli |
Fri, 19 Aug 2011 22:31:59 +0200 | |
branch | hedgeroid |
changeset 5613 | a7e40b20ce44 |
parent 5607 | d3a3e80ad1da |
child 5621 | ea796c83ea47 |
permissions | -rw-r--r-- |
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
1 |
package org.hedgewars.mobile; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
2 |
|
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
3 |
import java.io.File; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
4 |
import java.io.FileNotFoundException; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
5 |
import java.io.FileOutputStream; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
6 |
import java.io.IOException; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
7 |
import java.util.ArrayList; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
8 |
import java.util.HashMap; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
9 |
|
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
10 |
import org.hedgewars.mobile.EngineProtocol.FrontendDataUtils; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
11 |
import org.hedgewars.mobile.EngineProtocol.Team; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
12 |
|
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
13 |
import android.app.Activity; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
14 |
import android.graphics.Bitmap; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
15 |
import android.graphics.drawable.Drawable; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
16 |
import android.media.MediaPlayer; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
17 |
import android.os.Bundle; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
18 |
import android.view.View; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
19 |
import android.view.View.OnClickListener; |
5542
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
20 |
import android.view.View.OnFocusChangeListener; |
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
21 |
import android.widget.AdapterView; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
22 |
import android.widget.AdapterView.OnItemSelectedListener; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
23 |
import android.widget.ArrayAdapter; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
24 |
import android.widget.EditText; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
25 |
import android.widget.ImageButton; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
26 |
import android.widget.ImageView; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
27 |
import android.widget.LinearLayout; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
28 |
import android.widget.RelativeLayout; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
29 |
import android.widget.ScrollView; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
30 |
import android.widget.SimpleAdapter; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
31 |
import android.widget.Spinner; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
32 |
import android.widget.TextView; |
5613 | 33 |
import android.widget.Toast; |
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
34 |
|
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
35 |
public class TeamCreatorActivity extends Activity { |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
36 |
|
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
37 |
private TextView name; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
38 |
private Spinner difficulty, grave, flag, voice, fort; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
39 |
private ImageView imgFort; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
40 |
private ArrayList<ImageButton> hogDice = new ArrayList<ImageButton>(); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
41 |
private ArrayList<Spinner> hogHat = new ArrayList<Spinner>(); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
42 |
private ArrayList<EditText> hogName = new ArrayList<EditText>(); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
43 |
private ImageButton back, save, voiceButton; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
44 |
private ScrollView scroller; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
45 |
private MediaPlayer mp = null; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
46 |
private ArrayList<RelativeLayout> hogs; |
5542
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
47 |
private boolean settingsChanged = false; |
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
48 |
private boolean saved = false; |
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
49 |
|
5613 | 50 |
public void onCreate(Bundle savedInstanceState) { |
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
51 |
super.onCreate(savedInstanceState); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
52 |
setContentView(R.layout.team_creation); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
53 |
|
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
54 |
name = (TextView) findViewById(R.id.txtName); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
55 |
difficulty = (Spinner) findViewById(R.id.spinType); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
56 |
grave = (Spinner) findViewById(R.id.spinGrave); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
57 |
flag = (Spinner) findViewById(R.id.spinFlag); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
58 |
voice = (Spinner) findViewById(R.id.spinVoice); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
59 |
fort = (Spinner) findViewById(R.id.spinFort); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
60 |
|
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
61 |
imgFort = (ImageView) findViewById(R.id.imgFort); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
62 |
|
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
63 |
back = (ImageButton) findViewById(R.id.btnBack); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
64 |
save = (ImageButton) findViewById(R.id.btnSave); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
65 |
voiceButton = (ImageButton) findViewById(R.id.btnPlay); |
5542
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
66 |
|
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
67 |
scroller = (ScrollView) findViewById(R.id.scroller); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
68 |
|
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
69 |
save.setOnClickListener(saveClicker); |
5542
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
70 |
back.setOnClickListener(backClicker); |
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
71 |
|
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
72 |
LinearLayout ll = (LinearLayout) findViewById(R.id.HogsContainer); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
73 |
hogs = new ArrayList<RelativeLayout>(ll.getChildCount()); |
5613 | 74 |
for (int i = 0; i < ll.getChildCount(); i++) { |
75 |
RelativeLayout team_creation_entry = (RelativeLayout) ll |
|
76 |
.getChildAt(i); |
|
5542
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
77 |
|
5613 | 78 |
hogHat.add((Spinner) team_creation_entry |
79 |
.findViewById(R.id.spinTeam1)); |
|
80 |
hogDice.add((ImageButton) team_creation_entry |
|
81 |
.findViewById(R.id.btnTeam1)); |
|
82 |
hogName.add((EditText) team_creation_entry |
|
83 |
.findViewById(R.id.txtTeam1)); |
|
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
84 |
} |
5613 | 85 |
ArrayList<HashMap<String, ?>> gravesData = FrontendDataUtils |
86 |
.getGraves(this); |
|
87 |
SimpleAdapter sa = new SimpleAdapter(this, gravesData, |
|
88 |
R.layout.spinner_textimg_entry, new String[] { "txt", "img" }, |
|
89 |
new int[] { R.id.spinner_txt, R.id.spinner_img }); |
|
90 |
||
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
91 |
sa.setViewBinder(viewBinder); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
92 |
grave.setAdapter(sa); |
5542
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
93 |
grave.setOnFocusChangeListener(focusser); |
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
94 |
|
5613 | 95 |
ArrayList<HashMap<String, ?>> flagsData = FrontendDataUtils |
96 |
.getFlags(this); |
|
97 |
sa = new SimpleAdapter(this, flagsData, R.layout.spinner_textimg_entry, |
|
98 |
new String[] { "txt", "img" }, new int[] { R.id.spinner_txt, |
|
99 |
R.id.spinner_img }); |
|
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
100 |
sa.setViewBinder(viewBinder); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
101 |
flag.setAdapter(sa); |
5542
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
102 |
flag.setOnFocusChangeListener(focusser); |
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
103 |
|
5613 | 104 |
ArrayList<HashMap<String, ?>> typesData = FrontendDataUtils |
105 |
.getTypes(this); |
|
106 |
sa = new SimpleAdapter(this, typesData, R.layout.spinner_textimg_entry, |
|
107 |
new String[] { "txt", "img" }, new int[] { R.id.spinner_txt, |
|
108 |
R.id.spinner_img }); |
|
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
109 |
difficulty.setAdapter(sa); |
5542
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
110 |
difficulty.setOnFocusChangeListener(focusser); |
5613 | 111 |
|
112 |
ArrayList<HashMap<String, ?>> hatsData = FrontendDataUtils |
|
113 |
.getHats(this); |
|
114 |
sa = new SimpleAdapter(this, hatsData, R.layout.spinner_textimg_entry, |
|
115 |
new String[] { "txt", "img" }, new int[] { R.id.spinner_txt, |
|
116 |
R.id.spinner_img }); |
|
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
117 |
sa.setViewBinder(viewBinder); |
5613 | 118 |
for (Spinner spin : hogHat) { |
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
119 |
spin.setAdapter(sa); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
120 |
} |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
121 |
|
5613 | 122 |
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, |
123 |
R.layout.listview_item, FrontendDataUtils.getVoices(this)); |
|
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
124 |
voice.setAdapter(adapter); |
5542
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
125 |
voice.setOnFocusChangeListener(focusser); |
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
126 |
voiceButton.setOnClickListener(voiceClicker); |
5542
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
127 |
|
5613 | 128 |
adapter = new ArrayAdapter<String>(this, R.layout.listview_item, |
129 |
FrontendDataUtils.getForts(this)); |
|
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
130 |
fort.setAdapter(adapter); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
131 |
fort.setOnItemSelectedListener(fortSelector); |
5542
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
132 |
fort.setOnFocusChangeListener(focusser); |
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
133 |
|
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
134 |
Team t = this.getIntent().getParcelableExtra("team"); |
5613 | 135 |
if (t != null) { |
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
136 |
name.setText(t.name); |
5613 | 137 |
int position = ((ArrayAdapter<String>) voice.getAdapter()) |
138 |
.getPosition(t.voice); |
|
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
139 |
voice.setSelection(position); |
5542
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
140 |
|
5613 | 141 |
position = ((ArrayAdapter<String>) fort.getAdapter()) |
142 |
.getPosition(t.fort); |
|
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
143 |
fort.setSelection(position); |
5542
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
144 |
|
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
145 |
position = 0; |
5613 | 146 |
for (HashMap<String, ?> hashmap : typesData) { |
147 |
if (hashmap.get("txt").equals(t.levels[0])) { |
|
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
148 |
difficulty.setSelection(position); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
149 |
break; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
150 |
} |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
151 |
} |
5542
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
152 |
|
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
153 |
position = 0; |
5613 | 154 |
for (HashMap<String, ?> hashmap : gravesData) { |
155 |
if (hashmap.get("txt").equals(t.grave)) { |
|
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
156 |
grave.setSelection(position); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
157 |
break; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
158 |
} |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
159 |
} |
5542
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
160 |
|
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
161 |
position = 0; |
5613 | 162 |
for (HashMap<String, ?> hashmap : typesData) { |
163 |
if (hashmap.get("txt").equals(t.flag)) { |
|
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
164 |
flag.setSelection(position); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
165 |
break; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
166 |
} |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
167 |
} |
5542
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
168 |
|
5613 | 169 |
for (int i = 0; i < Team.maxNumberOfHogs; i++) { |
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
170 |
position = 0; |
5613 | 171 |
for (HashMap<String, ?> hashmap : hatsData) { |
172 |
if (hashmap.get("txt").equals(t.hats[i])) { |
|
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
173 |
hogHat.get(i).setSelection(position); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
174 |
} |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
175 |
} |
5542
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
176 |
|
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
177 |
hogName.get(i).setText(t.hogNames[i]); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
178 |
} |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
179 |
} |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
180 |
} |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
181 |
|
5613 | 182 |
public void onDestroy() { |
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
183 |
super.onDestroy(); |
5613 | 184 |
if (mp != null) { |
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
185 |
mp.release(); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
186 |
mp = null; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
187 |
} |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
188 |
} |
5542
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
189 |
|
5613 | 190 |
private OnFocusChangeListener focusser = new OnFocusChangeListener() { |
5542
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
191 |
public void onFocusChange(View v, boolean hasFocus) { |
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
192 |
settingsChanged = true; |
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
193 |
} |
5613 | 194 |
|
5542
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
195 |
}; |
5613 | 196 |
|
197 |
public void onBackPressed() { |
|
5542
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
198 |
onFinishing(); |
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
199 |
super.onBackPressed(); |
5613 | 200 |
|
5542
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
201 |
} |
5613 | 202 |
|
203 |
private OnClickListener backClicker = new OnClickListener() { |
|
204 |
public void onClick(View v) { |
|
5542
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
205 |
onFinishing(); |
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
206 |
finish(); |
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
207 |
} |
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
208 |
}; |
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
209 |
|
5613 | 210 |
private void onFinishing() { |
211 |
if (settingsChanged) { |
|
5542
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
212 |
setResult(RESULT_OK); |
5613 | 213 |
} else { |
5542
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
214 |
setResult(RESULT_CANCELED); |
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
215 |
} |
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
216 |
} |
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
217 |
|
5613 | 218 |
private OnClickListener saveClicker = new OnClickListener() { |
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
219 |
public void onClick(View v) { |
5613 | 220 |
Toast.makeText(TeamCreatorActivity.this, R.string.saved, Toast.LENGTH_SHORT); |
5542
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
221 |
saved = true; |
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
222 |
Team team = new Team(); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
223 |
team.name = name.getText().toString(); |
5613 | 224 |
HashMap<String, Object> hashmap = (HashMap<String, Object>) flag |
225 |
.getSelectedItem(); |
|
5542
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
226 |
|
5613 | 227 |
team.flag = (String) hashmap.get("txt"); |
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
228 |
team.fort = fort.getSelectedItem().toString(); |
5613 | 229 |
hashmap = (HashMap<String, Object>) grave.getSelectedItem(); |
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
230 |
team.grave = hashmap.get("txt").toString(); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
231 |
team.hash = "0"; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
232 |
team.voice = voice.getSelectedItem().toString(); |
5542
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
233 |
|
5613 | 234 |
hashmap = ((HashMap<String, Object>) difficulty.getSelectedItem()); |
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
235 |
String levelString = hashmap.get("txt").toString(); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
236 |
int levelInt; |
5613 | 237 |
if (levelString.equals(getString(R.string.human))) { |
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
238 |
levelInt = 0; |
5613 | 239 |
} else if (levelString.equals(getString(R.string.bot5))) { |
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
240 |
levelInt = 1; |
5613 | 241 |
} else if (levelString.equals(getString(R.string.bot4))) { |
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
242 |
levelInt = 2; |
5613 | 243 |
} else if (levelString.equals(getString(R.string.bot3))) { |
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
244 |
levelInt = 3; |
5613 | 245 |
} else if (levelString.equals(getString(R.string.bot2))) { |
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
246 |
levelInt = 4; |
5613 | 247 |
} else { |
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
248 |
levelInt = 5; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
249 |
} |
5542
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
250 |
|
5613 | 251 |
for (int i = 0; i < hogName.size(); i++) { |
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
252 |
team.hogNames[i] = hogName.get(i).getText().toString(); |
5613 | 253 |
hashmap = (HashMap<String, Object>) hogHat.get(i) |
254 |
.getSelectedItem(); |
|
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
255 |
team.hats[i] = hashmap.get("txt").toString(); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
256 |
team.levels[i] = levelInt; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
257 |
} |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
258 |
try { |
5613 | 259 |
File teamsDir = new File(getFilesDir().getAbsolutePath() + '/' |
260 |
+ Team.DIRECTORY_TEAMS); |
|
261 |
if (!teamsDir.exists()) |
|
262 |
teamsDir.mkdir(); |
|
263 |
FileOutputStream fos = new FileOutputStream(String.format( |
|
264 |
"%s/%s.xml", teamsDir.getAbsolutePath(), team.name)); |
|
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
265 |
team.writeToXml(fos); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
266 |
} catch (FileNotFoundException e) { |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
267 |
e.printStackTrace(); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
268 |
} |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
269 |
} |
5542
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
270 |
|
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
271 |
}; |
5542
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
272 |
|
5613 | 273 |
private OnItemSelectedListener fortSelector = new OnItemSelectedListener() { |
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
274 |
@SuppressWarnings("unchecked") |
5613 | 275 |
public void onItemSelected(AdapterView<?> arg0, View arg1, |
276 |
int position, long arg3) { |
|
5542
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
277 |
settingsChanged = true; |
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
278 |
String fortName = (String) arg0.getAdapter().getItem(position); |
5613 | 279 |
Drawable fortIconDrawable = Drawable.createFromPath(Utils |
280 |
.getDownloadPath(TeamCreatorActivity.this) |
|
281 |
+ "Forts/" |
|
282 |
+ fortName + "L.png"); |
|
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
283 |
imgFort.setImageDrawable(fortIconDrawable); |
5613 | 284 |
scroller.fullScroll(ScrollView.FOCUS_DOWN);// Scroll the scrollview |
285 |
// to the bottom, work |
|
286 |
// around for scollview |
|
287 |
// invalidation (scrolls |
|
288 |
// back to top) |
|
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
289 |
} |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
290 |
|
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
291 |
public void onNothingSelected(AdapterView<?> arg0) { |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
292 |
} |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
293 |
|
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
294 |
}; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
295 |
|
5613 | 296 |
private OnClickListener voiceClicker = new OnClickListener() { |
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
297 |
public void onClick(View v) { |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
298 |
try { |
5613 | 299 |
File dir = new File(String.format("%sSounds/voices/%s", |
300 |
Utils.getDownloadPath(TeamCreatorActivity.this), |
|
301 |
voice.getSelectedItem())); |
|
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
302 |
String file = ""; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
303 |
File[] dirs = dir.listFiles(); |
5613 | 304 |
File f = dirs[(int) Math.round(Math.random() * dirs.length)]; |
305 |
if (f.getName().endsWith(".ogg")) |
|
306 |
file = f.getAbsolutePath(); |
|
5542
141c12a23787
start of implementation of the save button, check if there's something to save and update TeamSelectionActivity if a change has been made
Xeli
parents:
5467
diff
changeset
|
307 |
|
5613 | 308 |
if (mp == null) |
309 |
mp = new MediaPlayer(); |
|
310 |
else |
|
311 |
mp.reset(); |
|
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
312 |
mp.setDataSource(file); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
313 |
mp.prepare(); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
314 |
mp.start(); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
315 |
} catch (IllegalArgumentException e) { |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
316 |
e.printStackTrace(); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
317 |
} catch (IllegalStateException e) { |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
318 |
e.printStackTrace(); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
319 |
} catch (IOException e) { |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
320 |
e.printStackTrace(); |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
321 |
} |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
322 |
} |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
323 |
}; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
324 |
|
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
325 |
private SimpleAdapter.ViewBinder viewBinder = new SimpleAdapter.ViewBinder() { |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
326 |
|
5613 | 327 |
public boolean setViewValue(View view, Object data, |
328 |
String textRepresentation) { |
|
329 |
if (view instanceof ImageView && data instanceof Bitmap) { |
|
330 |
ImageView v = (ImageView) view; |
|
331 |
v.setImageBitmap((Bitmap) data); |
|
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
332 |
return true; |
5613 | 333 |
} else { |
5467
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
334 |
return false; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
335 |
} |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
336 |
} |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
337 |
}; |
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
338 |
|
88e25840f532
Main activities for starting up the game, changing gameconfig, selecting and creating teams with their respective layouts and values
Xeli
parents:
diff
changeset
|
339 |
} |