Initial commit
1
app/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/build
|
91
app/app.iml
Normal file
|
@ -0,0 +1,91 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" type="JAVA_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="android-gradle" name="Android-Gradle">
|
||||
<configuration>
|
||||
<option name="GRADLE_PROJECT_PATH" value=":app" />
|
||||
</configuration>
|
||||
</facet>
|
||||
<facet type="android" name="Android">
|
||||
<configuration>
|
||||
<option name="SELECTED_BUILD_VARIANT" value="debug" />
|
||||
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
|
||||
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
|
||||
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugTest" />
|
||||
<option name="SOURCE_GEN_TASK_NAME" value="generateDebugSources" />
|
||||
<option name="TEST_SOURCE_GEN_TASK_NAME" value="generateDebugTestSources" />
|
||||
<option name="ALLOW_USER_CONFIGURATION" value="false" />
|
||||
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
|
||||
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
|
||||
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" />
|
||||
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="false">
|
||||
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/generated/debug" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/test/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/test/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/test/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/test/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/test/debug" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/generated/test/debug" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/coverage-instrumented-classes" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex-cache" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jacoco" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaResources" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/libs" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/ndk" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/proguard" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="Android API 21 Platform" jdkType="Android SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" exported="" name="appcompat-v7-21.0.3" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-v4-21.0.3" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-annotations-21.0.3" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
|
25
app/build.gradle
Normal file
|
@ -0,0 +1,25 @@
|
|||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 21
|
||||
buildToolsVersion "21.1.2"
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.ddns.kauron.dungeonmanager"
|
||||
minSdkVersion 15
|
||||
targetSdkVersion 21
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
||||
compile 'com.android.support:appcompat-v7:21.0.3'
|
||||
}
|
17
app/proguard-rules.pro
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
# Add project specific ProGuard rules here.
|
||||
# By default, the flags in this file are appended to flags specified
|
||||
# in C:\Users\Carlos\AppData\Local\Android\sdk/tools/proguard/proguard-android.txt
|
||||
# You can edit the include path and order by changing the proguardFiles
|
||||
# directive in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# Add any project specific keep options here:
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
|
@ -0,0 +1,13 @@
|
|||
package com.ddns.kauron.dungeonmanager;
|
||||
|
||||
import android.app.Application;
|
||||
import android.test.ApplicationTestCase;
|
||||
|
||||
/**
|
||||
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
|
||||
*/
|
||||
public class ApplicationTest extends ApplicationTestCase<Application> {
|
||||
public ApplicationTest() {
|
||||
super(Application.class);
|
||||
}
|
||||
}
|
29
app/src/main/AndroidManifest.xml
Normal file
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.ddns.kauron.dungeonmanager" >
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/AppTheme" >
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:label="@string/app_name" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".Introduction"
|
||||
android:parentActivityName=".MainActivity"
|
||||
android:label="@string/title_activity_introduction" >
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value="com.ddns.kauron.dungeonmanager.MainActivity" />
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
BIN
app/src/main/ic_launcher-web.png
Normal file
After Width: | Height: | Size: 124 KiB |
|
@ -0,0 +1,66 @@
|
|||
package com.ddns.kauron.dungeonmanager;
|
||||
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.app.DialogFragment;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
|
||||
public class HealthDialogFragment extends DialogFragment {
|
||||
|
||||
static HealthDialogFragment newInstance(int curativeEfforts) {
|
||||
HealthDialogFragment f = new HealthDialogFragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putInt("curativeEfforts", curativeEfforts);
|
||||
f.setArguments(args);
|
||||
|
||||
return f;
|
||||
}
|
||||
|
||||
public interface HealthDialogListener {
|
||||
public void curativeEffort(DialogFragment dialog, boolean uses);
|
||||
}
|
||||
|
||||
|
||||
HealthDialogListener mListener;
|
||||
|
||||
@Override
|
||||
public void onAttach(Activity activity) {
|
||||
super.onAttach(activity);
|
||||
try{
|
||||
mListener = (HealthDialogListener) activity;
|
||||
}catch(ClassCastException e){
|
||||
throw new ClassCastException(activity.toString() + " must implement HealthDialogListener");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
String message = getString(R.string.new_energies1) +
|
||||
" " + getArguments().getInt("curativeEfforts") + " " +
|
||||
getString(R.string.new_energies2);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||
builder.setMessage(message)
|
||||
.setTitle(R.string.new_energies_title)
|
||||
.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
mListener.curativeEffort(HealthDialogFragment.this, true);
|
||||
}
|
||||
})
|
||||
.setNegativeButton(R.string.no, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
mListener.curativeEffort(HealthDialogFragment.this, false);
|
||||
}
|
||||
})
|
||||
.setNeutralButton(R.string.cancel, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
dialog.cancel();
|
||||
}
|
||||
});
|
||||
return builder.create();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,102 @@
|
|||
package com.ddns.kauron.dungeonmanager;
|
||||
|
||||
import android.content.SharedPreferences;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.os.Bundle;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.widget.EditText;
|
||||
import android.widget.Toast;
|
||||
|
||||
|
||||
public class Introduction extends ActionBarActivity {
|
||||
|
||||
EditText name, className, raceName, level, maxPg;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
setContentView(R.layout.activity_introduction);
|
||||
name = (EditText) findViewById(R.id.editNameIntro);
|
||||
className = (EditText) findViewById(R.id.editClassIntro);
|
||||
raceName = (EditText) findViewById(R.id.editRaceIntro);
|
||||
level = (EditText) findViewById(R.id.editLevelIntro);
|
||||
maxPg = (EditText) findViewById(R.id.editMaxPgIntro);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
// Inflate the menu; this adds items to the action bar if it is present.
|
||||
getMenuInflater().inflate(R.menu.menu_introduction, menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
// Handle action bar item clicks here. The action bar will
|
||||
// automatically handle clicks on the Home/Up button, so long
|
||||
// as you specify a parent activity in AndroidManifest.xml.
|
||||
int id = item.getItemId();
|
||||
|
||||
//noinspection SimplifiableIfStatement
|
||||
if (id == R.id.action_finish) {
|
||||
if(finished()) {
|
||||
this.finish();
|
||||
} else {
|
||||
Toast.makeText(
|
||||
getApplicationContext(),
|
||||
R.string.missing_info_error,
|
||||
Toast.LENGTH_LONG
|
||||
).show();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
//TODO: fix this
|
||||
private boolean finished() {
|
||||
SharedPreferences p = getSharedPreferences("basics", MODE_PRIVATE);
|
||||
SharedPreferences.Editor ed = p.edit();
|
||||
String nameString = name.getText().toString();
|
||||
String classString = className.getText().toString();
|
||||
String raceString = raceName.getText().toString();
|
||||
int levelInt = 0, maxPgInt = 0;
|
||||
try {
|
||||
levelInt = Integer.parseInt(level.getText().toString());
|
||||
maxPgInt = Integer.parseInt(level.getText().toString());
|
||||
} catch (Exception e) {}
|
||||
if(getIntent().getExtras().getBoolean("first_time")) {
|
||||
if (!nameString.isEmpty() &&
|
||||
!classString.isEmpty() &&
|
||||
!raceString.isEmpty() &&
|
||||
levelInt != 0 &&
|
||||
maxPgInt != 0) {
|
||||
//first save it all
|
||||
ed.putString("playerName", nameString);
|
||||
ed.putString("className", classString);
|
||||
ed.putString("raceName", raceString);
|
||||
if(p.getInt("pg", Integer.MIN_VALUE) == Integer.MIN_VALUE)
|
||||
ed.putInt("pg", maxPgInt);
|
||||
ed.putInt("level", levelInt);
|
||||
ed.putInt("maxPg", maxPgInt);
|
||||
ed.putBoolean("saved", true);
|
||||
ed.apply();
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if(!nameString.isEmpty()) ed.putString("playerName", nameString);
|
||||
if(!classString.isEmpty()) ed.putString("className", classString);
|
||||
if(!raceString.isEmpty()) ed.putString("raceName", raceString);
|
||||
if(levelInt != 0) ed.putInt("level", levelInt);
|
||||
if(maxPgInt != 0) ed.putInt("maxPg", maxPgInt);
|
||||
ed.apply();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,209 @@
|
|||
package com.ddns.kauron.dungeonmanager;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.DialogFragment;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.graphics.Color;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.os.Bundle;
|
||||
import android.text.InputType;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
|
||||
public class MainActivity extends ActionBarActivity
|
||||
implements HealthDialogFragment.HealthDialogListener{
|
||||
|
||||
public static final int CURRENT_PG = 1, NULL = 0;
|
||||
|
||||
public Player player;
|
||||
private boolean undo;
|
||||
private int undoObject, undoPreviousValue;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
restoreData();
|
||||
undo = false;
|
||||
invalidateOptionsMenu();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
// Inflate the menu; this adds items to the action bar if it is present.
|
||||
getMenuInflater().inflate(R.menu.menu_main, menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPrepareOptionsMenu (Menu menu) {
|
||||
menu.findItem(R.id.action_undo).setVisible(undo);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
// Handle action bar item clicks here. The action bar will
|
||||
// automatically handle clicks on the Home/Up button, so long
|
||||
// as you specify a parent activity in AndroidManifest.xml.
|
||||
int id = item.getItemId();
|
||||
|
||||
//noinspection SimplifiableIfStatement
|
||||
if (id == R.id.action_cure) {
|
||||
showHealthDialog();
|
||||
return true;
|
||||
} else if (id == R.id.action_edit_basics) {
|
||||
SharedPreferences p = getSharedPreferences("basics", MODE_PRIVATE);
|
||||
Intent intent = new Intent(this, Introduction.class);
|
||||
startActivity(intent.putExtra(
|
||||
"first_time",
|
||||
!p.getBoolean("saved", false)
|
||||
));
|
||||
restoreData();
|
||||
return true;
|
||||
} else if (id == R.id.action_undo) {
|
||||
String message = "";
|
||||
if(undoObject == CURRENT_PG){
|
||||
((Button) findViewById(R.id.pgCurrent)).setText(String.valueOf(undoPreviousValue));
|
||||
undoObject = NULL;
|
||||
message = getString(R.string.action_undo_current_pg);
|
||||
}
|
||||
Toast.makeText(
|
||||
getApplicationContext(),
|
||||
message,
|
||||
Toast.LENGTH_LONG
|
||||
).show();
|
||||
undo = false;
|
||||
invalidateOptionsMenu();
|
||||
return true;
|
||||
} else if (id == R.id.action_calendar_activity) {
|
||||
Intent intent = new Intent(Intent.ACTION_EDIT);
|
||||
intent.setType("vnd.android.cursor.item/event");
|
||||
intent.putExtra("title", R.string.dungeons_and_dragons);
|
||||
startActivity(intent);
|
||||
} else if (id == R.id.action_save) {
|
||||
saveData();
|
||||
}
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
public void showHealthDialog(){
|
||||
DialogFragment dialog = HealthDialogFragment.newInstance(player.getCurativeEfforts());
|
||||
dialog.show(getFragmentManager(), "HealthDialogFragment");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void curativeEffort(DialogFragment dialog, boolean uses) {
|
||||
int hasCured = player.recoverPg(Player.USE_CURATIVE_EFFORT, uses);
|
||||
if (hasCured == Player.NOT_CURED) {
|
||||
Toast.makeText(
|
||||
getApplicationContext(),
|
||||
R.string.no_curative_efforts_error,
|
||||
Toast.LENGTH_LONG
|
||||
).show();
|
||||
} else {
|
||||
if(hasCured == Player.MAXED){
|
||||
Toast.makeText(
|
||||
getApplicationContext(),
|
||||
R.string.maxed_curative,
|
||||
Toast.LENGTH_LONG
|
||||
).show();
|
||||
}
|
||||
healthStatusCheck();
|
||||
}
|
||||
}
|
||||
|
||||
public void onCurrentPgClick(final View view){
|
||||
AlertDialog.Builder alert = new AlertDialog.Builder(this);
|
||||
alert.setTitle(getString(R.string.suffer_damage));
|
||||
|
||||
// Set an EditText view to get user input
|
||||
final EditText input = new EditText(this);
|
||||
input.setInputType(InputType.TYPE_CLASS_NUMBER);
|
||||
input.setHint(R.string.suffer_damage_hint);
|
||||
|
||||
|
||||
alert.setView(input);
|
||||
|
||||
alert.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int whichButton) {
|
||||
Button pg = (Button) findViewById(R.id.pgCurrent);
|
||||
try {
|
||||
int preValue = Integer.parseInt(pg.getText().toString());
|
||||
int damage = Integer.parseInt(input.getText().toString());
|
||||
player.losePg(damage);
|
||||
pg.setText(
|
||||
String.valueOf(player.getPg())
|
||||
);
|
||||
//finished correctly, then apply values to undo's
|
||||
healthStatusCheck();
|
||||
undo = true;
|
||||
undoPreviousValue = preValue;
|
||||
undoObject = CURRENT_PG;
|
||||
invalidateOptionsMenu();
|
||||
} catch (Exception e) {}
|
||||
}
|
||||
});
|
||||
|
||||
alert.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int whichButton) {
|
||||
// Canceled.
|
||||
}
|
||||
});
|
||||
|
||||
alert.show();
|
||||
}
|
||||
|
||||
private void healthStatusCheck(){
|
||||
int status = player.getState();
|
||||
Button pg = (Button) findViewById(R.id.pgCurrent);
|
||||
pg.setText(String.valueOf(player.getPg()));
|
||||
if (status == Player.MUERTO) {
|
||||
pg.setText("");
|
||||
} else if (status == Player.DEBILITADO)
|
||||
pg.setTextColor(Color.RED);
|
||||
else if (status == Player.MALHERIDO)
|
||||
pg.setTextColor(Color.YELLOW);
|
||||
else pg.setTextColor(getResources().getColor(R.color.abc_primary_text_material_dark));
|
||||
}
|
||||
|
||||
|
||||
private void restoreData(){
|
||||
SharedPreferences p = getSharedPreferences("basics", MODE_PRIVATE);
|
||||
//restore state
|
||||
player = new Player(
|
||||
p.getString("playerName", getString(R.string.adventurer_name)),
|
||||
p.getString("className", getString(R.string.class_name)),
|
||||
p.getString("raceName", getString(R.string.race_name)),
|
||||
p.getInt("level", 1),
|
||||
p.getInt("maxPg", 15),
|
||||
p.getInt("pg", 15),
|
||||
p.getInt("maxCurativeEfforts", 5),
|
||||
p.getInt("curativeEfforts", 5),
|
||||
new int[6],
|
||||
new int[3],
|
||||
new int[18],
|
||||
new Power[4]);
|
||||
//set restored values to the respective fields
|
||||
((TextView) findViewById(R.id.nameText)).setText(player.getName());
|
||||
((TextView) findViewById(R.id.raceText)).setText(player.getRaceName());
|
||||
((TextView) findViewById(R.id.classText)).setText(player.getClassName());
|
||||
((TextView) findViewById(R.id.lvl)).setText(String.valueOf(player.getLevel()));
|
||||
((Button) findViewById(R.id.pgCurrent)).setText(String.valueOf(player.getMaxPg()));
|
||||
}
|
||||
|
||||
private void saveData() {
|
||||
|
||||
}
|
||||
}
|
115
app/src/main/java/com/ddns/kauron/dungeonmanager/Player.java
Normal file
|
@ -0,0 +1,115 @@
|
|||
package com.ddns.kauron.dungeonmanager;
|
||||
|
||||
public class Player {
|
||||
/**
|
||||
* Values for attack
|
||||
*/
|
||||
public static final int FUE = 1, CON = 2, DES = 3, INT = 4, SAB = 5, CAR = 6;
|
||||
|
||||
/**
|
||||
* Values for defenses
|
||||
*/
|
||||
public static final int CA = 1, FORT = 2, REF = 3, VOL = 4;
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
public static final String[] abilityString = new String[] {
|
||||
"Acrobacias", "Aguante", "Arcanos", "Atletismo", "Diplomacia", "Dungeons", "Engañar",
|
||||
"Historia", "Hurto", "Intimidar", "Naturaleza", "Percepción", "Perspicacia", "Recursos",
|
||||
"Religión", "Sanar", "Sigilo"
|
||||
};
|
||||
|
||||
/**
|
||||
* Values for the current living state
|
||||
*/
|
||||
public static final int OK = 1, MALHERIDO = 2, DEBILITADO = 3, MUERTO = 4,
|
||||
USE_CURATIVE_EFFORT = -1, CURED = 1, NOT_CURED = 0, MAXED = -1;
|
||||
|
||||
private int pg, maxPg;
|
||||
private int state;
|
||||
private int curativeEfforts, maxCurativeEfforts;
|
||||
private int[] atk, def, abilities;
|
||||
private Power[] powers;
|
||||
private String name, className, raceName;
|
||||
private int level;
|
||||
|
||||
|
||||
public Player(String name, String className, String raceName, int level, int maxPg, int pg,
|
||||
int maxCurativeEfforts, int curativeEfforts, int[] atk, int[] def, int[] abilities, Power[] powers){
|
||||
this.maxPg = maxPg;
|
||||
this.pg = pg;
|
||||
setState();
|
||||
this.name = name;
|
||||
this.className = className;
|
||||
this.raceName = raceName;
|
||||
this.level = level;
|
||||
this.atk = atk;
|
||||
this.def = def;
|
||||
this.abilities = abilities;
|
||||
this.powers = powers;
|
||||
this.maxCurativeEfforts = maxCurativeEfforts;
|
||||
this.curativeEfforts = curativeEfforts;
|
||||
}
|
||||
|
||||
|
||||
public int getCurativeEfforts() {return curativeEfforts;}
|
||||
public void setCurativeEffort(int curativeEfforts) {this.curativeEfforts = curativeEfforts;}
|
||||
|
||||
public int getLevel() {return level;}
|
||||
|
||||
public int getMaxPg() {return maxPg;}
|
||||
public void setMaxPg(int pg) {this.pg = pg;}
|
||||
|
||||
public int getPg() {return pg;}
|
||||
public void setPg(int pg) {this.pg = pg;}
|
||||
public void losePg(int damage) {
|
||||
pg -= damage;
|
||||
setState();
|
||||
}
|
||||
public int recoverPg(int recovered, boolean uses) {
|
||||
if(recovered == USE_CURATIVE_EFFORT){
|
||||
if(uses && curativeEfforts <= 0) return NOT_CURED;
|
||||
else {
|
||||
if(uses) curativeEfforts--;
|
||||
pg += maxPg / 4;
|
||||
}
|
||||
} else {
|
||||
pg += recovered;
|
||||
}
|
||||
setState();
|
||||
|
||||
if (pg > maxPg) {pg = maxPg; return MAXED;}
|
||||
|
||||
return CURED;
|
||||
}
|
||||
|
||||
public int getState() {return state;}
|
||||
private void setState() {
|
||||
if (pg < maxPg / -2) state = MUERTO;
|
||||
else if (pg < 0) state = DEBILITADO;
|
||||
else if(pg < maxPg / 2) state = MALHERIDO;
|
||||
else state = OK;
|
||||
}
|
||||
|
||||
public String getName() {return name;}
|
||||
public String getClassName() {return className;}
|
||||
public String getRaceName() {return raceName;}
|
||||
|
||||
|
||||
public void rest(boolean length) {
|
||||
if(length) {
|
||||
curativeEfforts = maxCurativeEfforts;
|
||||
for(Power p : powers){
|
||||
if(p != null) p.recover();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
24
app/src/main/java/com/ddns/kauron/dungeonmanager/Power.java
Normal file
|
@ -0,0 +1,24 @@
|
|||
package com.ddns.kauron.dungeonmanager;
|
||||
|
||||
public class Power {
|
||||
public static final int DIARIO = 1, A_VOLUNTAD = 2, ENCUENTRO = 3, OPORTUNIDAD = 4;
|
||||
|
||||
private boolean used;
|
||||
private int type;
|
||||
private String name;
|
||||
|
||||
|
||||
public Power(String name, int type){
|
||||
this.name = name;
|
||||
this.type = type;
|
||||
used = false;
|
||||
}
|
||||
|
||||
public String getName(){return name;}
|
||||
public int getType(){return type;}
|
||||
|
||||
public boolean isUsed(){return used;}
|
||||
|
||||
public void use(){used = true;}
|
||||
public void recover(){used = false;}
|
||||
}
|
BIN
app/src/main/res/drawable-hdpi/ic_action_done.png
Normal file
After Width: | Height: | Size: 282 B |
BIN
app/src/main/res/drawable-hdpi/ic_action_edit.png
Normal file
After Width: | Height: | Size: 383 B |
BIN
app/src/main/res/drawable-hdpi/ic_action_heal.png
Normal file
After Width: | Height: | Size: 254 B |
BIN
app/src/main/res/drawable-hdpi/ic_action_name.png
Normal file
After Width: | Height: | Size: 798 B |
BIN
app/src/main/res/drawable-hdpi/ic_action_save.png
Normal file
After Width: | Height: | Size: 258 B |
BIN
app/src/main/res/drawable-hdpi/ic_action_undo.png
Normal file
After Width: | Height: | Size: 443 B |
BIN
app/src/main/res/drawable-hdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
app/src/main/res/drawable-mdpi/ic_action_done.png
Normal file
After Width: | Height: | Size: 220 B |
BIN
app/src/main/res/drawable-mdpi/ic_action_edit.png
Normal file
After Width: | Height: | Size: 269 B |
BIN
app/src/main/res/drawable-mdpi/ic_action_heal.png
Normal file
After Width: | Height: | Size: 200 B |
BIN
app/src/main/res/drawable-mdpi/ic_action_name.png
Normal file
After Width: | Height: | Size: 490 B |
BIN
app/src/main/res/drawable-mdpi/ic_action_save.png
Normal file
After Width: | Height: | Size: 202 B |
BIN
app/src/main/res/drawable-mdpi/ic_action_undo.png
Normal file
After Width: | Height: | Size: 313 B |
BIN
app/src/main/res/drawable-mdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_action_done.png
Normal file
After Width: | Height: | Size: 321 B |
BIN
app/src/main/res/drawable-xhdpi/ic_action_edit.png
Normal file
After Width: | Height: | Size: 475 B |
BIN
app/src/main/res/drawable-xhdpi/ic_action_heal.png
Normal file
After Width: | Height: | Size: 315 B |
BIN
app/src/main/res/drawable-xhdpi/ic_action_name.png
Normal file
After Width: | Height: | Size: 1 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_action_save.png
Normal file
After Width: | Height: | Size: 312 B |
BIN
app/src/main/res/drawable-xhdpi/ic_action_undo.png
Normal file
After Width: | Height: | Size: 568 B |
BIN
app/src/main/res/drawable-xhdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 6.9 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_action_done.png
Normal file
After Width: | Height: | Size: 478 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_action_edit.png
Normal file
After Width: | Height: | Size: 678 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_action_heal.png
Normal file
After Width: | Height: | Size: 435 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_action_name.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_action_save.png
Normal file
After Width: | Height: | Size: 417 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_action_undo.png
Normal file
After Width: | Height: | Size: 900 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 13 KiB |
77
app/src/main/res/layout/activity_introduction.xml
Normal file
|
@ -0,0 +1,77 @@
|
|||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
tools:context="com.ddns.kauron.dungeonmanager.Introduction">
|
||||
|
||||
<EditText
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textPersonName"
|
||||
android:ems="10"
|
||||
android:id="@+id/editNameIntro"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:hint="@string/adventurer_name"/>
|
||||
|
||||
<EditText
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textPersonName"
|
||||
android:ems="10"
|
||||
android:id="@+id/editRaceIntro"
|
||||
android:layout_below="@+id/editClassIntro"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:hint="@string/race_name" />
|
||||
|
||||
<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:inputType="number"
|
||||
android:ems="10"
|
||||
android:id="@+id/editLevelIntro"
|
||||
android:hint="@string/level"
|
||||
android:width="70dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignLeft="@+id/editMaxPgIntro"
|
||||
android:layout_alignStart="@+id/editMaxPgIntro" />
|
||||
|
||||
<EditText
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="number"
|
||||
android:ems="10"
|
||||
android:id="@+id/editMaxPgIntro"
|
||||
android:layout_below="@+id/editLevelIntro"
|
||||
android:hint="@string/max_pg"
|
||||
android:layout_alignLeft="@+id/editMaxEffortIntro"
|
||||
android:layout_alignStart="@+id/editMaxEffortIntro" />
|
||||
|
||||
<EditText
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="number"
|
||||
android:ems="10"
|
||||
android:id="@+id/editMaxEffortIntro"
|
||||
android:layout_alignTop="@+id/editRaceIntro"
|
||||
android:layout_toEndOf="@+id/editRaceIntro"
|
||||
android:hint="@string/max_curative_efforts"
|
||||
android:layout_toRightOf="@+id/editRaceIntro" />
|
||||
</RelativeLayout>
|
82
app/src/main/res/layout/activity_main.xml
Normal file
|
@ -0,0 +1,82 @@
|
|||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".MainActivity">
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:id="@+id/pgCurrent"
|
||||
android:textSize="40sp"
|
||||
android:onClick="onCurrentPgClick"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true" />
|
||||
|
||||
<RelativeLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_toLeftOf="@+id/pgCurrent"
|
||||
android:layout_toStartOf="@+id/pgCurrent"
|
||||
android:id="@+id/linearLayout">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="@string/adventurer_name"
|
||||
android:id="@+id/nameText"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="@string/race_name"
|
||||
android:id="@+id/raceText"
|
||||
android:layout_alignTop="@+id/classText"
|
||||
android:layout_toRightOf="@+id/classText"
|
||||
android:layout_toEndOf="@+id/classText"
|
||||
android:layout_marginLeft="10dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="@string/class_name"
|
||||
android:id="@+id/classText"
|
||||
android:layout_below="@+id/nameText"
|
||||
android:layout_alignParentStart="false"
|
||||
android:layout_alignParentLeft="true" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="@string/level"
|
||||
android:id="@+id/lvlText"
|
||||
android:layout_alignParentBottom="false"
|
||||
android:layout_toRightOf="@+id/raceText"
|
||||
android:layout_toEndOf="@+id/raceText"
|
||||
android:layout_alignTop="@+id/raceText"
|
||||
android:layout_marginLeft="10dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:id="@+id/lvl"
|
||||
android:layout_alignParentBottom="false"
|
||||
android:layout_toRightOf="@+id/lvlText"
|
||||
android:layout_toEndOf="@+id/lvlText"
|
||||
android:layout_alignTop="@+id/lvlText"
|
||||
android:layout_marginLeft="10dp" />
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
10
app/src/main/res/menu/menu_introduction.xml
Normal file
|
@ -0,0 +1,10 @@
|
|||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context="com.ddns.kauron.dungeonmanager.Introduction">
|
||||
<item android:id="@+id/action_finish"
|
||||
android:title="@string/action_finish"
|
||||
android:orderInCategory="100"
|
||||
android:icon="@drawable/ic_action_done"
|
||||
app:showAsAction="ifRoom" />
|
||||
</menu>
|
34
app/src/main/res/menu/menu_main.xml
Normal file
|
@ -0,0 +1,34 @@
|
|||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools" tools:context=".MainActivity">
|
||||
<item
|
||||
android:id="@+id/action_undo"
|
||||
android:title="@string/action_undo"
|
||||
android:orderInCategory="1"
|
||||
app:showAsAction="always"
|
||||
android:icon="@drawable/ic_action_undo"/>
|
||||
<item
|
||||
android:id="@+id/action_cure"
|
||||
android:title="@string/action_cure"
|
||||
android:orderInCategory="2"
|
||||
app:showAsAction="always"
|
||||
android:icon="@drawable/ic_action_heal"/>
|
||||
<item
|
||||
android:id="@+id/action_save"
|
||||
android:title="@string/action_save"
|
||||
android:orderInCategory="3"
|
||||
app:showAsAction="ifRoom"
|
||||
android:icon="@drawable/ic_action_save"/>
|
||||
<item
|
||||
android:id="@+id/action_edit_basics"
|
||||
android:title="@string/action_edit_basics"
|
||||
android:orderInCategory="4"
|
||||
app:showAsAction="ifRoom"
|
||||
android:icon="@drawable/ic_action_edit"/>
|
||||
<item
|
||||
android:id="@+id/action_calendar_activity"
|
||||
android:title="@string/action_calendar_activity"
|
||||
android:orderInCategory="5"
|
||||
app:showAsAction="never" />
|
||||
|
||||
</menu>
|
32
app/src/main/res/values-es/strings.xml
Normal file
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">DungeonManager</string>
|
||||
<string name="action_cure">Curar</string>
|
||||
<string name="action_edit_basics">Editar personaje</string>
|
||||
<string name="action_finish">Hecho</string>
|
||||
<string name="adventurer_name">Nombre</string>
|
||||
<string name="cancel">Cancelar</string>
|
||||
<string name="class_name">Clase</string>
|
||||
<string name="edit_PG_Title">Sufrir daño</string>
|
||||
<string name="level">Nivel</string>
|
||||
<string name="max_pg">PG máx.</string>
|
||||
<string name="maxed_curative">Has llegado a tus PG máximos</string>
|
||||
<string name="missing_info_error">Tienes que rellenar todos los campos</string>
|
||||
<string name="new_energies1">Te quedan</string>
|
||||
<string name="new_energies2">esfuerzos curativos.</string>
|
||||
<string name="new_energies_title">¿Usar un esfuerzo curativo?</string>
|
||||
<string name="no">No</string>
|
||||
<string name="no_curative_efforts_error">No te quedan esfuerzos curativos</string>
|
||||
<string name="ok">Ok</string>
|
||||
<string name="race_name">Raza</string>
|
||||
<string name="suffer_damage">Indica el daño sufrido</string>
|
||||
<string name="title_activity_introduction">Editar personaje</string>
|
||||
<string name="yes">Sí</string>
|
||||
<string name="max_curative_efforts">Esfuerzos curativos</string>
|
||||
<string name="suffer_damage_hint">PG perdidos</string>
|
||||
<string name="action_undo">Deshacer</string>
|
||||
<string name="action_calendar_activity">Crear evento</string>
|
||||
<string name="action_save">Guardar</string>
|
||||
<string name="action_undo_current_pg">Acción deshecha</string>
|
||||
<string name="dungeons_and_dragons">Dragones y Mazmorras</string>
|
||||
</resources>
|
6
app/src/main/res/values-w820dp/dimens.xml
Normal file
|
@ -0,0 +1,6 @@
|
|||
<resources>
|
||||
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
|
||||
(such as screen margins) for screens with more than 820dp of available width. This
|
||||
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
|
||||
<dimen name="activity_horizontal_margin">64dp</dimen>
|
||||
</resources>
|
5
app/src/main/res/values/colors.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="primary">#5D4037</color>
|
||||
<color name="primaryDark">#3E2723</color>
|
||||
</resources>
|
5
app/src/main/res/values/dimens.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<resources>
|
||||
<!-- Default screen margins, per the Android Design guidelines. -->
|
||||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||
</resources>
|
36
app/src/main/res/values/strings.xml
Normal file
|
@ -0,0 +1,36 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<string name="app_name" translatable="false">DungeonManager</string>
|
||||
<string name="action_cure">Cure</string>
|
||||
<string name="action_undo">Undo</string>
|
||||
<string name="dungeons_and_dragons">Dungeons and Dragons</string>
|
||||
<string name="action_save">Save</string>
|
||||
<string name="action_calendar_activity">Create event</string>
|
||||
<string name="action_undo_current_pg">Action undone</string>
|
||||
<string name="action_edit_basics">Edit character</string>
|
||||
<string name="adventurer_name">Adventurer name</string>
|
||||
<string name="class_name">Class</string>
|
||||
<string name="race_name">Race</string>
|
||||
|
||||
<string name="cancel">Cancel</string>
|
||||
<string name="ok">Ok</string>
|
||||
<string name="yes">Yes</string>
|
||||
<string name="no">No</string>
|
||||
|
||||
<string name="edit_PG_Title">Suffer damage</string>
|
||||
<string name="new_energies1">You have</string>
|
||||
<string name="new_energies2">curative efforts</string>
|
||||
<string name="new_energies_title">Use a curative effort?</string>
|
||||
<string name="title_activity_introduction">Edit character</string>
|
||||
<string name="action_finish">Done</string>
|
||||
|
||||
<string name="level">Level</string>
|
||||
<string name="max_curative_efforts">Curative efforts</string>
|
||||
<string name="max_pg">Max PG</string>
|
||||
<string name="missing_info_error">You need to fill all the information</string>
|
||||
<string name="no_curative_efforts_error">You don\'t have any curative efforts left!</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_hint">PG lost</string>
|
||||
</resources>
|
10
app/src/main/res/values/styles.xml
Normal file
|
@ -0,0 +1,10 @@
|
|||
<resources>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="Base.Theme.AppCompat">
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="colorPrimaryDark">@color/primaryDark</item>
|
||||
<item name="colorPrimary">@color/primary</item>
|
||||
</style>
|
||||
|
||||
</resources>
|