Minor debugging
Added TODO's and scrollview's to the main activity
This commit is contained in:
parent
d6daf98b74
commit
8a781561e3
9 changed files with 291 additions and 264 deletions
|
@ -91,7 +91,7 @@ public class Introduction extends ActionBarActivity {
|
|||
int classInt = classSpinner.getSelectedItemPosition();
|
||||
int raceInt = raceSpinner.getSelectedItemPosition();
|
||||
|
||||
int pxInt = 0;
|
||||
int pxInt = -1;
|
||||
if (!level.getText().toString().isEmpty())
|
||||
pxInt = Integer.parseInt(level.getText().toString());
|
||||
|
||||
|
@ -114,7 +114,7 @@ public class Introduction extends ActionBarActivity {
|
|||
!nameString.isEmpty() &&
|
||||
classInt != Player.NULL &&
|
||||
raceInt != Player.NULL &&
|
||||
pxInt != 0 &&
|
||||
pxInt != -1 &&
|
||||
car != 0 &&
|
||||
fue != 0 &&
|
||||
con != 0 &&
|
||||
|
|
|
@ -117,6 +117,9 @@ public class MainActivity extends ActionBarActivity{
|
|||
try {
|
||||
if (player.addPx(Integer.parseInt(input.getText().toString()))) {
|
||||
//levelUp
|
||||
//TODO: update defenses
|
||||
//TODO: add attack points when necessary
|
||||
//TODO: update currentPg button
|
||||
player.setMaxPgOnLevelUp();
|
||||
((TextView) findViewById(R.id.lvl)).setText(
|
||||
String.valueOf(player.getLevel())
|
||||
|
@ -133,6 +136,14 @@ public class MainActivity extends ActionBarActivity{
|
|||
});
|
||||
alert.show();
|
||||
return true;
|
||||
} else if (id == R.id.action_download) {
|
||||
//TODO: create self-updater
|
||||
Toast.makeText(
|
||||
getApplicationContext(),
|
||||
"This function is not ready yet",
|
||||
Toast.LENGTH_LONG
|
||||
).show();
|
||||
return true;
|
||||
}
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
|
@ -457,7 +468,7 @@ public class MainActivity extends ActionBarActivity{
|
|||
.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
if (input.getText().toString().isEmpty()){
|
||||
if (input.getText().toString().isEmpty()) {
|
||||
Toast.makeText(
|
||||
getApplicationContext(),
|
||||
R.string.empty_field,
|
||||
|
@ -471,4 +482,8 @@ public class MainActivity extends ActionBarActivity{
|
|||
});
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
//TODO: show on screen the max pg's
|
||||
|
||||
//TODO: show the current px and progress bar
|
||||
}
|
|
@ -11,12 +11,14 @@ public class Player {
|
|||
"Sacerdote Rúnico", "Señor de la guerra"
|
||||
};
|
||||
|
||||
/**
|
||||
* Values for classes
|
||||
*/
|
||||
public static final int NULL = 0, ARDIENTE = 1, BRUJO = 2, BUSCADOR = 3, CLÉRIGO = 4,
|
||||
EXPLORADOR = 5, GUERRERO = 6, MAGO = 7, MENTE_DE_BATALLA = 8, MONJE = 9, PALADÍN = 10,
|
||||
PÍCARO = 11, PSIÓNICO = 12, SACERDOTE_RÚNICO = 13, SEÑOR_DE_LA_GUERRA = 14;
|
||||
public static final int NULL = 0;
|
||||
|
||||
// /**
|
||||
// * Values for classes
|
||||
// */
|
||||
// public static final int ARDIENTE = 1, BRUJO = 2, BUSCADOR = 3, CLÉRIGO = 4,
|
||||
// EXPLORADOR = 5, GUERRERO = 6, MAGO = 7, MENTE_DE_BATALLA = 8, MONJE = 9, PALADÍN = 10,
|
||||
// PÍCARO = 11, PSIÓNICO = 12, SACERDOTE_RÚNICO = 13, SEÑOR_DE_LA_GUERRA = 14;
|
||||
|
||||
/**
|
||||
* Values for level - px computation
|
||||
|
@ -68,12 +70,12 @@ public class Player {
|
|||
public static final int CA = 0, FORT = 1, REF = 2, VOL = 3;
|
||||
|
||||
//TODO: develop abilities
|
||||
/**
|
||||
* Values for abilities
|
||||
*/
|
||||
public static final int ACROBACIAS = 1, AGUANTE = 2, ARCANOS = 3, ATLETISMO = 4, DIPLOMACIA = 5,
|
||||
DUNGEONS = 6, ENGAÑAR = 7, HISTORIA = 8, HURTO = 9, INTIMIDAR = 10, NATURALEZA = 11,
|
||||
PERCEPCIÓN = 12, PERSPICACIA = 13, RECURSOS = 14, RELIGIÓN = 15, SANAR = 16, SIGILO = 17;
|
||||
// /**
|
||||
// * Values for abilities
|
||||
// */
|
||||
// public static final int ACROBACIAS = 1, AGUANTE = 2, ARCANOS = 3, ATLETISMO = 4, DIPLOMACIA = 5,
|
||||
// DUNGEONS = 6, ENGAÑAR = 7, HISTORIA = 8, HURTO = 9, INTIMIDAR = 10, NATURALEZA = 11,
|
||||
// PERCEPCIÓN = 12, PERSPICACIA = 13, RECURSOS = 14, RELIGIÓN = 15, SANAR = 16, SIGILO = 17;
|
||||
|
||||
/**
|
||||
* Names for the abilities
|
||||
|
@ -96,8 +98,9 @@ public class Player {
|
|||
private int classInt, raceInt;
|
||||
private String name;
|
||||
private int level;
|
||||
|
||||
//TODO: use dice class
|
||||
private int[] atk, def, abilities;
|
||||
//TODO: implement fully operational powers displayed as cards
|
||||
private Power[] powers;
|
||||
|
||||
public Player(
|
||||
|
|
|
@ -6,6 +6,7 @@ public class Power {
|
|||
private boolean used;
|
||||
private int type;
|
||||
private String name;
|
||||
private int atk, def, damage;
|
||||
|
||||
|
||||
public Power(String name, int type){
|
||||
|
|
Reference in a new issue