mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2026-08-01 14:19:12 -06:00
Start adding a new custom setting to the original pojav launcher settings
This commit is contained in:
parent
496f3ea33a
commit
1196fc8d86
3 changed files with 18 additions and 1 deletions
|
|
@ -57,13 +57,15 @@ public class AWTCanvasView extends TextureView implements TextureView.SurfaceTex
|
|||
Surface surface = new Surface(getSurfaceTexture());
|
||||
Bitmap rgbArrayBitmap = Bitmap.createBitmap(AWT_CANVAS_WIDTH, AWT_CANVAS_HEIGHT, Bitmap.Config.ARGB_8888);
|
||||
Paint paint = new Paint();
|
||||
paint.setAntiAlias(false);
|
||||
paint.setDither(false);
|
||||
paint.setFilterBitmap(false);
|
||||
long frameEndNanos;
|
||||
long frameStartNanos;
|
||||
long sleepTime;
|
||||
long sleepMillis;
|
||||
int sleepNanos;
|
||||
int[] rgbArray;
|
||||
|
||||
// define the frame rate limit
|
||||
final long frameTimeNanos = (long)(NANOS / 60); // Targeting 60 FPS
|
||||
long frameDuration;
|
||||
|
|
@ -107,6 +109,9 @@ public class AWTCanvasView extends TextureView implements TextureView.SurfaceTex
|
|||
private void refreshSize(){
|
||||
ViewGroup.LayoutParams layoutParams = getLayoutParams();
|
||||
|
||||
|
||||
/** Note: In the future this is a good way to stretch the aspect ratio too. Like for
|
||||
* 16:9 widescreen in SD mode like mudkip osrs videos */
|
||||
if(getHeight() < getWidth()){
|
||||
layoutParams.width = AWT_CANVAS_WIDTH * getHeight() / AWT_CANVAS_HEIGHT;
|
||||
}else{
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ public class CustomSeekBarPreference extends SeekBarPreference {
|
|||
|
||||
setValue(progress + mMin);
|
||||
updateTextViewWithSuffix();
|
||||
System.out.println("Hello from CustomSeekBar: "+progress);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -38,6 +38,17 @@
|
|||
app2:seekBarIncrement="10"
|
||||
android:icon="@drawable/ic_setting_gesture_time"
|
||||
/>
|
||||
<net.kdt.pojavlaunch.prefs.CustomSeekBarPreference
|
||||
android:id="@+id/customSeekBarPreference"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:icon="@drawable/ic_setting_gesture_time"
|
||||
android:key="timeLongPressTrigger"
|
||||
android:summary=""Hello""
|
||||
android:title=""Example""
|
||||
app2:seekBarIncrement="10"
|
||||
app2:selectable="false"
|
||||
app2:showSeekBarValue="true" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue