Changed package name
This commit is contained in:
parent
f5fbf9b5fa
commit
2501b899fd
9 changed files with 93 additions and 92 deletions
|
@ -3,9 +3,8 @@ apply plugin: 'com.android.application'
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 21
|
compileSdkVersion 21
|
||||||
buildToolsVersion "21.1.2"
|
buildToolsVersion "21.1.2"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.ddns.kauron.dungeonmanager"
|
applicationId 'com.kauron.dungeonmanager'
|
||||||
minSdkVersion 15
|
minSdkVersion 15
|
||||||
targetSdkVersion 21
|
targetSdkVersion 21
|
||||||
versionCode 1
|
versionCode 1
|
||||||
|
@ -17,9 +16,11 @@ android {
|
||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
productFlavors {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
compile fileTree(include: ['*.jar'], dir: 'libs')
|
||||||
compile 'com.android.support:appcompat-v7:21.0.3'
|
compile 'com.android.support:appcompat-v7:21.0.3'
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.ddns.kauron.dungeonmanager" >
|
package="com.kauron.dungeonmanager" >
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
android:label="@string/title_activity_introduction" >
|
android:label="@string/title_activity_introduction" >
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="android.support.PARENT_ACTIVITY"
|
android:name="android.support.PARENT_ACTIVITY"
|
||||||
android:value="com.ddns.kauron.dungeonmanager.MainActivity" />
|
android:value=".MainActivity" />
|
||||||
</activity>
|
</activity>
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package com.ddns.kauron.dungeonmanager;
|
package com.kauron.dungeonmanager;
|
||||||
|
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
|
@ -40,20 +40,20 @@ public class HealthDialogFragment extends DialogFragment {
|
||||||
@Override
|
@Override
|
||||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||||
builder.setMessage(R.string.new_energies_message)
|
builder.setMessage(com.ddns.kauron.dungeonmanager.R.string.new_energies_message)
|
||||||
.setTitle(R.string.new_energies)
|
.setTitle(com.ddns.kauron.dungeonmanager.R.string.new_energies)
|
||||||
.setPositiveButton(R.string.me, new DialogInterface.OnClickListener() {
|
.setPositiveButton(com.ddns.kauron.dungeonmanager.R.string.me, new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int id) {
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
mListener.heal(HealthDialogFragment.this, true);
|
mListener.heal(HealthDialogFragment.this, true);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.setNegativeButton(R.string.other, new DialogInterface.OnClickListener() {
|
.setNegativeButton(com.ddns.kauron.dungeonmanager.R.string.other, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int id) {
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
mListener.heal(HealthDialogFragment.this, false);
|
mListener.heal(HealthDialogFragment.this, false);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.setNeutralButton(R.string.cancel, new DialogInterface.OnClickListener() {
|
.setNeutralButton(com.ddns.kauron.dungeonmanager.R.string.cancel, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int id) {
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
dialog.cancel();
|
dialog.cancel();
|
|
@ -1,4 +1,4 @@
|
||||||
package com.ddns.kauron.dungeonmanager;
|
package com.kauron.dungeonmanager;
|
||||||
|
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.support.v7.app.ActionBarActivity;
|
import android.support.v7.app.ActionBarActivity;
|
||||||
|
@ -21,18 +21,18 @@ public class Introduction extends ActionBarActivity {
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
setContentView(R.layout.activity_introduction);
|
setContentView(com.ddns.kauron.dungeonmanager.R.layout.activity_introduction);
|
||||||
name = (EditText) findViewById(R.id.editNameIntro);
|
name = (EditText) findViewById(com.ddns.kauron.dungeonmanager.R.id.editNameIntro);
|
||||||
level = (EditText) findViewById(R.id.editLevelIntro);
|
level = (EditText) findViewById(com.ddns.kauron.dungeonmanager.R.id.editLevelIntro);
|
||||||
|
|
||||||
fue = (EditText) findViewById(R.id.FUE);
|
fue = (EditText) findViewById(com.ddns.kauron.dungeonmanager.R.id.FUE);
|
||||||
con = (EditText) findViewById(R.id.CON);
|
con = (EditText) findViewById(com.ddns.kauron.dungeonmanager.R.id.CON);
|
||||||
des = (EditText) findViewById(R.id.DES);
|
des = (EditText) findViewById(com.ddns.kauron.dungeonmanager.R.id.DES);
|
||||||
sab = (EditText) findViewById(R.id.SAB);
|
sab = (EditText) findViewById(com.ddns.kauron.dungeonmanager.R.id.SAB);
|
||||||
intel = (EditText) findViewById(R.id.INT);
|
intel = (EditText) findViewById(com.ddns.kauron.dungeonmanager.R.id.INT);
|
||||||
car = (EditText) findViewById(R.id.CAR);
|
car = (EditText) findViewById(com.ddns.kauron.dungeonmanager.R.id.CAR);
|
||||||
|
|
||||||
classSpinner = (Spinner) findViewById(R.id.classSpinner);
|
classSpinner = (Spinner) findViewById(com.ddns.kauron.dungeonmanager.R.id.classSpinner);
|
||||||
classSpinner.setAdapter(
|
classSpinner.setAdapter(
|
||||||
new ArrayAdapter<>(
|
new ArrayAdapter<>(
|
||||||
this,
|
this,
|
||||||
|
@ -41,7 +41,7 @@ public class Introduction extends ActionBarActivity {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
raceSpinner = (Spinner) findViewById(R.id.raceSpinner);
|
raceSpinner = (Spinner) findViewById(com.ddns.kauron.dungeonmanager.R.id.raceSpinner);
|
||||||
raceSpinner.setAdapter(
|
raceSpinner.setAdapter(
|
||||||
new ArrayAdapter<>(
|
new ArrayAdapter<>(
|
||||||
this,
|
this,
|
||||||
|
@ -55,7 +55,7 @@ public class Introduction extends ActionBarActivity {
|
||||||
@Override
|
@Override
|
||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
// Inflate the menu; this adds items to the action bar if it is present.
|
// Inflate the menu; this adds items to the action bar if it is present.
|
||||||
getMenuInflater().inflate(R.menu.menu_introduction, menu);
|
getMenuInflater().inflate(com.ddns.kauron.dungeonmanager.R.menu.menu_introduction, menu);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,13 +67,13 @@ public class Introduction extends ActionBarActivity {
|
||||||
int id = item.getItemId();
|
int id = item.getItemId();
|
||||||
|
|
||||||
//noinspection SimplifiableIfStatement
|
//noinspection SimplifiableIfStatement
|
||||||
if (id == R.id.action_finish) {
|
if (id == com.ddns.kauron.dungeonmanager.R.id.action_finish) {
|
||||||
if(finished()) {
|
if(finished()) {
|
||||||
this.finish();
|
this.finish();
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
getApplicationContext(),
|
getApplicationContext(),
|
||||||
R.string.missing_info_error,
|
com.ddns.kauron.dungeonmanager.R.string.missing_info_error,
|
||||||
Toast.LENGTH_LONG
|
Toast.LENGTH_LONG
|
||||||
).show();
|
).show();
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package com.ddns.kauron.dungeonmanager;
|
package com.kauron.dungeonmanager;
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.app.DialogFragment;
|
import android.app.DialogFragment;
|
||||||
|
@ -31,7 +31,7 @@ public class MainActivity extends ActionBarActivity
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_main);
|
setContentView(com.ddns.kauron.dungeonmanager.R.layout.activity_main);
|
||||||
undo = false;
|
undo = false;
|
||||||
invalidateOptionsMenu();
|
invalidateOptionsMenu();
|
||||||
}
|
}
|
||||||
|
@ -39,13 +39,13 @@ public class MainActivity extends ActionBarActivity
|
||||||
@Override
|
@Override
|
||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
// Inflate the menu; this adds items to the action bar if it is present.
|
// Inflate the menu; this adds items to the action bar if it is present.
|
||||||
getMenuInflater().inflate(R.menu.menu_main, menu);
|
getMenuInflater().inflate(com.ddns.kauron.dungeonmanager.R.menu.menu_main, menu);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onPrepareOptionsMenu (Menu menu) {
|
public boolean onPrepareOptionsMenu (Menu menu) {
|
||||||
menu.findItem(R.id.action_undo).setVisible(undo);
|
menu.findItem(com.ddns.kauron.dungeonmanager.R.id.action_undo).setVisible(undo);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,10 +59,10 @@ public class MainActivity extends ActionBarActivity
|
||||||
int id = item.getItemId();
|
int id = item.getItemId();
|
||||||
|
|
||||||
//noinspection SimplifiableIfStatement
|
//noinspection SimplifiableIfStatement
|
||||||
if (id == R.id.action_cure) {
|
if (id == com.ddns.kauron.dungeonmanager.R.id.action_cure) {
|
||||||
showHealthDialog();
|
showHealthDialog();
|
||||||
return true;
|
return true;
|
||||||
} else if (id == R.id.action_edit_basics) {
|
} else if (id == com.ddns.kauron.dungeonmanager.R.id.action_edit_basics) {
|
||||||
//TODO: try this startChildActivity()
|
//TODO: try this startChildActivity()
|
||||||
SharedPreferences p = getSharedPreferences("basics", MODE_PRIVATE);
|
SharedPreferences p = getSharedPreferences("basics", MODE_PRIVATE);
|
||||||
Intent intent = new Intent(this, Introduction.class);
|
Intent intent = new Intent(this, Introduction.class);
|
||||||
|
@ -72,19 +72,19 @@ public class MainActivity extends ActionBarActivity
|
||||||
));
|
));
|
||||||
restoreData();
|
restoreData();
|
||||||
return true;
|
return true;
|
||||||
} else if (id == R.id.action_undo) {
|
} else if (id == com.ddns.kauron.dungeonmanager.R.id.action_undo) {
|
||||||
undo();
|
undo();
|
||||||
return true;
|
return true;
|
||||||
} else if (id == R.id.action_reset) {
|
} else if (id == com.ddns.kauron.dungeonmanager.R.id.action_reset) {
|
||||||
|
|
||||||
AlertDialog.Builder alert = new AlertDialog.Builder(this);
|
AlertDialog.Builder alert = new AlertDialog.Builder(this);
|
||||||
alert.setTitle(getString(R.string.reset_confirmation_title));
|
alert.setTitle(getString(com.ddns.kauron.dungeonmanager.R.string.reset_confirmation_title));
|
||||||
alert.setMessage(getString(R.string.reset_confirmation));
|
alert.setMessage(getString(com.ddns.kauron.dungeonmanager.R.string.reset_confirmation));
|
||||||
alert.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
|
alert.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int whichButton) {
|
public void onClick(DialogInterface dialog, int whichButton) {
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
getApplicationContext(),
|
getApplicationContext(),
|
||||||
R.string.message_reset,
|
com.ddns.kauron.dungeonmanager.R.string.message_reset,
|
||||||
Toast.LENGTH_LONG
|
Toast.LENGTH_LONG
|
||||||
).show();
|
).show();
|
||||||
getSharedPreferences("basics", MODE_PRIVATE).edit().clear().apply();
|
getSharedPreferences("basics", MODE_PRIVATE).edit().clear().apply();
|
||||||
|
@ -146,14 +146,14 @@ public class MainActivity extends ActionBarActivity
|
||||||
if (hasCured == Player.NOT_CURED) {
|
if (hasCured == Player.NOT_CURED) {
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
getApplicationContext(),
|
getApplicationContext(),
|
||||||
R.string.no_curative_efforts_error,
|
com.ddns.kauron.dungeonmanager.R.string.no_curative_efforts_error,
|
||||||
Toast.LENGTH_LONG
|
Toast.LENGTH_LONG
|
||||||
).show();
|
).show();
|
||||||
} else {
|
} else {
|
||||||
if(hasCured == Player.MAXED){
|
if(hasCured == Player.MAXED){
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
getApplicationContext(),
|
getApplicationContext(),
|
||||||
R.string.maxed_curative,
|
com.ddns.kauron.dungeonmanager.R.string.maxed_curative,
|
||||||
Toast.LENGTH_LONG
|
Toast.LENGTH_LONG
|
||||||
).show();
|
).show();
|
||||||
}
|
}
|
||||||
|
@ -168,18 +168,18 @@ public class MainActivity extends ActionBarActivity
|
||||||
|
|
||||||
public void damage(final View view){
|
public void damage(final View view){
|
||||||
AlertDialog.Builder alert = new AlertDialog.Builder(this);
|
AlertDialog.Builder alert = new AlertDialog.Builder(this);
|
||||||
alert.setTitle(getString(R.string.suffer_damage));
|
alert.setTitle(getString(com.ddns.kauron.dungeonmanager.R.string.suffer_damage));
|
||||||
|
|
||||||
// Set an EditText view to get user input
|
// Set an EditText view to get user input
|
||||||
final EditText input = new EditText(this);
|
final EditText input = new EditText(this);
|
||||||
input.setInputType(InputType.TYPE_CLASS_NUMBER);
|
input.setInputType(InputType.TYPE_CLASS_NUMBER);
|
||||||
input.setHint(R.string.suffer_damage_hint);
|
input.setHint(com.ddns.kauron.dungeonmanager.R.string.suffer_damage_hint);
|
||||||
|
|
||||||
alert.setView(input);
|
alert.setView(input);
|
||||||
|
|
||||||
alert.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
|
alert.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int whichButton) {
|
public void onClick(DialogInterface dialog, int whichButton) {
|
||||||
Button pg = (Button) findViewById(R.id.pgCurrent);
|
Button pg = (Button) findViewById(com.ddns.kauron.dungeonmanager.R.id.pgCurrent);
|
||||||
try {
|
try {
|
||||||
int preValue = Integer.parseInt(pg.getText().toString());
|
int preValue = Integer.parseInt(pg.getText().toString());
|
||||||
int damage = Integer.parseInt(input.getText().toString());
|
int damage = Integer.parseInt(input.getText().toString());
|
||||||
|
@ -212,26 +212,26 @@ public class MainActivity extends ActionBarActivity
|
||||||
private void healthStatusCheck() {
|
private void healthStatusCheck() {
|
||||||
int status = player.getState();
|
int status = player.getState();
|
||||||
int lastState = player.getLastState();
|
int lastState = player.getLastState();
|
||||||
Button pg = (Button) findViewById(R.id.pgCurrent);
|
Button pg = (Button) findViewById(com.ddns.kauron.dungeonmanager.R.id.pgCurrent);
|
||||||
pg.setText(String.valueOf(player.getPg()));
|
pg.setText(String.valueOf(player.getPg()));
|
||||||
if (status == Player.MUERTO) {
|
if (status == Player.MUERTO) {
|
||||||
pg.setTextColor(Color.BLACK);
|
pg.setTextColor(Color.BLACK);
|
||||||
pg.setBackgroundColor(Color.RED);
|
pg.setBackgroundColor(Color.RED);
|
||||||
|
|
||||||
AlertDialog.Builder alert = new AlertDialog.Builder(this);
|
AlertDialog.Builder alert = new AlertDialog.Builder(this);
|
||||||
alert.setTitle(getString(R.string.reset_confirmation_title));
|
alert.setTitle(getString(com.ddns.kauron.dungeonmanager.R.string.reset_confirmation_title));
|
||||||
alert.setMessage(getString(R.string.reset_confirmation));
|
alert.setMessage(getString(com.ddns.kauron.dungeonmanager.R.string.reset_confirmation));
|
||||||
alert.setPositiveButton(R.string.action_undo, new DialogInterface.OnClickListener() {
|
alert.setPositiveButton(com.ddns.kauron.dungeonmanager.R.string.action_undo, new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int whichButton) {
|
public void onClick(DialogInterface dialog, int whichButton) {
|
||||||
undo();
|
undo();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
alert.setNegativeButton(R.string.die, new DialogInterface.OnClickListener() {
|
alert.setNegativeButton(com.ddns.kauron.dungeonmanager.R.string.die, new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int whichButton) {
|
public void onClick(DialogInterface dialog, int whichButton) {
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
getApplicationContext(),
|
getApplicationContext(),
|
||||||
R.string.message_death,
|
com.ddns.kauron.dungeonmanager.R.string.message_death,
|
||||||
Toast.LENGTH_LONG
|
Toast.LENGTH_LONG
|
||||||
).show();
|
).show();
|
||||||
getSharedPreferences("basics", MODE_PRIVATE).edit().clear().apply();
|
getSharedPreferences("basics", MODE_PRIVATE).edit().clear().apply();
|
||||||
|
@ -246,7 +246,7 @@ public class MainActivity extends ActionBarActivity
|
||||||
if(lastState != Player.SAME) {
|
if(lastState != Player.SAME) {
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
getApplicationContext(),
|
getApplicationContext(),
|
||||||
R.string.state_changed_debilitado,
|
com.ddns.kauron.dungeonmanager.R.string.state_changed_debilitado,
|
||||||
Toast.LENGTH_LONG
|
Toast.LENGTH_LONG
|
||||||
).show();
|
).show();
|
||||||
}
|
}
|
||||||
|
@ -256,13 +256,13 @@ public class MainActivity extends ActionBarActivity
|
||||||
if(lastState != Player.SAME) {
|
if(lastState != Player.SAME) {
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
getApplicationContext(),
|
getApplicationContext(),
|
||||||
R.string.state_changed_malherido,
|
com.ddns.kauron.dungeonmanager.R.string.state_changed_malherido,
|
||||||
Toast.LENGTH_LONG
|
Toast.LENGTH_LONG
|
||||||
).show();
|
).show();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
pg.setTextColor(getResources().getColor(
|
pg.setTextColor(getResources().getColor(
|
||||||
R.color.abc_primary_text_material_dark
|
com.ddns.kauron.dungeonmanager.R.color.abc_primary_text_material_dark
|
||||||
));
|
));
|
||||||
pg.setBackgroundColor(android.R.drawable.btn_default);
|
pg.setBackgroundColor(android.R.drawable.btn_default);
|
||||||
}
|
}
|
||||||
|
@ -281,9 +281,9 @@ public class MainActivity extends ActionBarActivity
|
||||||
}
|
}
|
||||||
if(player == null) {
|
if(player == null) {
|
||||||
player = new Player(
|
player = new Player(
|
||||||
p.getString("playerName", getString(R.string.adventurer_name)),
|
p.getString("playerName", getString(com.ddns.kauron.dungeonmanager.R.string.adventurer_name)),
|
||||||
p.getString("className", getString(R.string.class_name)),
|
p.getString("className", getString(com.ddns.kauron.dungeonmanager.R.string.class_name)),
|
||||||
p.getString("raceName", getString(R.string.race_name)),
|
p.getString("raceName", getString(com.ddns.kauron.dungeonmanager.R.string.race_name)),
|
||||||
p.getInt("level", 1),
|
p.getInt("level", 1),
|
||||||
new int[] {
|
new int[] {
|
||||||
p.getInt("fue", 10),
|
p.getInt("fue", 10),
|
||||||
|
@ -296,9 +296,9 @@ public class MainActivity extends ActionBarActivity
|
||||||
new int[18],
|
new int[18],
|
||||||
new Power[4]);
|
new Power[4]);
|
||||||
} else {
|
} else {
|
||||||
player.setName(p.getString("playerName", getString(R.string.adventurer_name)));
|
player.setName(p.getString("playerName", getString(com.ddns.kauron.dungeonmanager.R.string.adventurer_name)));
|
||||||
player.setClassName(p.getString("className", getString(R.string.class_name)));
|
player.setClassName(p.getString("className", getString(com.ddns.kauron.dungeonmanager.R.string.class_name)));
|
||||||
player.setRaceName(p.getString("raceName", getString(R.string.race_name)));
|
player.setRaceName(p.getString("raceName", getString(com.ddns.kauron.dungeonmanager.R.string.race_name)));
|
||||||
player.setLevel(p.getInt("level", 1));
|
player.setLevel(p.getInt("level", 1));
|
||||||
//TODO: restore pg
|
//TODO: restore pg
|
||||||
player.setAtk(new int[]{
|
player.setAtk(new int[]{
|
||||||
|
@ -313,45 +313,45 @@ public class MainActivity extends ActionBarActivity
|
||||||
updateCurativeString();
|
updateCurativeString();
|
||||||
}
|
}
|
||||||
//set restored values to the respective fields
|
//set restored values to the respective fields
|
||||||
((TextView) findViewById(R.id.nameText)).setText(player.getName());
|
((TextView) findViewById(com.ddns.kauron.dungeonmanager.R.id.nameText)).setText(player.getName());
|
||||||
((TextView) findViewById(R.id.raceText)).setText(player.getRaceName());
|
((TextView) findViewById(com.ddns.kauron.dungeonmanager.R.id.raceText)).setText(player.getRaceName());
|
||||||
((TextView) findViewById(R.id.classText)).setText(player.getClassName());
|
((TextView) findViewById(com.ddns.kauron.dungeonmanager.R.id.classText)).setText(player.getClassName());
|
||||||
((TextView) findViewById(R.id.lvl)).setText(String.valueOf(player.getLevel()));
|
((TextView) findViewById(com.ddns.kauron.dungeonmanager.R.id.lvl)).setText(String.valueOf(player.getLevel()));
|
||||||
|
|
||||||
((Button) findViewById(R.id.pgCurrent)).setText(String.valueOf(player.getPg()));
|
((Button) findViewById(com.ddns.kauron.dungeonmanager.R.id.pgCurrent)).setText(String.valueOf(player.getPg()));
|
||||||
|
|
||||||
//attacks
|
//attacks
|
||||||
((TextView) findViewById(R.id.FUE)).setText(
|
((TextView) findViewById(com.ddns.kauron.dungeonmanager.R.id.FUE)).setText(
|
||||||
getString(R.string.FUE) + ":" + player.getFue()
|
getString(com.ddns.kauron.dungeonmanager.R.string.FUE) + ":" + player.getFue()
|
||||||
);
|
);
|
||||||
((TextView) findViewById(R.id.CON)).setText(
|
((TextView) findViewById(com.ddns.kauron.dungeonmanager.R.id.CON)).setText(
|
||||||
getString(R.string.CON) + ":" + player.getCon()
|
getString(com.ddns.kauron.dungeonmanager.R.string.CON) + ":" + player.getCon()
|
||||||
);
|
);
|
||||||
((TextView) findViewById(R.id.DES)).setText(
|
((TextView) findViewById(com.ddns.kauron.dungeonmanager.R.id.DES)).setText(
|
||||||
getString(R.string.DES) + ":" + player.getDes()
|
getString(com.ddns.kauron.dungeonmanager.R.string.DES) + ":" + player.getDes()
|
||||||
);
|
);
|
||||||
((TextView) findViewById(R.id.INT)).setText(
|
((TextView) findViewById(com.ddns.kauron.dungeonmanager.R.id.INT)).setText(
|
||||||
getString(R.string.INT) + ":" + player.getInt()
|
getString(com.ddns.kauron.dungeonmanager.R.string.INT) + ":" + player.getInt()
|
||||||
);
|
);
|
||||||
((TextView) findViewById(R.id.SAB)).setText(
|
((TextView) findViewById(com.ddns.kauron.dungeonmanager.R.id.SAB)).setText(
|
||||||
getString(R.string.SAB) + ":" + player.getSab()
|
getString(com.ddns.kauron.dungeonmanager.R.string.SAB) + ":" + player.getSab()
|
||||||
);
|
);
|
||||||
((TextView) findViewById(R.id.CAR)).setText(
|
((TextView) findViewById(com.ddns.kauron.dungeonmanager.R.id.CAR)).setText(
|
||||||
getString(R.string.CAR) + ":" + player.getCar()
|
getString(com.ddns.kauron.dungeonmanager.R.string.CAR) + ":" + player.getCar()
|
||||||
);
|
);
|
||||||
|
|
||||||
//defenses
|
//defenses
|
||||||
((TextView) findViewById(R.id.CA)).setText(
|
((TextView) findViewById(com.ddns.kauron.dungeonmanager.R.id.CA)).setText(
|
||||||
getString(R.string.CA) + ": " + player.getCa()
|
getString(com.ddns.kauron.dungeonmanager.R.string.CA) + ": " + player.getCa()
|
||||||
);
|
);
|
||||||
((TextView) findViewById(R.id.FORT)).setText(
|
((TextView) findViewById(com.ddns.kauron.dungeonmanager.R.id.FORT)).setText(
|
||||||
getString(R.string.FORT) + ": " + player.getFort()
|
getString(com.ddns.kauron.dungeonmanager.R.string.FORT) + ": " + player.getFort()
|
||||||
);
|
);
|
||||||
((TextView) findViewById(R.id.REF)).setText(
|
((TextView) findViewById(com.ddns.kauron.dungeonmanager.R.id.REF)).setText(
|
||||||
getString(R.string.REF) + ": " + player.getRef()
|
getString(com.ddns.kauron.dungeonmanager.R.string.REF) + ": " + player.getRef()
|
||||||
);
|
);
|
||||||
((TextView) findViewById(R.id.VOL)).setText(
|
((TextView) findViewById(com.ddns.kauron.dungeonmanager.R.id.VOL)).setText(
|
||||||
getString(R.string.VOL) + ": " + player.getVol()
|
getString(com.ddns.kauron.dungeonmanager.R.string.VOL) + ": " + player.getVol()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
@ -368,22 +368,22 @@ public class MainActivity extends ActionBarActivity
|
||||||
// }
|
// }
|
||||||
|
|
||||||
private void updateCurativeString() {
|
private void updateCurativeString() {
|
||||||
((TextView) findViewById(R.id.curativeEffortsText)).setText(
|
((TextView) findViewById(com.ddns.kauron.dungeonmanager.R.id.curativeEffortsText)).setText(
|
||||||
getString(R.string.curative_display_text1) + " " +
|
getString(com.ddns.kauron.dungeonmanager.R.string.curative_display_text1) + " " +
|
||||||
player.getCurativeEfforts() + " " +
|
player.getCurativeEfforts() + " " +
|
||||||
getString(R.string.curative_display_text2) + " " +
|
getString(com.ddns.kauron.dungeonmanager.R.string.curative_display_text2) + " " +
|
||||||
player.getMaxCurativeEfforts() + " " +
|
player.getMaxCurativeEfforts() + " " +
|
||||||
getString(R.string.curative_display_text3)
|
getString(com.ddns.kauron.dungeonmanager.R.string.curative_display_text3)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void undo() {
|
private void undo() {
|
||||||
String message = "";
|
String message = "";
|
||||||
if(undoObject == CURRENT_PG){
|
if(undoObject == CURRENT_PG){
|
||||||
((Button) findViewById(R.id.pgCurrent)).setText(String.valueOf(undoPreviousValue));
|
((Button) findViewById(com.ddns.kauron.dungeonmanager.R.id.pgCurrent)).setText(String.valueOf(undoPreviousValue));
|
||||||
player.setPg(undoPreviousValue);
|
player.setPg(undoPreviousValue);
|
||||||
undoObject = NULL;
|
undoObject = NULL;
|
||||||
message = getString(R.string.action_undo_current_pg);
|
message = getString(com.ddns.kauron.dungeonmanager.R.string.action_undo_current_pg);
|
||||||
}
|
}
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
getApplicationContext(),
|
getApplicationContext(),
|
|
@ -1,4 +1,4 @@
|
||||||
package com.ddns.kauron.dungeonmanager;
|
package com.kauron.dungeonmanager;
|
||||||
|
|
||||||
public class Player {
|
public class Player {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package com.ddns.kauron.dungeonmanager;
|
package com.kauron.dungeonmanager;
|
||||||
|
|
||||||
public class Power {
|
public class Power {
|
||||||
public static final int DIARIO = 1, A_VOLUNTAD = 2, ENCUENTRO = 3, OPORTUNIDAD = 4;
|
public static final int DIARIO = 1, A_VOLUNTAD = 2, ENCUENTRO = 3, OPORTUNIDAD = 4;
|
|
@ -4,7 +4,7 @@
|
||||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||||
android:paddingTop="@dimen/activity_vertical_margin"
|
android:paddingTop="@dimen/activity_vertical_margin"
|
||||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||||
tools:context="com.ddns.kauron.dungeonmanager.Introduction">
|
tools:context="com.ddns.kauron.com.kauron.dungeonmanager.Introduction">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
tools:context="com.ddns.kauron.dungeonmanager.Introduction">
|
tools:context="com.kauron.dungeonmanager.Introduction">
|
||||||
<item android:id="@+id/action_finish"
|
<item android:id="@+id/action_finish"
|
||||||
android:title="@string/action_finish"
|
android:title="@string/action_finish"
|
||||||
android:orderInCategory="100"
|
android:orderInCategory="100"
|
||||||
|
|
Reference in a new issue