<string name="skill_longdescription_concussion">When making an attack on a target whose block chance (BC) is at least %1$d lower than your attack chance (AC), there is a %2$d %% chance that the hit will cause a concussion on the target. A concussion will severely lower the target\'s offensive combat abilities, making the target less able to land successful attacks.</string>
<string name="about_button4">About</string>
+ <string name="preferences_ui_category">Interface</string>
+ <string name="preferences_ui_enable_animations_title">Enable animations</string>
+ <string name="preferences_ui_enable_animations">Show animations for various interface elements, such as the combat bar.</string>
</resources>
android:summary="@string/preferences_movement_dpad_minimizeable"
android:key="dpadMinimizeable" />
</PreferenceCategory>
+ <PreferenceCategory
+ android:title="@string/preferences_ui_category">
+ <CheckBoxPreference
+ android:title="@string/preferences_ui_enable_animations_title"
+ android:defaultValue="true"
+ android:summary="@string/preferences_ui_enable_animations"
+ android:key="enableUiAnimations" />
+ </PreferenceCategory>
</PreferenceScreen>
public int dpadPosition;\r
public boolean dpadMinimizeable = true;\r
public boolean optimizedDrawing = false;\r
+ public boolean enableUiAnimations = true;\r
\r
public static void read(final Context androidContext, AndorsTrailPreferences dest) {\r
try {\r
dest.dpadPosition = Integer.parseInt(prefs.getString("dpadposition", Integer.toString(DPAD_POSITION_DISABLED)));\r
dest.dpadMinimizeable = prefs.getBoolean("dpadMinimizeable", true);\r
dest.optimizedDrawing = prefs.getBoolean("optimized_drawing", false);\r
+ dest.enableUiAnimations = prefs.getBoolean("enableUiAnimations", true);\r
\r
// This might be implemented as a skill in the future.\r
//dest.movementAggressiveness = Integer.parseInt(prefs.getString("movementaggressiveness", Integer.toString(MOVEMENTAGGRESSIVENESS_NORMAL)));\r
dest.dpadPosition = DPAD_POSITION_DISABLED;\r
dest.dpadMinimizeable = true;\r
dest.optimizedDrawing = false;\r
+ dest.enableUiAnimations = true;\r
}\r
}\r
\r
statusview = (StatusView) findViewById(R.id.main_statusview);
combatview = (CombatView) findViewById(R.id.main_combatview);
quickitemview = (QuickitemView) findViewById(R.id.main_quickitemview);
- activeConditions = new DisplayActiveActorConditionIcons(world.tileManager, this, (RelativeLayout) findViewById(R.id.statusview_activeconditions));
+ activeConditions = new DisplayActiveActorConditionIcons(app.preferences, world.tileManager, this, (RelativeLayout) findViewById(R.id.statusview_activeconditions));
dpad = (VirtualDpadView) findViewById(R.id.main_virtual_dpad);
statusText = (TextView) findViewById(R.id.statusview_statustext);
import android.widget.RelativeLayout;
import android.widget.TextView;
+import com.gpl.rpg.AndorsTrail.AndorsTrailPreferences;
import com.gpl.rpg.AndorsTrail.Dialogs;
import com.gpl.rpg.AndorsTrail.AndorsTrailApplication;
import com.gpl.rpg.AndorsTrail.R;
private final WorldContext world;
private final ViewContext view;
private final Resources res;
+ private final AndorsTrailPreferences preferences;
private final Player player;
private final Animation displayAnimation;
private final Animation hideAnimation;
private Monster currentMonster;
+
public CombatView(final Context context, AttributeSet attr) {
super(context, attr);
AndorsTrailApplication app = AndorsTrailApplication.getApplicationFromActivityContext(context);
this.world = app.world;
this.player = world.model.player;
this.view = app.currentView.get();
+ this.preferences = app.preferences;
this.res = getResources();
setFocusable(false);
public void show() {
setVisibility(View.VISIBLE);
bringToFront();
- startAnimation(displayAnimation);
+ if (preferences.enableUiAnimations) {
+ startAnimation(displayAnimation);
+ }
}
public void hide() {
- startAnimation(hideAnimation);
- //setVisibility(View.GONE);
+ if (preferences.enableUiAnimations) {
+ startAnimation(hideAnimation);
+ } else {
+ setVisibility(View.GONE);
+ }
}
}
import android.widget.TextView;
import android.widget.RelativeLayout.LayoutParams;
+import com.gpl.rpg.AndorsTrail.AndorsTrailPreferences;
import com.gpl.rpg.AndorsTrail.R;
import com.gpl.rpg.AndorsTrail.context.WorldContext;
import com.gpl.rpg.AndorsTrail.model.ability.ActorCondition;
public class DisplayActiveActorConditionIcons implements ActorConditionListener {
+ private final AndorsTrailPreferences preferences;
private final TileManager tileManager;
private final RelativeLayout activeConditions;
private final ArrayList<ActiveConditionIcon> currentConditionIcons = new ArrayList<ActiveConditionIcon>();
private final WeakReference<Context> androidContext;
- public DisplayActiveActorConditionIcons(final TileManager tileManager, Context androidContext, RelativeLayout activeConditions) {
+ public DisplayActiveActorConditionIcons(
+ final AndorsTrailPreferences preferences,
+ final TileManager tileManager,
+ Context androidContext,
+ RelativeLayout activeConditions) {
+ this.preferences = preferences;
this.tileManager = tileManager;
this.androidContext = new WeakReference<Context>(androidContext);
this.activeConditions = activeConditions;
public void hide(boolean useAnimation) {
if (useAnimation) {
- image.startAnimation(onRemovedIconAnimation);
+ if (preferences.enableUiAnimations) {
+ image.startAnimation(onRemovedIconAnimation);
+ } else {
+ onAnimationEnd(onRemovedIconAnimation);
+ }
} else {
image.setVisibility(View.GONE);
condition = null;
text.setVisibility(View.GONE);
}
public void show() {
+ if (!preferences.enableUiAnimations) return;
image.startAnimation(onNewIconAnimation);
if (text.getVisibility() == View.VISIBLE) text.startAnimation(onNewIconAnimation);
}
public void pulseAnimate() {
+ if (!preferences.enableUiAnimations) return;
image.startAnimation(onAppliedEffectAnimation);
}