diff --git a/core/src/zero1hd/rhythmbullet/graphics/ui/pages/OptionsPage.java b/core/src/zero1hd/rhythmbullet/graphics/ui/pages/OptionsPage.java index cb9b92d..14e84e8 100755 --- a/core/src/zero1hd/rhythmbullet/graphics/ui/pages/OptionsPage.java +++ b/core/src/zero1hd/rhythmbullet/graphics/ui/pages/OptionsPage.java @@ -156,6 +156,34 @@ public class OptionsPage extends Page { return super.keyUp(event, keycode); } }); + + optionsTable.row(); + + Label fpsLabel = new Label("", core.getDefaultSkin()) { + @Override + public void act(float delta) { + setText("Current Frames Per Second: " + Gdx.graphics.getFramesPerSecond()); + super.act(delta); + } + }; + optionsTable.add(fpsLabel).colspan(2); + + optionsTable.row(); + + Label usageLabel = new Label("Current usage (lower the better): " + 100f*((float)(Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory())/(float)Runtime.getRuntime().totalMemory()) + "%", core.getDefaultSkin()) { + float refreshTime = 60; + @Override + public void act(float delta) { + refreshTime -= delta; + if (refreshTime <= 0) { + refreshTime = 60; + setText("Current usage (lower the better): " + 100f*((float)(Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory())/(float)Runtime.getRuntime().totalMemory()) + "%"); + } + super.act(delta); + } + }; + + optionsTable.add(usageLabel).colspan(2); } public void saveOptions(Preferences prefs) {