Merge remote-tracking branch 'origin/master'
|
@ -19,6 +19,7 @@
|
||||||
<option name="ALLOW_USER_CONFIGURATION" value="false" />
|
<option name="ALLOW_USER_CONFIGURATION" value="false" />
|
||||||
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
|
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
|
||||||
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
|
<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" />
|
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
|
||||||
</configuration>
|
</configuration>
|
||||||
</facet>
|
</facet>
|
||||||
|
@ -81,6 +82,7 @@
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
|
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
|
||||||
</content>
|
</content>
|
||||||
<orderEntry type="jdk" jdkName="Android API 21 Platform" jdkType="Android SDK" />
|
<orderEntry type="jdk" jdkName="Android API 21 Platform" jdkType="Android SDK" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
|
|
@ -9,16 +9,23 @@
|
||||||
android:theme="@style/AppTheme" >
|
android:theme="@style/AppTheme" >
|
||||||
<activity
|
<activity
|
||||||
android:name=".ShowPlayer"
|
android:name=".ShowPlayer"
|
||||||
android:label="@string/app_name"
|
|
||||||
android:parentActivityName=".Welcome" >
|
android:parentActivityName=".Welcome" >
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="android.support.PARENT_ACTIVITY"
|
android:name="android.support.PARENT_ACTIVITY"
|
||||||
android:value=".Welcome" />
|
android:value=".Welcome" />
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name=".Display"
|
||||||
|
android:parentActivityName=".Welcome">
|
||||||
|
<meta-data
|
||||||
|
android:name="android.support.PARENT_ACTIVITY"
|
||||||
|
android:value=".Welcome"/>
|
||||||
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:name=".PlayerEditor"
|
android:name=".PlayerEditor"
|
||||||
android:label="@string/title_activity_player_editor"
|
android:label="@string/title_activity_player_editor"
|
||||||
android:parentActivityName=".Welcome">
|
android:parentActivityName=".Welcome" >
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="android.support.PARENT_ACTIVITY"
|
android:name="android.support.PARENT_ACTIVITY"
|
||||||
android:value=".Welcome" />
|
android:value=".Welcome" />
|
||||||
|
@ -28,6 +35,7 @@
|
||||||
android:label="@string/app_name" >
|
android:label="@string/app_name" >
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
205
app/src/main/java/com/kauron/dungeonmanager/Display.java
Normal file
|
@ -0,0 +1,205 @@
|
||||||
|
package com.kauron.dungeonmanager;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.support.v4.app.Fragment;
|
||||||
|
import android.support.v4.view.ViewPager;
|
||||||
|
import android.support.v7.app.ActionBarActivity;
|
||||||
|
import android.support.v7.widget.Toolbar;
|
||||||
|
import android.view.Menu;
|
||||||
|
import android.view.MenuItem;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.TabHost;
|
||||||
|
import android.widget.TabHost.TabContentFactory;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Vector;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <code>Display</code> class implements the Fragment activity that maintains a TabHost using a ViewPager.
|
||||||
|
*/
|
||||||
|
public class Display extends ActionBarActivity implements TabHost.OnTabChangeListener, ViewPager.OnPageChangeListener {
|
||||||
|
|
||||||
|
private TabHost mTabHost;
|
||||||
|
private ViewPager mViewPager;
|
||||||
|
private HashMap<String, TabInfo> mapTabInfo = new HashMap<String, Display.TabInfo>();
|
||||||
|
private PagerAdapter mPagerAdapter;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Maintains extrinsic info of a tab's construct
|
||||||
|
*/
|
||||||
|
private class TabInfo {
|
||||||
|
private String tag;
|
||||||
|
private Class<?> clss;
|
||||||
|
private Bundle args;
|
||||||
|
private Fragment fragment;
|
||||||
|
TabInfo(String tag, Class<?> clazz, Bundle args) {
|
||||||
|
this.tag = tag;
|
||||||
|
this.clss = clazz;
|
||||||
|
this.args = args;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* A simple factory that returns dummy views to the Tabhost
|
||||||
|
*/
|
||||||
|
class TabFactory implements TabContentFactory {
|
||||||
|
|
||||||
|
private final Context mContext;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param context
|
||||||
|
*/
|
||||||
|
public TabFactory(Context context) {
|
||||||
|
mContext = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** (non-Javadoc)
|
||||||
|
* @see android.widget.TabHost.TabContentFactory#createTabContent(java.lang.String)
|
||||||
|
*/
|
||||||
|
public View createTabContent(String tag) {
|
||||||
|
View v = new View(mContext);
|
||||||
|
v.setMinimumWidth(0);
|
||||||
|
v.setMinimumHeight(0);
|
||||||
|
return v;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
/** (non-Javadoc)
|
||||||
|
* @see android.support.v4.app.FragmentActivity#onCreate(android.os.Bundle)
|
||||||
|
*/
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
// Inflate the layout
|
||||||
|
setContentView(R.layout.display);
|
||||||
|
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||||
|
toolbar.setTitle("Kauron");
|
||||||
|
toolbar.setSubtitle("Brujo Tiflin");
|
||||||
|
setSupportActionBar(toolbar);
|
||||||
|
getSupportActionBar().setDefaultDisplayHomeAsUpEnabled(true);
|
||||||
|
// Initialise the TabHost
|
||||||
|
this.initialiseTabHost(savedInstanceState);
|
||||||
|
if (savedInstanceState != null) {
|
||||||
|
mTabHost.setCurrentTabByTag(savedInstanceState.getString("tab")); //set the tab as per the saved state
|
||||||
|
}
|
||||||
|
// Initialise ViewPager
|
||||||
|
this.intialiseViewPager();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
|
// Inflate the menu; this adds items to the action bar if it is present.
|
||||||
|
if ( mTabHost.getCurrentTabTag().equals("Stats") ) {
|
||||||
|
getMenuInflater().inflate(R.menu.menu_welcome, menu);
|
||||||
|
} else if ( mTabHost.getCurrentTabTag().equals("Powers") ) {
|
||||||
|
getMenuInflater().inflate(R.menu.menu_show_player, 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_add_player ) {
|
||||||
|
Toast.makeText(getApplicationContext(), "it works", Toast.LENGTH_LONG).show();
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.onOptionsItemSelected(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** (non-Javadoc)
|
||||||
|
* @see android.support.v4.app.FragmentActivity#onSaveInstanceState(android.os.Bundle)
|
||||||
|
*/
|
||||||
|
protected void onSaveInstanceState(Bundle outState) {
|
||||||
|
outState.putString("tab", mTabHost.getCurrentTabTag()); //save the tab selected
|
||||||
|
super.onSaveInstanceState(outState);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialise ViewPager
|
||||||
|
*/
|
||||||
|
private void intialiseViewPager() {
|
||||||
|
|
||||||
|
List<Fragment> fragments = new Vector<>();
|
||||||
|
fragments.add(Fragment.instantiate(this, PlayerDisplay.class.getName()));
|
||||||
|
fragments.add(Fragment.instantiate(this, PowerDisplay.class.getName()));
|
||||||
|
this.mPagerAdapter = new PagerAdapter(super.getSupportFragmentManager(), fragments);
|
||||||
|
//
|
||||||
|
this.mViewPager = (ViewPager)super.findViewById(R.id.viewpager);
|
||||||
|
this.mViewPager.setAdapter(this.mPagerAdapter);
|
||||||
|
this.mViewPager.setOnPageChangeListener(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialise the Tab Host
|
||||||
|
*/
|
||||||
|
private void initialiseTabHost(Bundle args) {
|
||||||
|
mTabHost = (TabHost)findViewById(android.R.id.tabhost);
|
||||||
|
mTabHost.setup();
|
||||||
|
TabInfo tabInfo = null;
|
||||||
|
Display.AddTab(this, this.mTabHost, this.mTabHost.newTabSpec("Stats").setIndicator("Stats"), (tabInfo = new TabInfo("Stats", PlayerDisplay.class, args)));
|
||||||
|
this.mapTabInfo.put(tabInfo.tag, tabInfo);
|
||||||
|
Display.AddTab(this, this.mTabHost, this.mTabHost.newTabSpec("Powers").setIndicator("Powers"), (tabInfo = new TabInfo("Powers", PowerDisplay.class, args)));
|
||||||
|
this.mapTabInfo.put(tabInfo.tag, tabInfo);
|
||||||
|
// Default to first tab
|
||||||
|
//this.onTabChanged("Tab1");
|
||||||
|
//
|
||||||
|
mTabHost.setOnTabChangedListener(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add Tab content to the Tabhost
|
||||||
|
* @param activity
|
||||||
|
* @param tabHost
|
||||||
|
* @param tabSpec
|
||||||
|
*/
|
||||||
|
private static void AddTab(Display activity, TabHost tabHost, TabHost.TabSpec tabSpec, TabInfo tabInfo) {
|
||||||
|
// Attach a Tab view factory to the spec
|
||||||
|
tabSpec.setContent(activity.new TabFactory(activity));
|
||||||
|
tabHost.addTab(tabSpec);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** (non-Javadoc)
|
||||||
|
* @see android.widget.TabHost.OnTabChangeListener#onTabChanged(java.lang.String)
|
||||||
|
*/
|
||||||
|
public void onTabChanged(String tag) {
|
||||||
|
//TabInfo newTab = this.mapTabInfo.get(tag);
|
||||||
|
int pos = this.mTabHost.getCurrentTab();
|
||||||
|
this.mViewPager.setCurrentItem(pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see android.support.v4.view.ViewPager.OnPageChangeListener#onPageScrolled(int, float, int)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void onPageScrolled(int position, float positionOffset,
|
||||||
|
int positionOffsetPixels) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see android.support.v4.view.ViewPager.OnPageChangeListener#onPageSelected(int)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void onPageSelected(int position) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
this.mTabHost.setCurrentTab(position);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see android.support.v4.view.ViewPager.OnPageChangeListener#onPageScrollStateChanged(int)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void onPageScrollStateChanged(int state) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
package com.kauron.dungeonmanager;
|
||||||
|
|
||||||
|
import android.support.v4.app.Fragment;
|
||||||
|
import android.support.v4.app.FragmentManager;
|
||||||
|
import android.support.v4.app.FragmentPagerAdapter;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <code>PagerAdapter</code> serves the fragments when paging.
|
||||||
|
* @author mwho
|
||||||
|
*/
|
||||||
|
public class PagerAdapter extends FragmentPagerAdapter {
|
||||||
|
|
||||||
|
private List<Fragment> fragments;
|
||||||
|
/**
|
||||||
|
* @param fm
|
||||||
|
* @param fragments
|
||||||
|
*/
|
||||||
|
public PagerAdapter(FragmentManager fm, List<Fragment> fragments) {
|
||||||
|
super(fm);
|
||||||
|
this.fragments = fragments;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see android.support.v4.app.FragmentPagerAdapter#getItem(int)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Fragment getItem(int position) {
|
||||||
|
return this.fragments.get(position);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see android.support.v4.view.PagerAdapter#getCount()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int getCount() {
|
||||||
|
return this.fragments.size();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.kauron.dungeonmanager;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.support.v4.app.Fragment;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
|
||||||
|
public class PlayerDisplay extends Fragment {
|
||||||
|
/** (non-Javadoc)
|
||||||
|
* @see android.support.v4.app.Fragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle)
|
||||||
|
*/
|
||||||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
|
Bundle savedInstanceState) {
|
||||||
|
if (container == null) {
|
||||||
|
// We have different layouts, and in one of them this
|
||||||
|
// fragment's containing frame doesn't exist. The fragment
|
||||||
|
// may still be created from its saved state, but there is
|
||||||
|
// no reason to try to create its view hierarchy because it
|
||||||
|
// won't be displayed. Note this is not needed -- we could
|
||||||
|
// just run the code below, where we would create and return
|
||||||
|
// the view hierarchy; it would just never be used.
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return (LinearLayout) inflater.inflate(R.layout.fragment_player_display, container, false);
|
||||||
|
}
|
||||||
|
}
|
|
@ -89,6 +89,7 @@ class Power implements Serializable{
|
||||||
void recover(int type){
|
void recover(int type){
|
||||||
if(this.freq <= type) used = false;
|
if(this.freq <= type) used = false;
|
||||||
}
|
}
|
||||||
|
void setUsed(boolean used) {this.used = used;}
|
||||||
|
|
||||||
int getFreqColor(Context context) {
|
int getFreqColor(Context context) {
|
||||||
switch (freq) {
|
switch (freq) {
|
||||||
|
|
|
@ -21,15 +21,27 @@ class PowerAdapter extends ArrayAdapter<Power> {
|
||||||
|
|
||||||
final Power attack = getItem(position);
|
final Power attack = getItem(position);
|
||||||
if ( attack != null ) {
|
if ( attack != null ) {
|
||||||
((TextView) mView.findViewById(R.id.name)).setText(attack.getName());
|
TextView name = (TextView) mView.findViewById(R.id.name);
|
||||||
((TextView) mView.findViewById(R.id.keywords)).setText(attack.getKeywords());
|
TextView keywords = (TextView) mView.findViewById(R.id.keywords);
|
||||||
((TextView) mView.findViewById(R.id.frequency)).setText(attack.getFrequencyString());
|
TextView frequency = (TextView) mView.findViewById(R.id.frequency);
|
||||||
((TextView) mView.findViewById(R.id.range_and_distance)).setText(attack.getRangeString() + " " + attack.getDistance());
|
TextView range = (TextView) mView.findViewById(R.id.range_and_distance);
|
||||||
|
|
||||||
|
name .setText(attack.getName());
|
||||||
|
keywords .setText(attack.getKeywords());
|
||||||
|
frequency .setText(attack.getFrequencyString());
|
||||||
|
range .setText(attack.getRangeString() + " " + attack.getDistance());
|
||||||
|
|
||||||
mView.setBackgroundColor(attack.getFreqColor(getContext()));
|
mView.setBackgroundColor(attack.getFreqColor(getContext()));
|
||||||
if (attack.isUsed())
|
|
||||||
|
if (attack.isUsed()) {
|
||||||
mView.getBackground().setAlpha(0);
|
mView.getBackground().setAlpha(0);
|
||||||
else
|
int black = getContext().getResources().getColor(R.color.black);
|
||||||
mView.getBackground().setAlpha((position % 2) * 50 + 205);
|
|
||||||
|
name .setTextColor ( black ) ;
|
||||||
|
keywords .setTextColor ( black ) ;
|
||||||
|
frequency .setTextColor ( black ) ;
|
||||||
|
range .setTextColor ( black ) ;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return mView;
|
return mView;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.kauron.dungeonmanager;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.support.v4.app.Fragment;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
|
||||||
|
public class PowerDisplay extends Fragment {
|
||||||
|
/** (non-Javadoc)
|
||||||
|
* @see android.support.v4.app.Fragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle)
|
||||||
|
*/
|
||||||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
|
Bundle savedInstanceState) {
|
||||||
|
if (container == null) {
|
||||||
|
// We have different layouts, and in one of them this
|
||||||
|
// fragment's containing frame doesn't exist. The fragment
|
||||||
|
// may still be created from its saved state, but there is
|
||||||
|
// no reason to try to create its view hierarchy because it
|
||||||
|
// won't be displayed. Note this is not needed -- we could
|
||||||
|
// just run the code below, where we would create and return
|
||||||
|
// the view hierarchy; it would just never be used.
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return (LinearLayout) inflater.inflate(R.layout.fragment_power_display, container, false);
|
||||||
|
}
|
||||||
|
}
|
|
@ -23,6 +23,7 @@ import android.widget.AdapterView;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
|
import android.widget.NumberPicker;
|
||||||
import android.widget.ProgressBar;
|
import android.widget.ProgressBar;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
@ -35,12 +36,7 @@ import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class ShowPlayer extends ActionBarActivity {
|
public class ShowPlayer extends ActionBarActivity {
|
||||||
|
|
||||||
public static final int CURRENT_PG = 1, NULL = 0;
|
|
||||||
|
|
||||||
public Player player;
|
public Player player;
|
||||||
private boolean undo;
|
|
||||||
private int undoObject, undoPreviousValue;
|
|
||||||
|
|
||||||
private ProgressBar posHpBar, negHpBar, xpBar, surgesBar;
|
private ProgressBar posHpBar, negHpBar, xpBar, surgesBar;
|
||||||
private TextView hpText, xpText, surgesText, levelText;
|
private TextView hpText, xpText, surgesText, levelText;
|
||||||
|
@ -83,7 +79,6 @@ public class ShowPlayer extends ActionBarActivity {
|
||||||
.setColorFilter(getResources().getColor(R.color.px_bar), PorterDuff.Mode.SRC_IN);
|
.setColorFilter(getResources().getColor(R.color.px_bar), PorterDuff.Mode.SRC_IN);
|
||||||
surgesBar.getProgressDrawable()
|
surgesBar.getProgressDrawable()
|
||||||
.setColorFilter(getResources().getColor(R.color.surges_bar), PorterDuff.Mode.SRC_IN);
|
.setColorFilter(getResources().getColor(R.color.surges_bar), PorterDuff.Mode.SRC_IN);
|
||||||
undo = false;
|
|
||||||
|
|
||||||
restoreData();
|
restoreData();
|
||||||
invalidateOptionsMenu();
|
invalidateOptionsMenu();
|
||||||
|
@ -176,18 +171,18 @@ public class ShowPlayer extends ActionBarActivity {
|
||||||
input.requestFocus();
|
input.requestFocus();
|
||||||
return true;
|
return true;
|
||||||
} else if (id == R.id.action_time_long_rest) {
|
} else if (id == R.id.action_time_long_rest) {
|
||||||
PowerAdapter powerAdapter = (PowerAdapter) powerList.getAdapter();
|
PowerAdapter powerAdapter = powerList == null ? null : (PowerAdapter) powerList.getAdapter();
|
||||||
if (powerAdapter != null) {
|
if (powerAdapter != null) {
|
||||||
for (int i = 0; i < powerAdapter.getCount(); i++) {
|
for (int i = 0; i < powerAdapter.getCount(); i++) {
|
||||||
Power power = powerAdapter.getItem(i);
|
Power power = powerAdapter.getItem(i);
|
||||||
if ( power.getFreq() != Power.AT_WILL) {
|
if ( power.getFreq() != Power.AT_WILL) {
|
||||||
power.recover(Power.DAILY);
|
power.setUsed(false);
|
||||||
getSharedPreferences(p.getString("power" + i, ""), MODE_PRIVATE)
|
getSharedPreferences(p.getString("power" + i, ""), MODE_PRIVATE)
|
||||||
.edit().putBoolean("used", false);
|
.edit().putBoolean("used", false).apply();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
powerAdapter.notifyDataSetChanged();
|
||||||
//TODO: substitute all calls to refreshList for an update on the single view that changed
|
//TODO: substitute all calls to refreshList for an update on the single view that changed
|
||||||
refreshList();
|
|
||||||
}
|
}
|
||||||
player.rest(true);
|
player.rest(true);
|
||||||
SnackbarManager.show(
|
SnackbarManager.show(
|
||||||
|
@ -203,17 +198,17 @@ public class ShowPlayer extends ActionBarActivity {
|
||||||
hpUpdate();
|
hpUpdate();
|
||||||
surgeUpdate();
|
surgeUpdate();
|
||||||
} else if (id == R.id.action_time_rest) {
|
} else if (id == R.id.action_time_rest) {
|
||||||
PowerAdapter powerAdapter = (PowerAdapter) powerList.getAdapter();
|
PowerAdapter powerAdapter = powerList == null ? null : (PowerAdapter) powerList.getAdapter();
|
||||||
if (powerAdapter != null) {
|
if (powerAdapter != null) {
|
||||||
for (int i = 0; i < powerAdapter.getCount(); i++) {
|
for (int i = 0; i < powerAdapter.getCount(); i++) {
|
||||||
Power power = powerAdapter.getItem(i);
|
Power power = powerAdapter.getItem(i);
|
||||||
if ( power.getFreq() == Power.ENCOUNTER) {
|
if ( power.getFreq() == Power.ENCOUNTER) {
|
||||||
power.recover(Power.ENCOUNTER);
|
power.setUsed(false);
|
||||||
getSharedPreferences(p.getString("power" + i, ""), MODE_PRIVATE)
|
getSharedPreferences(p.getString("power" + i, ""), MODE_PRIVATE)
|
||||||
.edit().putBoolean("used", false);
|
.edit().putBoolean("used", false).apply();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
refreshList();
|
powerAdapter.notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
// player.rest(false); TODO: this isn't needed without action points
|
// player.rest(false); TODO: this isn't needed without action points
|
||||||
SnackbarManager.show(
|
SnackbarManager.show(
|
||||||
|
@ -224,11 +219,22 @@ public class ShowPlayer extends ActionBarActivity {
|
||||||
);
|
);
|
||||||
hpUpdate();
|
hpUpdate();
|
||||||
surgeUpdate();
|
surgeUpdate();
|
||||||
|
} else if (id == R.id.action_stats) {
|
||||||
|
statsDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void statsDialog() {
|
||||||
|
final Dialog dialog = new Dialog(ShowPlayer.this);
|
||||||
|
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||||
|
dialog.setContentView(R.layout.stats_dialog);
|
||||||
|
//TODO: finish him!
|
||||||
|
dialog.show();
|
||||||
|
Toast.makeText(getApplicationContext(), "Not ready yet", Toast.LENGTH_LONG).show();
|
||||||
|
}
|
||||||
|
|
||||||
private void levelUp() {
|
private void levelUp() {
|
||||||
//TODO: improve leveling up by using a sliding guide
|
//TODO: improve leveling up by using a sliding guide
|
||||||
xpBar.setMax(Player.LEVEL_XP[player.getLevel()] -
|
xpBar.setMax(Player.LEVEL_XP[player.getLevel()] -
|
||||||
|
@ -283,7 +289,7 @@ public class ShowPlayer extends ActionBarActivity {
|
||||||
.setTitle(R.string.new_energies)
|
.setTitle(R.string.new_energies)
|
||||||
.setPositiveButton(R.string.me, new DialogInterface.OnClickListener() {
|
.setPositiveButton(R.string.me, new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int id) {
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
undoPreviousValue = player.getHp();
|
final int undoPreviousValue = player.getHp();
|
||||||
if (heal(true)) { //a surge has been used
|
if (heal(true)) { //a surge has been used
|
||||||
SnackbarManager.show(
|
SnackbarManager.show(
|
||||||
Snackbar.with(getApplicationContext())
|
Snackbar.with(getApplicationContext())
|
||||||
|
@ -318,7 +324,7 @@ public class ShowPlayer extends ActionBarActivity {
|
||||||
.setNegativeButton(R.string.other, new DialogInterface.OnClickListener() {
|
.setNegativeButton(R.string.other, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int id) {
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
undoPreviousValue = player.getHp();
|
final int undoPreviousValue = player.getHp();
|
||||||
heal(false);
|
heal(false);
|
||||||
SnackbarManager.show(
|
SnackbarManager.show(
|
||||||
Snackbar.with(getApplicationContext())
|
Snackbar.with(getApplicationContext())
|
||||||
|
@ -365,9 +371,11 @@ public class ShowPlayer extends ActionBarActivity {
|
||||||
alert.setTitle(R.string.suffer_damage);
|
alert.setTitle(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 NumberPicker input = new NumberPicker (this);
|
||||||
input.setInputType(InputType.TYPE_CLASS_NUMBER);
|
input.setMinValue(0);
|
||||||
input.setHint(R.string.suffer_damage_hint);
|
input.setMaxValue(player.getMaxHp() * 3);
|
||||||
|
input.setValue(0);
|
||||||
|
input.setWrapSelectorWheel(false);
|
||||||
|
|
||||||
alert.setView(input);
|
alert.setView(input);
|
||||||
|
|
||||||
|
@ -376,31 +384,32 @@ public class ShowPlayer extends ActionBarActivity {
|
||||||
|
|
||||||
alert.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
|
alert.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int whichButton) {
|
public void onClick(DialogInterface dialog, int whichButton) {
|
||||||
try {
|
final int undoPreviousValue = player.getHp();
|
||||||
int preValue = player.getHp();
|
player.losePg(input.getValue());
|
||||||
int damage = Integer.parseInt(input.getText().toString());
|
SnackbarManager.show(
|
||||||
player.losePg(damage);
|
Snackbar.with(context).text(String.format(getString(R.string.lost_hp), input.getValue()))
|
||||||
undo = true;
|
.actionLabel(R.string.action_undo) // action button label
|
||||||
undoPreviousValue = preValue;
|
.actionListener(new ActionClickListener() {
|
||||||
undoObject = CURRENT_PG;
|
@Override
|
||||||
SnackbarManager.show(
|
public void onActionClicked(Snackbar snackbar) {
|
||||||
Snackbar.with(context).text(String.format(getString(R.string.lost_hp), damage))
|
SnackbarManager.show(
|
||||||
.actionLabel(R.string.action_undo) // action button label
|
Snackbar
|
||||||
.actionListener(new ActionClickListener() {
|
.with(activity)
|
||||||
@Override
|
.text(R.string.restored)
|
||||||
public void onActionClicked(Snackbar snackbar) {
|
.duration(Snackbar.SnackbarDuration.LENGTH_INDEFINITE)
|
||||||
undo();
|
);
|
||||||
}
|
player.setHp(undoPreviousValue);
|
||||||
})
|
p.edit().putInt("pg", player.getHp()).apply();
|
||||||
.actionColor(getResources().getColor(R.color.yellow))
|
hpUpdate();
|
||||||
.duration(Snackbar.SnackbarDuration.LENGTH_INDEFINITE)
|
invalidateOptionsMenu();
|
||||||
,activity); // action button's
|
}
|
||||||
p.edit().putInt("pg", player.getHp()).apply();
|
})
|
||||||
hpUpdate();
|
.actionColor(getResources().getColor(R.color.yellow))
|
||||||
invalidateOptionsMenu();
|
.duration(Snackbar.SnackbarDuration.LENGTH_INDEFINITE)
|
||||||
} catch (Exception e) {
|
,activity); // action button's
|
||||||
Toast.makeText(getApplicationContext(), "There was an error", Toast.LENGTH_LONG).show();
|
p.edit().putInt("pg", player.getHp()).apply();
|
||||||
}
|
hpUpdate();
|
||||||
|
invalidateOptionsMenu();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -485,30 +494,6 @@ public class ShowPlayer extends ActionBarActivity {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Undoes the last change done by the player. Only used in damage().
|
|
||||||
* Healing is undone in the health dialog
|
|
||||||
*/
|
|
||||||
private void undo() {
|
|
||||||
String message = "";
|
|
||||||
if(undoObject == CURRENT_PG){
|
|
||||||
player.setHp(undoPreviousValue);
|
|
||||||
undoObject = NULL;
|
|
||||||
message = getString(R.string.restored);
|
|
||||||
}
|
|
||||||
if (!message.isEmpty()) {
|
|
||||||
SnackbarManager.show(
|
|
||||||
Snackbar
|
|
||||||
.with(this)
|
|
||||||
.text(message)
|
|
||||||
.duration(Snackbar.SnackbarDuration.LENGTH_INDEFINITE)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
hpUpdate();
|
|
||||||
undo = false;
|
|
||||||
invalidateOptionsMenu();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Launches the PowerEditor to create a new attack inside the current player
|
* Launches the PowerEditor to create a new attack inside the current player
|
||||||
|
@ -537,180 +522,186 @@ public class ShowPlayer extends ActionBarActivity {
|
||||||
//TODO: check which is active (now there is only a power list), so there is only one possibility
|
//TODO: check which is active (now there is only a power list), so there is only one possibility
|
||||||
|
|
||||||
int n = p.getInt("powers",0);
|
int n = p.getInt("powers",0);
|
||||||
int elements = 0;
|
if ( n == 0 ) {
|
||||||
powerList = (ListView) findViewById(R.id.powerList);
|
findViewById(R.id.layout_no_powers).setVisibility(View.VISIBLE);
|
||||||
final PowerAdapter adapter = (PowerAdapter) powerList.getAdapter();
|
findViewById(R.id.layout_powers).setVisibility(View.GONE);
|
||||||
|
} else {
|
||||||
|
findViewById(R.id.layout_no_powers).setVisibility(View.GONE);
|
||||||
|
findViewById(R.id.layout_powers).setVisibility(View.VISIBLE);
|
||||||
|
int elements = 0;
|
||||||
|
powerList = (ListView) findViewById(R.id.powerList);
|
||||||
|
final PowerAdapter adapter = (PowerAdapter) powerList.getAdapter();
|
||||||
|
|
||||||
if ( adapter != null )
|
if (adapter != null)
|
||||||
elements = adapter.getCount();
|
elements = adapter.getCount();
|
||||||
if ( elements < n && adapter != null ) {
|
if (elements < n && adapter != null) {
|
||||||
for ( int i = elements; i < n; i++ ) {
|
for (int i = elements; i < n; i++) {
|
||||||
SharedPreferences sav = getSharedPreferences(p.getString("power" + i, ""), MODE_PRIVATE);
|
SharedPreferences sav = getSharedPreferences(p.getString("power" + i, ""), MODE_PRIVATE);
|
||||||
//TODO: solve error when closing the editor
|
adapter.add(new Power(sav));
|
||||||
adapter.add( new Power ( sav ) );
|
}
|
||||||
}
|
} else {
|
||||||
} else if ( n != 0 ) {
|
ArrayList<Power> powers = new ArrayList<>();
|
||||||
ArrayList<Power> powers = new ArrayList<>();
|
for (int i = 0; i < n; i++) {
|
||||||
for (int i = 0; i < n; i++) {
|
SharedPreferences sav = getSharedPreferences(p.getString("power" + i, ""), MODE_PRIVATE);
|
||||||
SharedPreferences sav = getSharedPreferences(p.getString("power" + i, ""), MODE_PRIVATE);
|
powers.add(new Power(sav));
|
||||||
powers.add( new Power(sav) );
|
}
|
||||||
}
|
|
||||||
|
|
||||||
powerList.setAdapter(new PowerAdapter(this, powers));
|
powerList.setAdapter(new PowerAdapter(this, powers));
|
||||||
final Activity activity = this;
|
final Activity activity = this;
|
||||||
powerList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
powerList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onItemClick(AdapterView<?> parent, View view, final int position, long id) {
|
public void onItemClick(AdapterView<?> parent, View view, final int position, long id) {
|
||||||
|
|
||||||
final Dialog dialog = new Dialog(ShowPlayer.this);
|
final Dialog dialog = new Dialog(ShowPlayer.this);
|
||||||
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
|
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||||
dialog.setContentView(R.layout.attack_display);
|
dialog.setContentView(R.layout.attack_display);
|
||||||
|
|
||||||
//identify all the elements from the VIEW and then add LISTENERS
|
//identify all the elements from the VIEW and then add LISTENERS
|
||||||
final Power power = (Power) parent.getItemAtPosition(position);
|
final Power power = (Power) parent.getItemAtPosition(position);
|
||||||
View nameText = dialog.findViewById(R.id.nameText);
|
View nameText = dialog.findViewById(R.id.nameText);
|
||||||
final int color = power.getFreqColor(getApplicationContext());
|
final int color = power.getFreqColor(getApplicationContext());
|
||||||
nameText.setBackgroundColor(color);
|
nameText.setBackgroundColor(color);
|
||||||
|
|
||||||
((TextView) nameText).setText(power.getName());
|
((TextView) nameText).setText(power.getName());
|
||||||
((TextView) dialog.findViewById(R.id.typeText)).setText(power.getTypeString());
|
((TextView) dialog.findViewById(R.id.typeText)).setText(power.getTypeString());
|
||||||
((TextView) dialog.findViewById(R.id.rangeText)).setText(power.getRangeString() + " ");
|
((TextView) dialog.findViewById(R.id.rangeText)).setText(power.getRangeString() + " ");
|
||||||
((TextView) dialog.findViewById(R.id.freqText)).setText(power.getFrequencyString());
|
((TextView) dialog.findViewById(R.id.freqText)).setText(power.getFrequencyString());
|
||||||
((TextView) dialog.findViewById(R.id.keywordsText)).setText(power.getKeywords());
|
((TextView) dialog.findViewById(R.id.keywordsText)).setText(power.getKeywords());
|
||||||
((TextView) dialog.findViewById(R.id.distanceText)).setText(String.valueOf(power.getDistance()));
|
((TextView) dialog.findViewById(R.id.distanceText)).setText(String.valueOf(power.getDistance()));
|
||||||
((TextView) dialog.findViewById(R.id.objectiveText)).setText(power.getObjective());
|
((TextView) dialog.findViewById(R.id.objectiveText)).setText(power.getObjective());
|
||||||
((TextView) dialog.findViewById(R.id.impactText)).setText(power.getImpact());
|
((TextView) dialog.findViewById(R.id.impactText)).setText(power.getImpact());
|
||||||
((TextView) dialog.findViewById(R.id.otherText)).setText(power.getOther());
|
((TextView) dialog.findViewById(R.id.otherText)).setText(power.getOther());
|
||||||
|
|
||||||
String[] attack = getResources().getStringArray(R.array.attack);
|
String[] attack = getResources().getStringArray(R.array.attack);
|
||||||
String[] defense = getResources().getStringArray(R.array.defense);
|
String[] defense = getResources().getStringArray(R.array.defense);
|
||||||
((TextView) dialog.findViewById(R.id.attackText)).setText(attack[power.getAtk()]
|
((TextView) dialog.findViewById(R.id.attackText)).setText(attack[power.getAtk()]
|
||||||
+ " " + getResources().getString(R.string.vs)
|
+ " " + getResources().getString(R.string.vs) + " " + defense[power.getDef()]);
|
||||||
+ " " + defense[power.getDef()]);
|
|
||||||
|
|
||||||
final Button useButton = (Button) dialog.findViewById(R.id.useButton);
|
final Button useButton = (Button) dialog.findViewById(R.id.useButton);
|
||||||
|
|
||||||
|
if (power.isUsed()) {
|
||||||
|
useButton.getBackground().setAlpha(128);
|
||||||
|
useButton.setEnabled(false);
|
||||||
|
useButton.setText(R.string.used);
|
||||||
|
useButton.setClickable(false);
|
||||||
|
} else {
|
||||||
|
useButton.setBackgroundColor(color);
|
||||||
|
useButton.setTextColor(getResources().getColor(R.color.white));
|
||||||
|
useButton.getBackground().setAlpha(255);
|
||||||
|
useButton.setEnabled(true);
|
||||||
|
useButton.setClickable(true);
|
||||||
|
useButton.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
//TODO: use power
|
||||||
|
power.use();
|
||||||
|
if (power.isUsed()) {
|
||||||
|
useButton.getBackground().setAlpha(128);
|
||||||
|
useButton.setTextColor(getResources().getColor(R.color.black));
|
||||||
|
useButton.setEnabled(false);
|
||||||
|
useButton.setClickable(false);
|
||||||
|
getSharedPreferences(p.getString("power" + position, ""), MODE_PRIVATE)
|
||||||
|
.edit().putBoolean("used", true).apply();
|
||||||
|
refreshList();
|
||||||
|
SnackbarManager.show(
|
||||||
|
Snackbar.with(getApplicationContext())
|
||||||
|
.text(getString(R.string.have_used) + " " + power.getName())
|
||||||
|
.actionListener(new ActionClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onActionClicked(Snackbar snackbar) {
|
||||||
|
power.setUsed(false);
|
||||||
|
useButton.setBackgroundColor(color);
|
||||||
|
useButton.setTextColor(getResources().getColor(R.color.white));
|
||||||
|
useButton.getBackground().setAlpha(255);
|
||||||
|
useButton.setEnabled(true);
|
||||||
|
useButton.setClickable(true);
|
||||||
|
getSharedPreferences(p.getString("power" + position, ""), MODE_PRIVATE)
|
||||||
|
.edit().putBoolean("used", power.isUsed()).apply();
|
||||||
|
refreshList();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.actionLabel(getString(R.string.action_undo))
|
||||||
|
.actionColor(getResources().getColor(R.color.yellow))
|
||||||
|
.duration(Snackbar.SnackbarDuration.LENGTH_INDEFINITE),
|
||||||
|
activity
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
SnackbarManager.show(
|
||||||
|
Snackbar.with(getApplicationContext())
|
||||||
|
.text(getString(R.string.have_used) + " " + power.getName())
|
||||||
|
.duration(Snackbar.SnackbarDuration.LENGTH_INDEFINITE),
|
||||||
|
activity
|
||||||
|
);
|
||||||
|
}
|
||||||
|
dialog.dismiss();
|
||||||
|
|
||||||
if (power.isUsed()) {
|
|
||||||
useButton.getBackground().setAlpha(128);
|
|
||||||
useButton.setEnabled(false);
|
|
||||||
useButton.setClickable(false);
|
|
||||||
} else {
|
|
||||||
useButton.setBackgroundColor(color);
|
|
||||||
useButton.setTextColor(getResources().getColor(R.color.white));
|
|
||||||
useButton.getBackground().setAlpha(255);
|
|
||||||
useButton.setEnabled(true);
|
|
||||||
useButton.setClickable(true);
|
|
||||||
useButton.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
//TODO: use power
|
|
||||||
power.use();
|
|
||||||
if (power.isUsed()) {
|
|
||||||
useButton.getBackground().setAlpha(128);
|
|
||||||
useButton.setTextColor(getResources().getColor(R.color.black));
|
|
||||||
useButton.setEnabled(false);
|
|
||||||
useButton.setClickable(false);
|
|
||||||
getSharedPreferences(p.getString("power" + position, ""), MODE_PRIVATE)
|
|
||||||
.edit().putBoolean("used", true).apply();
|
|
||||||
refreshList();
|
|
||||||
SnackbarManager.show(
|
|
||||||
Snackbar.with(getApplicationContext())
|
|
||||||
.text(getString(R.string.used) + " " + power.getName())
|
|
||||||
.actionListener(new ActionClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onActionClicked(Snackbar snackbar) {
|
|
||||||
power.recover(Power.DAILY);
|
|
||||||
useButton.setBackgroundColor(color);
|
|
||||||
useButton.setTextColor(getResources().getColor(R.color.white));
|
|
||||||
useButton.getBackground().setAlpha(255);
|
|
||||||
useButton.setEnabled(true);
|
|
||||||
useButton.setClickable(true);
|
|
||||||
getSharedPreferences(p.getString("power" + position, ""), MODE_PRIVATE)
|
|
||||||
.edit().putBoolean("used", false).apply();
|
|
||||||
refreshList();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.actionLabel(getString(R.string.action_undo))
|
|
||||||
.actionColor(getResources().getColor(R.color.yellow))
|
|
||||||
.duration(Snackbar.SnackbarDuration.LENGTH_INDEFINITE),
|
|
||||||
activity
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
SnackbarManager.show(
|
|
||||||
Snackbar.with(getApplicationContext())
|
|
||||||
.text(getString(R.string.used) + " " + power.getName())
|
|
||||||
.duration(Snackbar.SnackbarDuration.LENGTH_INDEFINITE),
|
|
||||||
activity
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
dialog.dismiss();
|
});
|
||||||
|
}
|
||||||
}
|
dialog.show();
|
||||||
});
|
|
||||||
}
|
}
|
||||||
dialog.show();
|
});
|
||||||
|
}
|
||||||
|
final Activity thisActivity = this;
|
||||||
|
|
||||||
|
powerList.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onItemLongClick(final AdapterView<?> parent, View view, final int position, long id) {
|
||||||
|
AlertDialog.Builder alert = new AlertDialog.Builder(thisActivity);
|
||||||
|
alert.setItems(
|
||||||
|
new String[]{getString(R.string.delete), getString(R.string.edit)},
|
||||||
|
new DialogInterface.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
if (which == 0) {
|
||||||
|
SnackbarManager.show(
|
||||||
|
Snackbar.with(getApplicationContext())
|
||||||
|
.text(R.string.sure)
|
||||||
|
.duration(Snackbar.SnackbarDuration.LENGTH_INDEFINITE)
|
||||||
|
.actionLabel(R.string.delete)
|
||||||
|
.actionColor(getResources().getColor(R.color.yellow))
|
||||||
|
.actionListener(new ActionClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onActionClicked(Snackbar snackbar) {
|
||||||
|
//delete the item
|
||||||
|
String name = p.getString("power" + position, "");
|
||||||
|
if (name != null && !name.isEmpty()) {
|
||||||
|
getSharedPreferences(name, MODE_PRIVATE).edit().clear().apply();
|
||||||
|
Log.d("Tag", thisActivity.getApplicationContext().getFilesDir().getParent()
|
||||||
|
+ File.separator + "shared_prefs" + File.separator + name + ".xml");
|
||||||
|
try {
|
||||||
|
if (!new File(thisActivity.getApplicationContext().getFilesDir().getParent()
|
||||||
|
+ File.separator + "shared_prefs" + File.separator + name + ".xml").delete())
|
||||||
|
throw new Exception();
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.e("POWER:DELETION", "Error deleting attack files\n" + e.getMessage() + "\n");
|
||||||
|
}
|
||||||
|
int max = p.getInt("powers", 0);
|
||||||
|
SharedPreferences.Editor ed = p.edit();
|
||||||
|
for (int i = position; i < max - 1; i++)
|
||||||
|
ed.putString("power" + i, p.getString("power" + (i + 1), "max"));
|
||||||
|
ed.putInt("powers", max - 1).apply();
|
||||||
|
refreshList();
|
||||||
|
ed.remove("power" + (max - 1)).apply();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
thisActivity
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
//edit the item
|
||||||
|
startActivity(
|
||||||
|
new Intent(getApplicationContext(), PowerEditor.class)
|
||||||
|
.putExtra("power", position)
|
||||||
|
.putExtra("player", player.getName())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
alert.show();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
final Activity thisActivity = this;
|
|
||||||
|
|
||||||
powerList.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
|
|
||||||
@Override
|
|
||||||
public boolean onItemLongClick(final AdapterView<?> parent, View view, final int position, long id) {
|
|
||||||
AlertDialog.Builder alert = new AlertDialog.Builder(thisActivity);
|
|
||||||
alert.setItems(
|
|
||||||
new String[]{getString(R.string.delete), getString(R.string.edit)},
|
|
||||||
new DialogInterface.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
if (which == 0) {
|
|
||||||
SnackbarManager.show(
|
|
||||||
Snackbar.with(getApplicationContext())
|
|
||||||
.text(R.string.sure)
|
|
||||||
.duration(Snackbar.SnackbarDuration.LENGTH_INDEFINITE)
|
|
||||||
.actionLabel(R.string.delete)
|
|
||||||
.actionColor(getResources().getColor(R.color.yellow))
|
|
||||||
.actionListener(new ActionClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onActionClicked(Snackbar snackbar) {
|
|
||||||
//delete the item
|
|
||||||
String name = p.getString("power" + position, "");
|
|
||||||
if (name != null && !name.isEmpty()) {
|
|
||||||
getSharedPreferences(name, MODE_PRIVATE).edit().clear().apply();
|
|
||||||
Log.d("Tag", thisActivity.getApplicationContext().getFilesDir().getParent()
|
|
||||||
+ File.separator + "shared_prefs" + File.separator + name + ".xml");
|
|
||||||
try {
|
|
||||||
if (!new File(thisActivity.getApplicationContext().getFilesDir().getParent()
|
|
||||||
+ File.separator + "shared_prefs" + File.separator + name + ".xml").delete())
|
|
||||||
throw new Exception();
|
|
||||||
} catch (Exception e) {
|
|
||||||
Log.e("POWER:DELETION", "Error deleting attack files\n" + e.getMessage() + "\n" + e.getStackTrace().toString());
|
|
||||||
}
|
|
||||||
int max = p.getInt("powers", 0);
|
|
||||||
SharedPreferences.Editor ed = p.edit();
|
|
||||||
for (int i = position; i < max - 1; i++)
|
|
||||||
ed.putString("power" + i, p.getString("power" + (i + 1), "max"));
|
|
||||||
ed.putInt("powers", max - 1).apply();
|
|
||||||
refreshList();
|
|
||||||
ed.remove("power" + (max - 1)).apply();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
thisActivity
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
//edit the item
|
|
||||||
startActivity(
|
|
||||||
new Intent(getApplicationContext(), PowerEditor.class)
|
|
||||||
.putExtra("power", position)
|
|
||||||
.putExtra("player", player.getName())
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
alert.show();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -4,8 +4,8 @@ import android.app.AlertDialog;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.support.v7.app.ActionBarActivity;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.support.v7.app.ActionBarActivity;
|
||||||
import android.support.v7.widget.Toolbar;
|
import android.support.v7.widget.Toolbar;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
|
@ -156,20 +156,23 @@ public class Welcome extends ActionBarActivity {
|
||||||
}),
|
}),
|
||||||
activity
|
activity
|
||||||
);
|
);
|
||||||
} else if(which==1) {
|
} else if(which==1) {
|
||||||
//TODO: edit the player
|
//TODO: edit the player
|
||||||
/**TEMP*/
|
/**TEMP*/
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
activity, "Editor not implemented yet", Toast.LENGTH_LONG)
|
activity, "Editor not implemented yet", Toast.LENGTH_LONG)
|
||||||
.show();
|
.show();
|
||||||
} else {
|
} else {
|
||||||
//TODO: export as files
|
//TODO: export as files
|
||||||
/**TEMP*/
|
/**TEMP*/
|
||||||
Toast.makeText(
|
startActivity(new Intent(
|
||||||
activity, "Exporting feature not implemented yet", Toast.LENGTH_LONG)
|
getApplicationContext(), Display.class
|
||||||
.show();
|
).putExtra("player", position));
|
||||||
|
Toast.makeText(
|
||||||
|
activity, "Exporting feature not implemented yet", Toast.LENGTH_LONG)
|
||||||
|
.show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
BIN
app/src/main/res/drawable-hdpi/ic_action_stats.png
Normal file
After Width: | Height: | Size: 784 B |
Before Width: | Height: | Size: 647 B After Width: | Height: | Size: 623 B |
BIN
app/src/main/res/drawable-mdpi/ic_action_stats.png
Normal file
After Width: | Height: | Size: 525 B |
Before Width: | Height: | Size: 460 B After Width: | Height: | Size: 397 B |
BIN
app/src/main/res/drawable-xhdpi/ic_action_stats.png
Normal file
After Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 871 B After Width: | Height: | Size: 831 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_action_stats.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.4 KiB |
|
@ -210,190 +210,35 @@
|
||||||
android:text="Go to abilities"/>
|
android:text="Go to abilities"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/layout_powers"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<ListView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/powerList"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:choiceMode="none" />
|
||||||
|
<TextView
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:id="@+id/help_text"
|
||||||
|
android:text="@string/help_list" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<ListView
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="fill_parent"
|
||||||
android:id="@+id/powerList"
|
android:visibility="gone"
|
||||||
android:layout_gravity="center_horizontal"
|
android:id="@+id/layout_no_powers">
|
||||||
android:divider="@android:color/transparent"
|
<TextView
|
||||||
android:dividerHeight="0dp"
|
android:layout_width="fill_parent"
|
||||||
android:choiceMode="none" />
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
<!--<LinearLayout-->
|
android:gravity="center"
|
||||||
<!--android:id="@+id/attackContainer"-->
|
android:text="@string/no_powers"/>
|
||||||
<!--android:layout_width="wrap_content"-->
|
</LinearLayout>
|
||||||
<!--android:layout_height="wrap_content"-->
|
</LinearLayout>
|
||||||
<!--android:layout_marginTop="10dp"-->
|
|
||||||
<!--android:orientation="vertical"-->
|
|
||||||
<!--android:visibility="gone">-->
|
|
||||||
|
|
||||||
<!--<TextView-->
|
|
||||||
<!--android:id="@+id/titleAttack"-->
|
|
||||||
<!--android:text="@string/attack"-->
|
|
||||||
<!--android:textAllCaps="true"-->
|
|
||||||
<!--android:drawableBottom="?android:attr/listChoiceBackgroundIndicator"-->
|
|
||||||
<!--android:layout_marginBottom="5dp"-->
|
|
||||||
<!--android:layout_width="match_parent"-->
|
|
||||||
<!--android:layout_height="wrap_content"-->
|
|
||||||
<!--android:textStyle="bold"-->
|
|
||||||
<!--android:textColor="?android:textColorSecondary"-->
|
|
||||||
<!--android:textSize="14sp"-->
|
|
||||||
<!--android:gravity="center_vertical"-->
|
|
||||||
<!--android:paddingLeft="8dip"-->
|
|
||||||
<!--android:paddingRight="8dip"/>-->
|
|
||||||
<!--<HorizontalScrollView-->
|
|
||||||
<!--android:layout_width="wrap_content"-->
|
|
||||||
<!--android:layout_height="wrap_content">-->
|
|
||||||
<!--<GridLayout-->
|
|
||||||
<!--android:layout_width="wrap_content"-->
|
|
||||||
<!--android:layout_height="wrap_content"-->
|
|
||||||
<!--android:id="@+id/attackGrid"-->
|
|
||||||
<!--android:columnCount="3"-->
|
|
||||||
<!--android:rowCount="2">-->
|
|
||||||
|
|
||||||
<!--<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/STR"-->
|
|
||||||
<!--tools:text="@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"-->
|
|
||||||
<!--tools:text="@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/DEX"-->
|
|
||||||
<!--tools:text="@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"-->
|
|
||||||
<!--tools:text="@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/WIS"-->
|
|
||||||
<!--tools:text="@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/CHA"-->
|
|
||||||
<!--tools:text="@string/CAR" />-->
|
|
||||||
<!--</GridLayout>-->
|
|
||||||
<!--</HorizontalScrollView>-->
|
|
||||||
<!--</LinearLayout>-->
|
|
||||||
|
|
||||||
<!--<LinearLayout-->
|
|
||||||
<!--android:id="@+id/defenseContainer"-->
|
|
||||||
<!--android:layout_width="wrap_content"-->
|
|
||||||
<!--android:layout_height="wrap_content"-->
|
|
||||||
<!--android:layout_marginTop="10dp"-->
|
|
||||||
<!--android:visibility="gone"-->
|
|
||||||
<!--android:orientation="vertical">-->
|
|
||||||
|
|
||||||
<!--<TextView-->
|
|
||||||
<!--android:id="@+id/titleDefense"-->
|
|
||||||
<!--android:text="@string/defense"-->
|
|
||||||
<!--android:textAllCaps="true"-->
|
|
||||||
<!--android:layout_marginBottom="5dp"-->
|
|
||||||
<!--android:layout_width="match_parent"-->
|
|
||||||
<!--android:layout_height="wrap_content"-->
|
|
||||||
<!--android:textStyle="bold"-->
|
|
||||||
<!--android:textColor="?android:textColorSecondary"-->
|
|
||||||
<!--android:textSize="14sp"-->
|
|
||||||
<!--android:gravity="center_vertical"-->
|
|
||||||
<!--android:paddingLeft="8dip"-->
|
|
||||||
<!--android:paddingRight="8dip"/>-->
|
|
||||||
|
|
||||||
<!--<GridLayout-->
|
|
||||||
<!--android:layout_width="fill_parent"-->
|
|
||||||
<!--android:layout_height="wrap_content"-->
|
|
||||||
<!--android:id="@+id/defenseGrid"-->
|
|
||||||
<!--android:columnCount="2"-->
|
|
||||||
<!--android:rowCount="2">-->
|
|
||||||
|
|
||||||
<!--<TextView-->
|
|
||||||
<!--android:layout_width="wrap_content"-->
|
|
||||||
<!--android:layout_height="wrap_content"-->
|
|
||||||
<!--android:textAppearance="?android:attr/textAppearanceLarge"-->
|
|
||||||
<!--android:typeface="monospace"-->
|
|
||||||
<!--android:ems="5"-->
|
|
||||||
<!--android:layout_row="0"-->
|
|
||||||
<!--android:layout_column="0"-->
|
|
||||||
<!--android:id="@+id/CA"-->
|
|
||||||
<!--tools:text="@string/CA" />-->
|
|
||||||
|
|
||||||
<!--<TextView-->
|
|
||||||
<!--android:layout_width="wrap_content"-->
|
|
||||||
<!--android:layout_height="wrap_content"-->
|
|
||||||
<!--android:textAppearance="?android:attr/textAppearanceLarge"-->
|
|
||||||
<!--android:typeface="monospace"-->
|
|
||||||
<!--android:ems="5"-->
|
|
||||||
<!--android:layout_row="0"-->
|
|
||||||
<!--android:layout_column="1"-->
|
|
||||||
<!--android:id="@+id/FORT"-->
|
|
||||||
<!--tools:text="@string/FORT" />-->
|
|
||||||
|
|
||||||
<!--<TextView-->
|
|
||||||
<!--android:layout_width="wrap_content"-->
|
|
||||||
<!--android:layout_height="wrap_content"-->
|
|
||||||
<!--android:textAppearance="?android:attr/textAppearanceLarge"-->
|
|
||||||
<!--android:typeface="monospace"-->
|
|
||||||
<!--android:ems="5"-->
|
|
||||||
<!--android:layout_row="1"-->
|
|
||||||
<!--android:layout_column="0"-->
|
|
||||||
<!--android:id="@+id/REF"-->
|
|
||||||
<!--tools:text="@string/REF" />-->
|
|
||||||
|
|
||||||
<!--<TextView-->
|
|
||||||
<!--android:layout_width="wrap_content"-->
|
|
||||||
<!--android:layout_height="wrap_content"-->
|
|
||||||
<!--android:textAppearance="?android:attr/textAppearanceLarge"-->
|
|
||||||
<!--android:typeface="monospace"-->
|
|
||||||
<!--android:ems="5"-->
|
|
||||||
<!--android:layout_row="1"-->
|
|
||||||
<!--android:layout_column="1"-->
|
|
||||||
<!--android:id="@+id/VOL"-->
|
|
||||||
<!--tools:text="@string/VOL" />-->
|
|
||||||
<!--</GridLayout>-->
|
|
||||||
<!--</LinearLayout>-->
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -42,7 +42,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/help_text"
|
android:id="@+id/help_text"
|
||||||
android:text="@string/help_welcome_text"
|
android:text="@string/help_list"
|
||||||
android:layout_gravity="center"/>
|
android:layout_gravity="center"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
46
app/src/main/res/layout/display.xml
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="fill_parent">
|
||||||
|
|
||||||
|
<android.support.v7.widget.Toolbar
|
||||||
|
android:id="@+id/toolbar"
|
||||||
|
android:minHeight="?attr/actionBarSize"
|
||||||
|
android:background="@color/primary"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
||||||
|
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/>
|
||||||
|
|
||||||
|
<TabHost
|
||||||
|
android:id="@android:id/tabhost"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="fill_parent">
|
||||||
|
<LinearLayout
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="fill_parent">
|
||||||
|
<TabWidget
|
||||||
|
android:id="@android:id/tabs"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:background="@color/primary"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0" />
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@android:id/tabcontent"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="0"/>
|
||||||
|
|
||||||
|
<android.support.v4.view.ViewPager
|
||||||
|
android:id="@+id/viewpager"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
</LinearLayout>
|
||||||
|
</TabHost>
|
||||||
|
</LinearLayout>
|
184
app/src/main/res/layout/fragment_player_display.xml
Normal file
|
@ -0,0 +1,184 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/attackContainer"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/titleAttack"
|
||||||
|
android:text="Attack"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:drawableBottom="?android:attr/listChoiceBackgroundIndicator"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="?android:textColorSecondary"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingLeft="8dip"
|
||||||
|
android:paddingRight="8dip"/>
|
||||||
|
|
||||||
|
<HorizontalScrollView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<GridLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/attackGrid"
|
||||||
|
android:columnCount="3"
|
||||||
|
android:rowCount="2">
|
||||||
|
|
||||||
|
<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/STR"
|
||||||
|
android:text="@string/STR" />
|
||||||
|
|
||||||
|
<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:text="@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/DEX"
|
||||||
|
android:text="@string/DEX" />
|
||||||
|
|
||||||
|
<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:text="@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/WIS"
|
||||||
|
android:text="@string/WIS" />
|
||||||
|
|
||||||
|
<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/CHA"
|
||||||
|
android:text="@string/CHA" />
|
||||||
|
</GridLayout>
|
||||||
|
</HorizontalScrollView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/defenseContainer"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/titleDefense"
|
||||||
|
android:text="Defense"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="?android:textColorSecondary"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingLeft="8dip"
|
||||||
|
android:paddingRight="8dip"/>
|
||||||
|
|
||||||
|
<GridLayout
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/defenseGrid"
|
||||||
|
android:columnCount="2"
|
||||||
|
android:rowCount="2">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
|
android:typeface="monospace"
|
||||||
|
android:ems="5"
|
||||||
|
android:layout_row="0"
|
||||||
|
android:layout_column="0"
|
||||||
|
android:id="@+id/CA"
|
||||||
|
android:text="AC" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
|
android:typeface="monospace"
|
||||||
|
android:ems="5"
|
||||||
|
android:layout_row="0"
|
||||||
|
android:layout_column="1"
|
||||||
|
android:id="@+id/FORT"
|
||||||
|
android:text="FORT" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
|
android:typeface="monospace"
|
||||||
|
android:ems="5"
|
||||||
|
android:layout_row="1"
|
||||||
|
android:layout_column="0"
|
||||||
|
android:id="@+id/REF"
|
||||||
|
android:text="REF" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
|
android:typeface="monospace"
|
||||||
|
android:ems="5"
|
||||||
|
android:layout_row="1"
|
||||||
|
android:layout_column="1"
|
||||||
|
android:id="@+id/VOL"
|
||||||
|
android:text="VOL" />
|
||||||
|
</GridLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
9
app/src/main/res/layout/fragment_power_display.xml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/red">
|
||||||
|
|
||||||
|
</LinearLayout>
|
|
@ -5,8 +5,7 @@
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
tools:background="@color/at_will"
|
tools:background="@color/at_will"
|
||||||
android:paddingLeft="5dp"
|
android:padding="5dp">
|
||||||
android:paddingRight="5dp">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
tools:text="Happiness"
|
tools:text="Happiness"
|
||||||
|
|
184
app/src/main/res/layout/stats_dialog.xml
Normal file
|
@ -0,0 +1,184 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/attackContainer"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/titleAttack"
|
||||||
|
android:text="Attack"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:drawableBottom="?android:attr/listChoiceBackgroundIndicator"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="?android:textColorSecondary"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingLeft="8dip"
|
||||||
|
android:paddingRight="8dip"/>
|
||||||
|
|
||||||
|
<HorizontalScrollView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<GridLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/attackGrid"
|
||||||
|
android:columnCount="3"
|
||||||
|
android:rowCount="2">
|
||||||
|
|
||||||
|
<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/STR"
|
||||||
|
tools:text="@string/STR" />
|
||||||
|
|
||||||
|
<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"
|
||||||
|
tools:text="@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/DEX"
|
||||||
|
tools:text="@string/DEX" />
|
||||||
|
|
||||||
|
<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"
|
||||||
|
tools:text="@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/WIS"
|
||||||
|
tools:text="@string/WIS" />
|
||||||
|
|
||||||
|
<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/CHA"
|
||||||
|
tools:text="@string/CHA" />
|
||||||
|
</GridLayout>
|
||||||
|
</HorizontalScrollView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/defenseContainer"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/titleDefense"
|
||||||
|
android:text="Defense"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="?android:textColorSecondary"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingLeft="8dip"
|
||||||
|
android:paddingRight="8dip"/>
|
||||||
|
|
||||||
|
<GridLayout
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/defenseGrid"
|
||||||
|
android:columnCount="2"
|
||||||
|
android:rowCount="2">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
|
android:typeface="monospace"
|
||||||
|
android:ems="5"
|
||||||
|
android:layout_row="0"
|
||||||
|
android:layout_column="0"
|
||||||
|
android:id="@+id/CA"
|
||||||
|
tools:text="AC" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
|
android:typeface="monospace"
|
||||||
|
android:ems="5"
|
||||||
|
android:layout_row="0"
|
||||||
|
android:layout_column="1"
|
||||||
|
android:id="@+id/FORT"
|
||||||
|
tools:text="FORT" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
|
android:typeface="monospace"
|
||||||
|
android:ems="5"
|
||||||
|
android:layout_row="1"
|
||||||
|
android:layout_column="0"
|
||||||
|
android:id="@+id/REF"
|
||||||
|
tools:text="REF" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
|
android:typeface="monospace"
|
||||||
|
android:ems="5"
|
||||||
|
android:layout_row="1"
|
||||||
|
android:layout_column="1"
|
||||||
|
android:id="@+id/VOL"
|
||||||
|
tools:text="VOL" />
|
||||||
|
</GridLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
|
@ -34,4 +34,11 @@
|
||||||
</menu>
|
</menu>
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/action_stats"
|
||||||
|
android:title="@string/show_stats"
|
||||||
|
android:orderInCategory="10"
|
||||||
|
app:showAsAction="ifRoom"
|
||||||
|
android:icon="@drawable/ic_action_stats" />
|
||||||
|
|
||||||
</menu>
|
</menu>
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
<string name="add_player">Añadir personaje</string>
|
<string name="add_player">Añadir personaje</string>
|
||||||
<string name="delete">Borrar</string>
|
<string name="delete">Borrar</string>
|
||||||
<string name="edit">Editar</string>
|
<string name="edit">Editar</string>
|
||||||
<string name="help_welcome_text">Toca un jugador para seleccionarlo, mantén pulsado para opciones</string>
|
<string name="help_list">Toca para abrir, mantén pulsado para opciones</string>
|
||||||
<string name="impact">Impacto</string>
|
<string name="impact">Impacto</string>
|
||||||
<string name="impactEditHint">1d6 + 4 y eres invisible</string>
|
<string name="impactEditHint">1d6 + 4 y eres invisible</string>
|
||||||
<string name="keywords">Palabras clave</string>
|
<string name="keywords">Palabras clave</string>
|
||||||
|
@ -104,7 +104,7 @@
|
||||||
<item>Carisma</item>
|
<item>Carisma</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="defence">
|
<string-array name="defense">
|
||||||
<item>Defensa</item>
|
<item>Defensa</item>
|
||||||
<item>CA</item>
|
<item>CA</item>
|
||||||
<item>Fortaleza</item>
|
<item>Fortaleza</item>
|
||||||
|
@ -112,10 +112,66 @@
|
||||||
<item>Voluntad</item>
|
<item>Voluntad</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="abilities">
|
||||||
|
<item>Habilidad</item>
|
||||||
|
<item>Acrobacias</item>
|
||||||
|
<item>Arcanos</item>
|
||||||
|
<item>Atletismo</item>
|
||||||
|
<item>BLUFF</item>
|
||||||
|
<item>Diplomacia</item>
|
||||||
|
<item>Dungeons</item>
|
||||||
|
<item>ENDURANCE</item>
|
||||||
|
<item>Sanar</item>
|
||||||
|
<item>Historia</item>
|
||||||
|
<item>INSIGHT</item>
|
||||||
|
<item>Intimidación</item>
|
||||||
|
<item>Naturaleza</item>
|
||||||
|
<item>Percepción</item>
|
||||||
|
<item>Religión</item>
|
||||||
|
<item>STEALTH</item>
|
||||||
|
<item>STREETWISE</item>
|
||||||
|
<item>Hurto</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="classes">
|
||||||
|
<item>Clase</item>
|
||||||
|
<item>Ardiente</item>
|
||||||
|
<item>Brujo</item>
|
||||||
|
<item>Buscador</item>
|
||||||
|
<item>Clérigo</item>
|
||||||
|
<item>Explorador</item>
|
||||||
|
<item>Guerrero</item>
|
||||||
|
<item>Mago</item>
|
||||||
|
<item>Mente de Batalla</item>
|
||||||
|
<item>Monje</item>
|
||||||
|
<item>Paladín</item>
|
||||||
|
<item>Pícaro</item>
|
||||||
|
<item>Psiónico</item>
|
||||||
|
<item>Sacerdote Rúnico</item>
|
||||||
|
<item>Señor de la Guerra</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
|
||||||
|
<string-array name="races">
|
||||||
|
<item>Race</item>
|
||||||
|
<item>Dracónidos</item>
|
||||||
|
<item>Eladrines</item>
|
||||||
|
<item>Elfos</item>
|
||||||
|
<item>Enanos</item>
|
||||||
|
<item>Gitzerai</item>
|
||||||
|
<item>Humanos</item>
|
||||||
|
<item>Medianos</item>
|
||||||
|
<item>Mente del Fragmento</item>
|
||||||
|
<item>Minotauro</item>
|
||||||
|
<item>Salvaje</item>
|
||||||
|
<item>Semielfo</item>
|
||||||
|
<item>Tiflin</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
<string name="required">Este campo es obligatorio</string>
|
<string name="required">Este campo es obligatorio</string>
|
||||||
<string name="sure">¿Estás seguro?</string>
|
<string name="sure">¿Estás seguro?</string>
|
||||||
<string name="used">Has usado</string>
|
<string name="used">Usado</string>
|
||||||
|
<string name="have_used">Has usado</string>
|
||||||
<string name="restored">Valores restaurados</string>
|
<string name="restored">Valores restaurados</string>
|
||||||
<string name="export">Exportar</string>
|
<string name="export">Exportar</string>
|
||||||
<string name="healed">Has recuperado %d PG</string>
|
<string name="healed">Has recuperado %d PG</string>
|
||||||
|
@ -123,4 +179,6 @@
|
||||||
<string name="lost_hp">Has perdido %d PG</string>
|
<string name="lost_hp">Has perdido %d PG</string>
|
||||||
<string name="level_up">Subir un nivel</string>
|
<string name="level_up">Subir un nivel</string>
|
||||||
<string name="use">Usar</string>
|
<string name="use">Usar</string>
|
||||||
|
<string name="no_powers">No tienes poderes, añade uno</string>
|
||||||
|
<string name="show_stats">Mostrar ataque/defensa</string>
|
||||||
</resources>
|
</resources>
|
|
@ -48,7 +48,7 @@
|
||||||
<string name="add_player">Add player</string>
|
<string name="add_player">Add player</string>
|
||||||
<string name="zero" translatable="false">0</string>
|
<string name="zero" translatable="false">0</string>
|
||||||
<string name="no_players">No players, please add one</string>
|
<string name="no_players">No players, please add one</string>
|
||||||
<string name="help_welcome_text">Press a player to open, hold for options</string>
|
<string name="help_list">Press to open, hold for options</string>
|
||||||
<string name="name">Name</string>
|
<string name="name">Name</string>
|
||||||
<string name="keywords">Keywords</string>
|
<string name="keywords">Keywords</string>
|
||||||
<string name="powerNameHint">Blasting charm</string>
|
<string name="powerNameHint">Blasting charm</string>
|
||||||
|
@ -61,7 +61,8 @@
|
||||||
<string name="objective">Objective</string>
|
<string name="objective">Objective</string>
|
||||||
<string name="objectiveHint">One creature</string>
|
<string name="objectiveHint">One creature</string>
|
||||||
<string name="required">This field is required</string>
|
<string name="required">This field is required</string>
|
||||||
<string name="used">You have used</string>
|
<string name="used">Used</string>
|
||||||
|
<string name="have_used">You have used</string>
|
||||||
<string name="sure">Are you sure?</string>
|
<string name="sure">Are you sure?</string>
|
||||||
<string name="healed">You have restored %d HP</string>
|
<string name="healed">You have restored %d HP</string>
|
||||||
<string name="restored">Values restored</string>
|
<string name="restored">Values restored</string>
|
||||||
|
@ -149,22 +150,23 @@
|
||||||
<item>Thievery</item>
|
<item>Thievery</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
|
<!-- TODO: correctly translate and order the classes-->
|
||||||
<string-array name="classes">
|
<string-array name="classes">
|
||||||
<item>Class</item>
|
<item>Class</item>
|
||||||
<item>Ardiente</item>
|
<item>Ardiente</item>
|
||||||
<item>Brujo</item>
|
<item>Warlock</item>
|
||||||
<item>Buscador</item>
|
<item>Buscador</item>
|
||||||
<item>Clérigo</item>
|
<item>Cleric</item>
|
||||||
<item>Explorador</item>
|
<item>Explorer</item>
|
||||||
<item>Guerrero</item>
|
<item>Warrior</item>
|
||||||
<item>Mago</item>
|
<item>Wizard</item>
|
||||||
<item>Mente de Batalla</item>
|
<item>Mente de Batalla</item>
|
||||||
<item>Monje</item>
|
<item>Monje</item>
|
||||||
<item>Paladín</item>
|
<item>Paladín</item>
|
||||||
<item>Pícaro</item>
|
<item>Pícaro</item>
|
||||||
<item>Psiónico</item>
|
<item>Psiónico</item>
|
||||||
<item>Sacerdote Rúnico</item>
|
<item>Sacerdote Rúnico</item>
|
||||||
<item>Señor de la Guerra</item>
|
<item>Warlord</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="races">
|
<string-array name="races">
|
||||||
|
@ -187,5 +189,16 @@
|
||||||
<string name="lost_hp">Lost %d HP</string>
|
<string name="lost_hp">Lost %d HP</string>
|
||||||
<string name="level_up">Level up</string>
|
<string name="level_up">Level up</string>
|
||||||
<string name="use">Use</string>
|
<string name="use">Use</string>
|
||||||
|
<string name="no_powers">There are no powers, try creating one</string>
|
||||||
|
<string name="show_stats">Show attack/defense</string>
|
||||||
|
<string name="title_activity_display">Display</string>
|
||||||
|
|
||||||
|
<string name="title_section1">Section 1</string>
|
||||||
|
<string name="title_section2">Section 2</string>
|
||||||
|
<string name="title_section3">Section 3</string>
|
||||||
|
|
||||||
|
<string name="hello_world">Hello world!</string>
|
||||||
|
|
||||||
|
<string name="action_settings">Settings</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|