Introducing autogeneration
This commit is contained in:
parent
7cc93f960d
commit
7d3b032f89
7 changed files with 367 additions and 157 deletions
|
@ -13,7 +13,8 @@ import android.widget.Toast;
|
||||||
|
|
||||||
public class Introduction extends ActionBarActivity {
|
public class Introduction extends ActionBarActivity {
|
||||||
|
|
||||||
EditText name, className, raceName, level, maxPg, curativeEfforts, maxCurativeEfforts, pgE;
|
EditText name, level;
|
||||||
|
EditText fue, con, des, sab, intel, car;
|
||||||
Spinner classSpinner, raceSpinner;
|
Spinner classSpinner, raceSpinner;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -22,19 +23,20 @@ public class Introduction extends ActionBarActivity {
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
setContentView(R.layout.activity_introduction);
|
setContentView(R.layout.activity_introduction);
|
||||||
name = (EditText) findViewById(R.id.editNameIntro);
|
name = (EditText) findViewById(R.id.editNameIntro);
|
||||||
className = (EditText) findViewById(R.id.editClassIntro);
|
|
||||||
raceName = (EditText) findViewById(R.id.editRaceIntro);
|
|
||||||
level = (EditText) findViewById(R.id.editLevelIntro);
|
level = (EditText) findViewById(R.id.editLevelIntro);
|
||||||
maxPg = (EditText) findViewById(R.id.editMaxPgIntro);
|
|
||||||
curativeEfforts = (EditText) findViewById(R.id.editEffortIntro);
|
fue = (EditText) findViewById(R.id.FUE);
|
||||||
maxCurativeEfforts = (EditText) findViewById(R.id.editMaxEffortIntro);
|
con = (EditText) findViewById(R.id.CON);
|
||||||
pgE = (EditText) findViewById(R.id.editPgIntro);
|
des = (EditText) findViewById(R.id.DES);
|
||||||
|
sab = (EditText) findViewById(R.id.SAB);
|
||||||
|
intel = (EditText) findViewById(R.id.INT);
|
||||||
|
car = (EditText) findViewById(R.id.CAR);
|
||||||
|
|
||||||
classSpinner = (Spinner) findViewById(R.id.classSpinner);
|
classSpinner = (Spinner) findViewById(R.id.classSpinner);
|
||||||
classSpinner.setAdapter(
|
classSpinner.setAdapter(
|
||||||
new ArrayAdapter<String>(
|
new ArrayAdapter<String>(
|
||||||
this,
|
this,
|
||||||
android.R.layout.simple_spinner_item,
|
android.R.layout.simple_spinner_dropdown_item,
|
||||||
Player.classStrings
|
Player.classStrings
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -43,7 +45,7 @@ public class Introduction extends ActionBarActivity {
|
||||||
raceSpinner.setAdapter(
|
raceSpinner.setAdapter(
|
||||||
new ArrayAdapter<String>(
|
new ArrayAdapter<String>(
|
||||||
this,
|
this,
|
||||||
android.R.layout.simple_spinner_item,
|
android.R.layout.simple_spinner_dropdown_item,
|
||||||
Player.raceStrings
|
Player.raceStrings
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -85,43 +87,54 @@ public class Introduction extends ActionBarActivity {
|
||||||
private boolean finished() {
|
private boolean finished() {
|
||||||
SharedPreferences p = getSharedPreferences("basics", MODE_PRIVATE);
|
SharedPreferences p = getSharedPreferences("basics", MODE_PRIVATE);
|
||||||
SharedPreferences.Editor ed = p.edit();
|
SharedPreferences.Editor ed = p.edit();
|
||||||
|
|
||||||
String nameString = name.getText().toString();
|
String nameString = name.getText().toString();
|
||||||
String classString = className.getText().toString();
|
String classString = Player.classStrings[classSpinner.getSelectedItemPosition()];
|
||||||
String raceString = raceName.getText().toString();
|
String raceString = Player.raceStrings[raceSpinner.getSelectedItemPosition()];
|
||||||
|
|
||||||
int levelInt = 0, maxPgInt = 0, pg = 0, curEff = 0, mCurEff = 0;
|
int levelInt = 0;
|
||||||
if (!level.getText().toString().isEmpty())
|
if (!level.getText().toString().isEmpty())
|
||||||
levelInt = Integer.parseInt(level.getText().toString());
|
levelInt = Integer.parseInt(level.getText().toString());
|
||||||
if (!maxPg.getText().toString().isEmpty())
|
|
||||||
maxPgInt = Integer.parseInt(maxPg.getText().toString());
|
int fue = 0, con = 0, des = 0, intel = 0, sab = 0, car = 0;
|
||||||
if (!pgE.getText().toString().isEmpty())
|
if (!this.car.getText().toString().isEmpty())
|
||||||
pg = Integer.parseInt(pgE.getText().toString());
|
car = Integer.parseInt(this.car.getText().toString());
|
||||||
if (!curativeEfforts.getText().toString().isEmpty())
|
if (!this.fue.getText().toString().isEmpty())
|
||||||
curEff = Integer.parseInt(curativeEfforts.getText().toString());
|
fue = Integer.parseInt(this.fue.getText().toString());
|
||||||
if (!maxCurativeEfforts.getText().toString().isEmpty())
|
if (!this.con.getText().toString().isEmpty())
|
||||||
mCurEff = Integer.parseInt(maxCurativeEfforts.getText().toString());
|
con = Integer.parseInt(this.con.getText().toString());
|
||||||
|
if (!this.des.getText().toString().isEmpty())
|
||||||
|
des = Integer.parseInt(this.des.getText().toString());
|
||||||
|
if (!this.intel.getText().toString().isEmpty())
|
||||||
|
intel = Integer.parseInt(this.intel.getText().toString());
|
||||||
|
if (!this.sab.getText().toString().isEmpty())
|
||||||
|
sab = Integer.parseInt(this.sab.getText().toString());
|
||||||
|
|
||||||
if(getIntent().getExtras().getBoolean("first_time")) {
|
if(getIntent().getExtras().getBoolean("first_time")) {
|
||||||
if (
|
if (
|
||||||
!nameString.isEmpty() &&
|
!nameString.isEmpty() &&
|
||||||
!classString.isEmpty() &&
|
!classString.equals(Player.classStrings[0]) &&
|
||||||
!raceString.isEmpty() &&
|
!raceString.equals(Player.raceStrings[0]) &&
|
||||||
levelInt != 0 &&
|
levelInt != 0 &&
|
||||||
maxPgInt != 0 &&
|
car != 0 &&
|
||||||
pg != 0 &&
|
fue != 0 &&
|
||||||
curEff != 0 &&
|
con != 0 &&
|
||||||
mCurEff != 0
|
des != 0 &&
|
||||||
|
intel != 0 &&
|
||||||
|
sab != 0
|
||||||
) {
|
) {
|
||||||
//first save it all
|
//first save it all
|
||||||
ed.putString("playerName", nameString);
|
ed.putString("playerName", nameString);
|
||||||
ed.putString("className", classString);
|
ed.putString("className", classString);
|
||||||
ed.putString("raceName", raceString);
|
ed.putString("raceName", raceString);
|
||||||
ed.putInt("level", levelInt);
|
ed.putInt("level", levelInt);
|
||||||
ed.putInt("maxPg", maxPgInt);
|
|
||||||
ed.putInt("pg", pg);
|
ed.putInt("fue", fue);
|
||||||
ed.putInt("maxCurativeEfforts", mCurEff);
|
ed.putInt("car", car);
|
||||||
ed.putInt("curativeEfforts", curEff);
|
ed.putInt("int", intel);
|
||||||
|
ed.putInt("sab", sab);
|
||||||
|
ed.putInt("con", con);
|
||||||
|
ed.putInt("des", des);
|
||||||
|
|
||||||
ed.putBoolean("saved", true);
|
ed.putBoolean("saved", true);
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
@ -131,10 +144,13 @@ public class Introduction extends ActionBarActivity {
|
||||||
if (!classString.isEmpty()) ed.putString("className", classString);
|
if (!classString.isEmpty()) ed.putString("className", classString);
|
||||||
if (!raceString.isEmpty()) ed.putString("raceName", raceString);
|
if (!raceString.isEmpty()) ed.putString("raceName", raceString);
|
||||||
if (levelInt != 0) ed.putInt("level", levelInt);
|
if (levelInt != 0) ed.putInt("level", levelInt);
|
||||||
if (maxPgInt != 0) ed.putInt("maxPg", maxPgInt);
|
|
||||||
if (pg != 0) ed.putInt("pg", pg);
|
if (fue != 0) ed.putInt("fue", fue);
|
||||||
if (mCurEff != 0) ed.putInt("maxCurativeEfforts", mCurEff);
|
if (car != 0) ed.putInt("car", car);
|
||||||
if (curEff != 0) ed.putInt("curativeEfforts", curEff);
|
if (intel != 0) ed.putInt("int", intel);
|
||||||
|
if (sab != 0) ed.putInt("sab", sab);
|
||||||
|
if (con != 0) ed.putInt("con", con);
|
||||||
|
if (des != 0) ed.putInt("des", des);
|
||||||
}
|
}
|
||||||
ed.apply();
|
ed.apply();
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -124,6 +124,7 @@ public class MainActivity extends ActionBarActivity
|
||||||
super.onResume();
|
super.onResume();
|
||||||
Log.e("UTIL", "resume");
|
Log.e("UTIL", "resume");
|
||||||
restoreData();
|
restoreData();
|
||||||
|
healthStatusCheck();
|
||||||
updateCurativeString();
|
updateCurativeString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -249,17 +250,27 @@ public class MainActivity extends ActionBarActivity
|
||||||
private void restoreData(){
|
private void restoreData(){
|
||||||
SharedPreferences p = getSharedPreferences("basics", MODE_PRIVATE);
|
SharedPreferences p = getSharedPreferences("basics", MODE_PRIVATE);
|
||||||
//restore state
|
//restore state
|
||||||
|
if (!p.getBoolean("saved", false)) {
|
||||||
|
Intent intent = new Intent(this, Introduction.class);
|
||||||
|
startActivity(intent.putExtra(
|
||||||
|
"first_time",
|
||||||
|
!p.getBoolean("saved", false)
|
||||||
|
));
|
||||||
|
}
|
||||||
if(player == null) {
|
if(player == null) {
|
||||||
player = new Player(
|
player = new Player(
|
||||||
p.getString("playerName", getString(R.string.adventurer_name)),
|
p.getString("playerName", getString(R.string.adventurer_name)),
|
||||||
p.getString("className", getString(R.string.class_name)),
|
p.getString("className", getString(R.string.class_name)),
|
||||||
p.getString("raceName", getString(R.string.race_name)),
|
p.getString("raceName", getString(R.string.race_name)),
|
||||||
p.getInt("level", 1),
|
p.getInt("level", 1),
|
||||||
p.getInt("maxPg", 15),
|
new int[] {
|
||||||
p.getInt("pg", 15),
|
p.getInt("fue", 10),
|
||||||
p.getInt("maxCurativeEfforts", 5),
|
p.getInt("con", 10),
|
||||||
p.getInt("curativeEfforts", 5),
|
p.getInt("des", 10),
|
||||||
new int[6],
|
p.getInt("int", 10),
|
||||||
|
p.getInt("sab", 10),
|
||||||
|
p.getInt("car", 10),
|
||||||
|
},
|
||||||
new int[3],
|
new int[3],
|
||||||
new int[18],
|
new int[18],
|
||||||
new Power[4]);
|
new Power[4]);
|
||||||
|
@ -280,14 +291,33 @@ public class MainActivity extends ActionBarActivity
|
||||||
((TextView) findViewById(R.id.raceText)).setText(player.getRaceName());
|
((TextView) findViewById(R.id.raceText)).setText(player.getRaceName());
|
||||||
((TextView) findViewById(R.id.classText)).setText(player.getClassName());
|
((TextView) findViewById(R.id.classText)).setText(player.getClassName());
|
||||||
((TextView) findViewById(R.id.lvl)).setText(String.valueOf(player.getLevel()));
|
((TextView) findViewById(R.id.lvl)).setText(String.valueOf(player.getLevel()));
|
||||||
|
|
||||||
((Button) findViewById(R.id.pgCurrent)).setText(String.valueOf(player.getPg()));
|
((Button) findViewById(R.id.pgCurrent)).setText(String.valueOf(player.getPg()));
|
||||||
|
|
||||||
|
((TextView) findViewById(R.id.FUE)).setText(
|
||||||
|
getString(R.string.FUE) + ": " + player.getFue()
|
||||||
|
);
|
||||||
|
((TextView) findViewById(R.id.CON)).setText(
|
||||||
|
getString(R.string.CON) + ": " + player.getCon()
|
||||||
|
);
|
||||||
|
((TextView) findViewById(R.id.DES)).setText(
|
||||||
|
getString(R.string.DES) + ": " + player.getDes()
|
||||||
|
);
|
||||||
|
((TextView) findViewById(R.id.INT)).setText(
|
||||||
|
getString(R.string.INT) + ": " + player.getInt()
|
||||||
|
);
|
||||||
|
((TextView) findViewById(R.id.SAB)).setText(
|
||||||
|
getString(R.string.SAB) + ": " + player.getSab()
|
||||||
|
);
|
||||||
|
((TextView) findViewById(R.id.CAR)).setText(
|
||||||
|
getString(R.string.CAR) + ": " + player.getCar()
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void saveData() {
|
private void saveData() {
|
||||||
getSharedPreferences("basics", MODE_PRIVATE).edit()
|
getSharedPreferences("basics", MODE_PRIVATE).edit()
|
||||||
.putString("playerName", player.getName())
|
|
||||||
.putString("className", player.getClassName())
|
|
||||||
.putString("raceName", player.getRaceName())
|
|
||||||
.putInt("level", player.getLevel())
|
.putInt("level", player.getLevel())
|
||||||
.putInt("maxPg", player.getMaxPg())
|
.putInt("maxPg", player.getMaxPg())
|
||||||
.putInt("pg", player.getPg())
|
.putInt("pg", player.getPg())
|
||||||
|
|
|
@ -5,21 +5,24 @@ public class Player {
|
||||||
/**
|
/**
|
||||||
* Names for the classes
|
* Names for the classes
|
||||||
*/
|
*/
|
||||||
public static final String[] classStrings = new String[] {
|
public static final String[] classStrings = {
|
||||||
"Selecciona una clase","Brujo", "Clérigo", "Señor de la guerra"
|
"Clase", "Ardiente", "Brujo", "Buscador", "Clérigo", "Explorador",
|
||||||
|
"Guerrero", "Mago", "Mente de Batalla", "Monje", "Paladín", "Pícaro", "Psiónico",
|
||||||
|
"Sacerdote Rúnico", "Señor de la guerra"
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Names for the races
|
* Names for the races
|
||||||
*/
|
*/
|
||||||
public static final String[] raceStrings = new String[] {
|
public static final String[] raceStrings = new String[] {
|
||||||
"Selecciona una raza", "Enano", "Elfo", "Tiflin", "Humano", "Mediano"
|
"Raza", "Dracónido", "Eladrín", "Elfo", "Enano", "Gitzherai", "Humanos", "Medianos",
|
||||||
|
"Mente del Fragmento", "Minotauro", "Salvaje", "Semielfo", "Tiflin"
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Values for attack
|
* Values for attack
|
||||||
*/
|
*/
|
||||||
public static final int FUE = 1, CON = 2, DES = 3, INT = 4, SAB = 5, CAR = 6;
|
public static final int FUE = 0, CON = 1, DES = 2, INT = 3, SAB = 4, CAR = 5;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Values for defenses
|
* Values for defenses
|
||||||
|
@ -59,22 +62,58 @@ public class Player {
|
||||||
private int[] atk, def, abilities;
|
private int[] atk, def, abilities;
|
||||||
private Power[] powers;
|
private Power[] powers;
|
||||||
|
|
||||||
|
public Player(
|
||||||
public Player(String name, String className, String raceName, int level, int maxPg, int pg,
|
String name, String className, String raceName,
|
||||||
int maxCurativeEfforts, int curativeEfforts, int[] atk, int[] def, int[] abilities, Power[] powers){
|
int level, int[] atk, int[] def, int[] abilities,
|
||||||
this.maxPg = maxPg;
|
Power[] powers
|
||||||
this.pg = pg;
|
) {
|
||||||
setState();
|
setState();
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.className = className;
|
this.className = className;
|
||||||
|
|
||||||
|
if(className.equals(classStrings[1])){
|
||||||
|
//Ardiente
|
||||||
|
} else if (className.equals(classStrings[2])) {
|
||||||
|
//Brujo
|
||||||
|
//TODO: Kauron
|
||||||
|
maxPg = atk[CON] + 12;
|
||||||
|
maxCurativeEfforts = 6 + atk[CON];
|
||||||
|
} else if (className.equals(classStrings[3])) {
|
||||||
|
//Buscador
|
||||||
|
} else if (className.equals(classStrings[4])) {
|
||||||
|
//Clérigo
|
||||||
|
//TODO: Gárafran
|
||||||
|
} else if (className.equals(classStrings[5])) {
|
||||||
|
//Explorador
|
||||||
|
//TODO: Aria Saferi
|
||||||
|
} else if (className.equals(classStrings[6])) {
|
||||||
|
//Guerrero
|
||||||
|
} else if (className.equals(classStrings[7])) {
|
||||||
|
//Mago
|
||||||
|
} else if (className.equals(classStrings[8])) {
|
||||||
|
//Mente de Batalla
|
||||||
|
} else if (className.equals(classStrings[9])) {
|
||||||
|
//Monje
|
||||||
|
} else if (className.equals(classStrings[10])) {
|
||||||
|
//Paladín
|
||||||
|
//TODO: Ceaelynna
|
||||||
|
} else if (className.equals(classStrings[11])) {
|
||||||
|
//Pícaro
|
||||||
|
} else if (className.equals(classStrings[12])) {
|
||||||
|
//Psiónico
|
||||||
|
} else if (className.equals(classStrings[13])) {
|
||||||
|
//Sacerdote rúnico
|
||||||
|
} else {
|
||||||
|
//Señor de la Guerra
|
||||||
|
//TODO: Mushu
|
||||||
|
}
|
||||||
|
|
||||||
this.raceName = raceName;
|
this.raceName = raceName;
|
||||||
this.level = level;
|
this.level = level;
|
||||||
this.atk = atk;
|
this.atk = atk;
|
||||||
this.def = def;
|
this.def = def;
|
||||||
this.abilities = abilities;
|
this.abilities = abilities;
|
||||||
this.powers = powers;
|
this.powers = powers;
|
||||||
this.maxCurativeEfforts = maxCurativeEfforts;
|
|
||||||
this.curativeEfforts = curativeEfforts;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -101,11 +140,19 @@ public class Player {
|
||||||
if(uses && curativeEfforts <= 0) return NOT_CURED;
|
if(uses && curativeEfforts <= 0) return NOT_CURED;
|
||||||
else {
|
else {
|
||||||
if(uses && pg < maxPg) curativeEfforts--;
|
if(uses && pg < maxPg) curativeEfforts--;
|
||||||
|
if (pg < 0) {
|
||||||
|
|
||||||
|
} else {
|
||||||
pg += maxPg / 4;
|
pg += maxPg / 4;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (pg < 0) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
pg += recovered;
|
pg += recovered;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
setState();
|
setState();
|
||||||
|
|
||||||
if (pg > maxPg) {pg = maxPg; return MAXED;}
|
if (pg > maxPg) {pg = maxPg; return MAXED;}
|
||||||
|
@ -138,4 +185,21 @@ public class Player {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setAtk(int[] atk) {this.atk = atk;}
|
||||||
|
public int[] getAtk() {return atk;}
|
||||||
|
|
||||||
|
public void setFue(int fue) {atk[FUE] = fue;}
|
||||||
|
public void setCon(int con) {atk[CON] = con;}
|
||||||
|
public void setSab(int sab) {atk[SAB] = sab;}
|
||||||
|
public void setCar(int car) {atk[CAR] = car;}
|
||||||
|
public void setDes(int des) {atk[DES] = des;}
|
||||||
|
public void setInt(int intel) {atk[INT] = intel;}
|
||||||
|
|
||||||
|
public int getFue() {return atk[FUE];}
|
||||||
|
public int getCon() {return atk[CON];}
|
||||||
|
public int getSab() {return atk[SAB];}
|
||||||
|
public int getCar() {return atk[CAR];}
|
||||||
|
public int getDes() {return atk[DES];}
|
||||||
|
public int getInt() {return atk[INT];}
|
||||||
}
|
}
|
|
@ -6,114 +6,129 @@
|
||||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||||
tools:context="com.ddns.kauron.dungeonmanager.Introduction">
|
tools:context="com.ddns.kauron.dungeonmanager.Introduction">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/firstLayout"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:inputType="textPersonName"
|
android:inputType="textPersonName"
|
||||||
android:ems="10"
|
android:ems="10"
|
||||||
|
android:layout_weight="0.5"
|
||||||
android:id="@+id/editNameIntro"
|
android:id="@+id/editNameIntro"
|
||||||
android:layout_alignParentTop="true"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
android:layout_alignParentStart="true"
|
|
||||||
android:hint="@string/adventurer_name"/>
|
android:hint="@string/adventurer_name"/>
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:inputType="textPersonName"
|
|
||||||
android:ems="10"
|
|
||||||
android:id="@+id/editRaceIntro"
|
|
||||||
android:hint="@string/race_name"
|
|
||||||
android:layout_below="@+id/editNameIntro"
|
|
||||||
android:layout_toRightOf="@+id/editClassIntro"
|
|
||||||
android:layout_toEndOf="@+id/editClassIntro" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:inputType="textPersonName"
|
|
||||||
android:ems="10"
|
|
||||||
android:id="@+id/editClassIntro"
|
|
||||||
android:layout_below="@+id/editNameIntro"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
android:layout_alignParentStart="true"
|
|
||||||
android:hint="@string/class_name" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:inputType="number"
|
android:inputType="number"
|
||||||
android:ems="10"
|
android:ems="10"
|
||||||
android:id="@+id/editLevelIntro"
|
android:id="@+id/editLevelIntro"
|
||||||
android:hint="@string/level"
|
android:hint="@string/level"
|
||||||
android:layout_alignParentTop="true"
|
android:layout_weight="1"/>
|
||||||
android:layout_toRightOf="@+id/editNameIntro"
|
</LinearLayout>
|
||||||
android:layout_alignRight="@+id/editRaceIntro"
|
|
||||||
android:layout_alignEnd="@+id/editRaceIntro" />
|
|
||||||
|
|
||||||
<EditText
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:inputType="number"
|
android:orientation="horizontal"
|
||||||
android:ems="10"
|
android:id="@+id/secondLayout"
|
||||||
android:id="@+id/editMaxPgIntro"
|
android:layout_below="@+id/firstLayout">
|
||||||
android:hint="@string/max_pg"
|
|
||||||
android:width="70dp"
|
|
||||||
android:layout_below="@+id/editClassIntro"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
android:layout_alignParentStart="true"
|
|
||||||
android:layout_toLeftOf="@+id/editMaxEffortIntro"
|
|
||||||
android:layout_toStartOf="@+id/editMaxEffortIntro" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:inputType="number"
|
|
||||||
android:ems="10"
|
|
||||||
android:id="@+id/editMaxEffortIntro"
|
|
||||||
android:hint="@string/max_curative_efforts"
|
|
||||||
android:layout_below="@+id/editRaceIntro"
|
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:layout_alignParentEnd="true" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:inputType="number"
|
|
||||||
android:ems="10"
|
|
||||||
android:id="@+id/editPgIntro"
|
|
||||||
android:width="70dp"
|
|
||||||
android:hint="@string/pg"
|
|
||||||
android:layout_below="@+id/editMaxPgIntro"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
android:layout_alignParentStart="true"
|
|
||||||
android:layout_toLeftOf="@+id/editEffortIntro"
|
|
||||||
android:layout_toStartOf="@+id/editEffortIntro" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:inputType="number"
|
|
||||||
android:ems="10"
|
|
||||||
android:id="@+id/editEffortIntro"
|
|
||||||
android:layout_below="@+id/editMaxEffortIntro"
|
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:hint="@string/curative_efforts" />
|
|
||||||
|
|
||||||
<Spinner
|
<Spinner
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/classSpinner"
|
android:layout_weight="1"
|
||||||
android:layout_below="@+id/editPgIntro"
|
android:id="@+id/classSpinner"/>
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
android:layout_alignParentStart="true" />
|
|
||||||
|
|
||||||
<Spinner
|
<Spinner
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
android:id="@+id/raceSpinner"
|
android:id="@+id/raceSpinner"
|
||||||
android:layout_below="@+id/classSpinner"
|
android:layout_alignTop="@+id/classSpinner" />
|
||||||
android:layout_alignParentLeft="true"
|
</LinearLayout>
|
||||||
android:layout_alignParentStart="true" />
|
|
||||||
|
<GridLayout
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/secondLayout"
|
||||||
|
android:id="@+id/thirdLayout"
|
||||||
|
android:columnCount="3">
|
||||||
|
<EditText
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="number"
|
||||||
|
android:ems="3"
|
||||||
|
|
||||||
|
android:layout_row="0"
|
||||||
|
android:layout_column="0"
|
||||||
|
|
||||||
|
android:id="@+id/FUE"
|
||||||
|
android:hint="@string/FUE" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="number"
|
||||||
|
android:ems="3"
|
||||||
|
|
||||||
|
android:layout_row="1"
|
||||||
|
android:layout_column="0"
|
||||||
|
|
||||||
|
android:id="@+id/CON"
|
||||||
|
android:hint="@string/CON" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="number"
|
||||||
|
android:ems="3"
|
||||||
|
|
||||||
|
android:layout_row="0"
|
||||||
|
android:layout_column="1"
|
||||||
|
|
||||||
|
android:id="@+id/DES"
|
||||||
|
android:hint="@string/DES" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="number"
|
||||||
|
android:ems="3"
|
||||||
|
|
||||||
|
android:layout_row="1"
|
||||||
|
android:layout_column="1"
|
||||||
|
|
||||||
|
android:id="@+id/INT"
|
||||||
|
android:hint="@string/INT" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="number"
|
||||||
|
android:ems="3"
|
||||||
|
|
||||||
|
android:layout_row="0"
|
||||||
|
android:layout_column="2"
|
||||||
|
|
||||||
|
android:id="@+id/SAB"
|
||||||
|
android:hint="@string/SAB" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="number"
|
||||||
|
android:ems="3"
|
||||||
|
|
||||||
|
android:layout_row="1"
|
||||||
|
android:layout_column="2"
|
||||||
|
|
||||||
|
android:id="@+id/CAR"
|
||||||
|
android:hint="@string/CAR" />
|
||||||
|
</GridLayout>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
|
@ -97,4 +97,78 @@
|
||||||
android:id="@+id/curativeEffortsText"/>
|
android:id="@+id/curativeEffortsText"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<GridLayout
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/curativeEffortsContainer"
|
||||||
|
android:id="@+id/thirdLayout"
|
||||||
|
android:columnCount="3">
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
|
android:typeface="monospace"
|
||||||
|
android:ems="4"
|
||||||
|
android:layout_row="0"
|
||||||
|
android:layout_column="0"
|
||||||
|
android:id="@+id/FUE"
|
||||||
|
android:hint="@string/FUE" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
|
android:typeface="monospace"
|
||||||
|
android:ems="4"
|
||||||
|
android:layout_row="1"
|
||||||
|
android:layout_column="0"
|
||||||
|
android:id="@+id/CON"
|
||||||
|
android:hint="@string/CON" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
|
android:typeface="monospace"
|
||||||
|
android:ems="4"
|
||||||
|
android:layout_row="0"
|
||||||
|
android:layout_column="1"
|
||||||
|
android:id="@+id/DES"
|
||||||
|
android:hint="@string/DES" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
|
android:typeface="monospace"
|
||||||
|
android:ems="4"
|
||||||
|
android:layout_row="1"
|
||||||
|
android:layout_column="1"
|
||||||
|
android:id="@+id/INT"
|
||||||
|
android:hint="@string/INT" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
|
android:typeface="monospace"
|
||||||
|
android:ems="4"
|
||||||
|
android:layout_row="0"
|
||||||
|
android:layout_column="2"
|
||||||
|
android:id="@+id/SAB"
|
||||||
|
android:hint="@string/SAB" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
|
android:typeface="monospace"
|
||||||
|
android:ems="4"
|
||||||
|
android:layout_row="1"
|
||||||
|
android:layout_column="2"
|
||||||
|
android:id="@+id/CAR"
|
||||||
|
android:hint="@string/CAR" />
|
||||||
|
</GridLayout>
|
||||||
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">DungeonManager</string>
|
|
||||||
<string name="action_cure">Curar</string>
|
<string name="action_cure">Curar</string>
|
||||||
<string name="action_edit_basics">Editar personaje</string>
|
<string name="action_edit_basics">Editar personaje</string>
|
||||||
<string name="action_finish">Hecho</string>
|
<string name="action_finish">Hecho</string>
|
||||||
|
@ -22,10 +21,9 @@
|
||||||
<string name="suffer_damage">Indica el daño sufrido</string>
|
<string name="suffer_damage">Indica el daño sufrido</string>
|
||||||
<string name="title_activity_introduction">Editar personaje</string>
|
<string name="title_activity_introduction">Editar personaje</string>
|
||||||
<string name="yes">Sí</string>
|
<string name="yes">Sí</string>
|
||||||
<string name="max_curative_efforts">Esfuerzos curativos</string>
|
<string name="max_curative_efforts">Máx. esfuerzos curativos</string>
|
||||||
<string name="suffer_damage_hint">PG perdidos</string>
|
<string name="suffer_damage_hint">PG perdidos</string>
|
||||||
<string name="action_undo">Deshacer</string>
|
<string name="action_undo">Deshacer</string>
|
||||||
<string name="action_calendar_activity">Crear evento</string>
|
|
||||||
<string name="action_save">Guardar</string>
|
<string name="action_save">Guardar</string>
|
||||||
<string name="action_undo_current_pg">Acción deshecha</string>
|
<string name="action_undo_current_pg">Acción deshecha</string>
|
||||||
<string name="dungeons_and_dragons">Dragones y Mazmorras</string>
|
<string name="dungeons_and_dragons">Dragones y Mazmorras</string>
|
||||||
|
@ -41,4 +39,10 @@
|
||||||
<string name="message_reset">Los datos han sido borrados</string>
|
<string name="message_reset">Los datos han sido borrados</string>
|
||||||
<string name="reset_confirmation">Todos los datos se perderán irrevocablemente</string>
|
<string name="reset_confirmation">Todos los datos se perderán irrevocablemente</string>
|
||||||
<string name="reset_confirmation_title">¿Estás seguro?</string>
|
<string name="reset_confirmation_title">¿Estás seguro?</string>
|
||||||
|
<string name="CAR">CAR</string>
|
||||||
|
<string name="CON" translatable="false">CON</string>
|
||||||
|
<string name="DES" translatable="false">DES</string>
|
||||||
|
<string name="FUE" translatable="false">FUE</string>
|
||||||
|
<string name="INT" translatable="false">INT</string>
|
||||||
|
<string name="SAB" translatable="false">SAB</string>
|
||||||
</resources>
|
</resources>
|
|
@ -44,4 +44,11 @@
|
||||||
<string name="maxed_curative">You have reached your maximum level of PG</string>
|
<string name="maxed_curative">You have reached your maximum level of PG</string>
|
||||||
<string name="suffer_damage">Input the damage suffered</string>
|
<string name="suffer_damage">Input the damage suffered</string>
|
||||||
<string name="suffer_damage_hint">PG lost</string>
|
<string name="suffer_damage_hint">PG lost</string>
|
||||||
|
|
||||||
|
<string name="FUE">FUE</string>
|
||||||
|
<string name="CON">CON</string>
|
||||||
|
<string name="DES">DES</string>
|
||||||
|
<string name="INT">INT</string>
|
||||||
|
<string name="CAR">CAR</string>
|
||||||
|
<string name="SAB">SAB</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Reference in a new issue