diff --git a/app/app.iml b/app/app.iml
index 21fada5..699ce6f 100644
--- a/app/app.iml
+++ b/app/app.iml
@@ -86,9 +86,11 @@
-
-
+
+
+
+
diff --git a/app/build.gradle b/app/build.gradle
index 21a7ee6..87ad834 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -24,4 +24,5 @@ dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.android.support:cardview-v7:21.0.3'
+ compile 'com.nispok:snackbar:2.10.6'
}
diff --git a/app/src/main/java/com/kauron/dungeonmanager/Introduction.java b/app/src/main/java/com/kauron/dungeonmanager/Introduction.java
index 363c7bc..db05457 100644
--- a/app/src/main/java/com/kauron/dungeonmanager/Introduction.java
+++ b/app/src/main/java/com/kauron/dungeonmanager/Introduction.java
@@ -68,7 +68,7 @@ public class Introduction extends ActionBarActivity {
Toast.makeText(
getApplicationContext(),
R.string.message_no_back_button_intro,
- Toast.LENGTH_LONG
+ Toast.LENGTH_SHORT
).show();
}
diff --git a/app/src/main/java/com/kauron/dungeonmanager/MainActivity.java b/app/src/main/java/com/kauron/dungeonmanager/MainActivity.java
index 8622e67..8321c0d 100644
--- a/app/src/main/java/com/kauron/dungeonmanager/MainActivity.java
+++ b/app/src/main/java/com/kauron/dungeonmanager/MainActivity.java
@@ -18,7 +18,9 @@ import android.widget.Button;
import android.widget.EditText;
import android.widget.ProgressBar;
import android.widget.TextView;
-import android.widget.Toast;
+
+import com.nispok.snackbar.Snackbar;
+import com.nispok.snackbar.SnackbarManager;
public class MainActivity extends ActionBarActivity{
@@ -94,11 +96,11 @@ public class MainActivity extends ActionBarActivity{
//noinspection SimplifiableIfStatement
if (id == R.id.action_cure) {
if(player.getMaxPg() <= player.getPg()){
- Toast.makeText(
- getApplicationContext(),
- R.string.maxed_curative,
- Toast.LENGTH_LONG
- ).show();
+ SnackbarManager.show(
+ Snackbar
+ .with(getApplicationContext())
+ .text(R.string.maxed_curative)
+ );
} else {
healDialog();
}
@@ -143,11 +145,11 @@ public class MainActivity extends ActionBarActivity{
// true, player.getPx() - Player.LEVEL_PX[player.getLevel() - 1]
// );
} catch(Exception e) {
- Toast.makeText(
- getApplicationContext(),
- R.string.message_no_px,
- Toast.LENGTH_LONG
- ).show();
+ SnackbarManager.show(
+ Snackbar
+ .with(getApplicationContext())
+ .text(R.string.message_no_px)
+ );
}
}
});
@@ -156,9 +158,11 @@ public class MainActivity extends ActionBarActivity{
return true;
} else if (id == R.id.action_time_long_rest) {
player.rest(true);
- Toast.makeText(
- getApplicationContext(), R.string.long_rest_done, Toast.LENGTH_LONG
- ).show();
+ SnackbarManager.show(
+ Snackbar
+ .with(getApplicationContext())
+ .text(R.string.long_rest_done)
+ );
p.edit()
.putInt("pg", player.getPg())
.putInt("curativeEfforts", player.getCurativeEfforts())
@@ -167,9 +171,11 @@ public class MainActivity extends ActionBarActivity{
ceUpdate();
} else if (id == R.id.action_time_rest) {
player.rest(false);
- Toast.makeText(
- getApplicationContext(), R.string.rest_done, Toast.LENGTH_LONG
- ).show();
+ SnackbarManager.show(
+ Snackbar
+ .with(getApplicationContext())
+ .text(R.string.rest_done)
+ );
pgUpdate();
ceUpdate();
}
@@ -189,18 +195,18 @@ public class MainActivity extends ActionBarActivity{
public void heal(boolean usesEffort) {
int hasCured = player.recoverPg(Player.USE_CURATIVE_EFFORT, usesEffort);
if (hasCured == Player.NOT_CURED) {
- Toast.makeText(
- getApplicationContext(),
- R.string.no_curative_efforts_error,
- Toast.LENGTH_LONG
- ).show();
+ SnackbarManager.show(
+ Snackbar
+ .with(getApplicationContext())
+ .text(R.string.no_curative_efforts_error)
+ );
} else {
if(hasCured == Player.MAXED){
- Toast.makeText(
- getApplicationContext(),
- R.string.maxed_curative,
- Toast.LENGTH_LONG
- ).show();
+ SnackbarManager.show(
+ Snackbar
+ .with(getApplicationContext())
+ .text(R.string.maxed_curative)
+ );
}
SharedPreferences.Editor e = p.edit();
e.putInt("pg", player.getPg());
@@ -321,11 +327,11 @@ public class MainActivity extends ActionBarActivity{
alert.setNegativeButton(R.string.die, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
- Toast.makeText(
- getApplicationContext(),
- R.string.message_death,
- Toast.LENGTH_LONG
- ).show();
+ SnackbarManager.show(
+ Snackbar
+ .with(getApplicationContext())
+ .text(R.string.message_death)
+ );
p.edit().clear().apply();
restoreData();
}
@@ -338,11 +344,11 @@ public class MainActivity extends ActionBarActivity{
pgBar.getProgressDrawable().setColorFilter(Color.RED, PorterDuff.Mode.SRC_IN);
negPgBar.getProgressDrawable().setColorFilter(Color.RED, PorterDuff.Mode.SRC_IN);
if(lastState != Player.SAME) {
- Toast.makeText(
- getApplicationContext(),
- R.string.state_changed_debilitado,
- Toast.LENGTH_LONG
- ).show();
+ SnackbarManager.show(
+ Snackbar
+ .with(getApplicationContext())
+ .text(R.string.state_changed_debilitado)
+ );
}
} else if (status == Player.MALHERIDO) {
pgCurrent.setBackgroundColor(android.R.drawable.btn_default);
@@ -350,11 +356,11 @@ public class MainActivity extends ActionBarActivity{
pgBar.getProgressDrawable().setColorFilter(Color.YELLOW, PorterDuff.Mode.SRC_IN);
negPgBar.getProgressDrawable().setColorFilter(Color.YELLOW, PorterDuff.Mode.SRC_IN);
if(lastState != Player.SAME) {
- Toast.makeText(
- getApplicationContext(),
- R.string.state_changed_malherido,
- Toast.LENGTH_LONG
- ).show();
+ SnackbarManager.show(
+ Snackbar
+ .with(getApplicationContext())
+ .text(R.string.state_changed_malherido)
+ );
}
} else {
pgCurrent.setTextColor(Color.GREEN);
@@ -499,11 +505,11 @@ public class MainActivity extends ActionBarActivity{
message = getString(R.string.action_undo_current_pg);
}
if (!message.isEmpty()) {
- Toast.makeText(
- getApplicationContext(),
- message,
- Toast.LENGTH_LONG
- ).show();
+ SnackbarManager.show(
+ Snackbar
+ .with(getApplicationContext())
+ .text(message)
+ );
}
pgUpdate();
undo = false;
@@ -525,11 +531,11 @@ public class MainActivity extends ActionBarActivity{
@Override
public void onClick(DialogInterface dialog, int which) {
if (input.getText().toString().isEmpty()) {
- Toast.makeText(
- getApplicationContext(),
- R.string.empty_field,
- Toast.LENGTH_LONG
- ).show();
+ SnackbarManager.show(
+ Snackbar
+ .with(getApplicationContext())
+ .text(R.string.empty_field)
+ );
pgDialog();
} else {
player.setMaxPg(Integer.parseInt(input.getText().toString()));
diff --git a/app/src/main/res/drawable-hdpi/ic_action_settings.png b/app/src/main/res/drawable-hdpi/ic_action_settings.png
new file mode 100644
index 0000000..a04af7e
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_action_settings.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_action_settings.png b/app/src/main/res/drawable-mdpi/ic_action_settings.png
new file mode 100644
index 0000000..418f1d4
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_action_settings.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_action_settings.png b/app/src/main/res/drawable-xhdpi/ic_action_settings.png
new file mode 100644
index 0000000..3c805d6
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_action_settings.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_action_settings.png b/app/src/main/res/drawable-xxhdpi/ic_action_settings.png
new file mode 100644
index 0000000..4fbf202
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_action_settings.png differ
diff --git a/app/src/main/res/layout/activity_introduction.xml b/app/src/main/res/layout/activity_introduction.xml
index d432d58..f4197ce 100644
--- a/app/src/main/res/layout/activity_introduction.xml
+++ b/app/src/main/res/layout/activity_introduction.xml
@@ -47,13 +47,15 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
- android:id="@+id/classSpinner"/>
+ android:id="@+id/classSpinner"
+ android:spinnerMode="dropdown" />
+ android:id="@+id/raceSpinner"
+ android:spinnerMode="dialog" />
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index 38ae614..19e84c0 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -1,256 +1,358 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ android:id="@+id/CA"
+ android:hint="@string/CA" />
+
+
+ android:id="@+id/REF"
+ android:hint="@string/REF" />
-
-
-
-
-
-
+ android:id="@+id/VOL"
+ android:hint="@string/VOL" />
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_welcome.xml b/app/src/main/res/layout/activity_welcome.xml
index f5586b9..cb8d696 100644
--- a/app/src/main/res/layout/activity_welcome.xml
+++ b/app/src/main/res/layout/activity_welcome.xml
@@ -1,4 +1,4 @@
-
-
-
-
-
+ android:onClick="onLoadClick"
+ android:layout_below="@+id/relativeLayout"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentStart="true" />
+
-
+
+
+
+
+
+
+
diff --git a/app/src/main/res/menu/menu_welcome.xml b/app/src/main/res/menu/menu_welcome.xml
index ce72a6a..aae6186 100644
--- a/app/src/main/res/menu/menu_welcome.xml
+++ b/app/src/main/res/menu/menu_welcome.xml
@@ -2,6 +2,13 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.kauron.dungeonmanager.Welcome">
-
+
+
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index 76c18ad..311e97f 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -75,4 +75,5 @@
Bienvenido
Cargar personaje
Esto borrarĂ¡ al personaje anterior
+ Nuevo ataque
\ No newline at end of file
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index 233ef6b..3e8e0fb 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -1,5 +1,13 @@
- #5D4037
- #3E2723
+ #795548
+ #5D4037
+ #D7CCC8
+ #FF5252
+ #212121
+ #727272
+ #FFFFFF
+ #B6B6B6
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 2cd27a1..6d3573a 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -7,10 +7,10 @@
Undo
PG
Die
- CA
+ AC
FORT
REF
- VOL
+ WILL
Defense
Curative efforts
Load %1$s
@@ -30,7 +30,7 @@
Encounter ended
Adventurer name
You have less than half of your maximum health
- Who is using a curative effort?
+ Who is using a surge?
Class
Race
You have fainted. You can\'t do anything!
@@ -42,16 +42,16 @@
Suffer damage
You have died
You have
- curative efforts
- New energies
+ surges
+ Surge
Edit character
Save
Level
- Max curative efforts
+ Max surges
Max PG
You need to fill all the information
- You don\'t have any curative efforts left!
+ You don\'t have any surges left!
You have reached your maximum level of PG
Input the damage suffered
PG lost
@@ -81,4 +81,5 @@
New character
Load character
This will erase any previously existing data saved
+ New attack
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 9e201b8..d54b919 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -3,8 +3,14 @@