Added fps/performance checkbox (no functionality yet)
This commit is contained in:
@ -3,6 +3,7 @@ package de.frajul.endlessroll.main.screens;
|
||||
import android.support.annotation.IdRes;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.ToggleButton;
|
||||
@ -24,6 +25,8 @@ public class SettingsScreen extends Screen<LinearLayout> implements View.OnClick
|
||||
private TopBar topBar;
|
||||
private ToggleButton musicToggle;
|
||||
private ToggleButton soundToggle;
|
||||
private CheckBox fpsCheckbox;
|
||||
private CheckBox performanceCheckbox;
|
||||
private Button creditsButton;
|
||||
private Button resetButton;
|
||||
|
||||
@ -39,6 +42,10 @@ public class SettingsScreen extends Screen<LinearLayout> implements View.OnClick
|
||||
musicToggle.setOnClickListener(this);
|
||||
soundToggle = (ToggleButton) layout.findViewById(R.id.settings_soundtoggle);
|
||||
soundToggle.setOnClickListener(this);
|
||||
fpsCheckbox = (CheckBox) layout.findViewById(R.id.settings_fps_checkbox);
|
||||
fpsCheckbox.setTypeface(gameActivity.getTypeface());
|
||||
performanceCheckbox = (CheckBox) layout.findViewById(R.id.settings_performance_checkbox);
|
||||
performanceCheckbox.setTypeface(gameActivity.getTypeface());
|
||||
creditsButton = (Button) layout.findViewById(R.id.settings_credits);
|
||||
creditsButton.setOnClickListener(this);
|
||||
resetButton = (Button) layout.findViewById(R.id.settings_reset);
|
||||
@ -63,6 +70,7 @@ public class SettingsScreen extends Screen<LinearLayout> implements View.OnClick
|
||||
|
||||
musicToggle.setChecked(!gameActivity.getSoundManager().isMusicMuted());
|
||||
soundToggle.setChecked(!gameActivity.getSoundManager().isSoundsMuted());
|
||||
//TODO: set fps/performance checkboxes selected
|
||||
resetButton.setEnabled(super.caller != ScreenType.GAME);
|
||||
}
|
||||
|
||||
@ -73,6 +81,7 @@ public class SettingsScreen extends Screen<LinearLayout> implements View.OnClick
|
||||
gameActivity.getDataStorageHandler()
|
||||
.writeMusicMuted(gameActivity.getSoundManager().isMusicMuted());
|
||||
|
||||
//TODO: write fps/performance
|
||||
flipToCaller();
|
||||
}
|
||||
|
||||
|
@ -73,11 +73,13 @@ public class ToolButton {
|
||||
}
|
||||
|
||||
public void update(float frameTime) {
|
||||
boolean showAnimation = true;
|
||||
//TODO: showAnimationBoolean
|
||||
if (progress != 100) {
|
||||
progress += (frameTime) / (toolType
|
||||
.getCurrentUpgradeValue(ToolUpgradeType.COOLDOWN) / 100);
|
||||
progress = Math.min(progress, 100);
|
||||
if (progress == 100)
|
||||
if (progress == 100 && showAnimation)
|
||||
animationView.startAnimation(scaleAnimation);
|
||||
}
|
||||
progressBar.setProgress(100 - (int) progress);
|
||||
|
Reference in New Issue
Block a user