Updated default opacity to 50%

This change accounts for the change in overlay image opacity to roughly equal how the overlay looks in 2108
This commit is contained in:
OpenSauce04 2024-04-13 16:27:48 +01:00 committed by OpenSauce
parent 460c580bdb
commit d22afdb97f
2 changed files with 6 additions and 6 deletions

View file

@ -810,7 +810,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback, Choreographer.Fram
sliderBinding.apply {
slider.valueTo = 100f
slider.value = preferences.getInt("controlOpacity", 100).toFloat()
slider.value = preferences.getInt("controlOpacity", 50).toFloat()
slider.addOnChangeListener(
Slider.OnChangeListener { slider: Slider, progress: Float, _: Boolean ->
textValue.text = (progress.toInt()).toString()
@ -831,7 +831,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback, Choreographer.Fram
setControlOpacity(sliderBinding.slider.value.toInt())
}
.setNeutralButton(R.string.slider_default) { _: DialogInterface?, _: Int ->
setControlOpacity(100)
setControlOpacity(50)
}
.show()
}
@ -863,7 +863,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback, Choreographer.Fram
private fun resetInputOverlay() {
preferences.edit()
.putInt("controlScale", 50)
.putInt("controlOpacity", 100)
.putInt("controlOpacity", 50)
.apply()
val editor = preferences.edit()

View file

@ -939,7 +939,7 @@ class InputOverlay(context: Context?, attrs: AttributeSet?) : SurfaceView(contex
scale *= (preferences.getInt("controlScale", 50) + 50).toFloat()
scale /= 100f
val opacity: Int = preferences.getInt("controlOpacity", 100) * 255 / 100
val opacity: Int = preferences.getInt("controlOpacity", 50) * 255 / 100
// Initialize the InputOverlayDrawableButton.
val defaultStateBitmap = getBitmap(context, defaultResId, scale)
@ -997,7 +997,7 @@ class InputOverlay(context: Context?, attrs: AttributeSet?) : SurfaceView(contex
scale *= (preferences.getInt("controlScale", 50) + 50).toFloat()
scale /= 100f
val opacity: Int = preferences.getInt("controlOpacity", 100) * 255 / 100
val opacity: Int = preferences.getInt("controlOpacity", 50) * 255 / 100
// Initialize the InputOverlayDrawableDpad.
val defaultStateBitmap = getBitmap(context, defaultResId, scale)
@ -1057,7 +1057,7 @@ class InputOverlay(context: Context?, attrs: AttributeSet?) : SurfaceView(contex
scale *= (preferences.getInt("controlScale", 50) + 50).toFloat()
scale /= 100f
val opacity: Int = preferences.getInt("controlOpacity", 100) * 255 / 100
val opacity: Int = preferences.getInt("controlOpacity", 50) * 255 / 100
// Initialize the InputOverlayDrawableJoystick.
val bitmapOuter = getBitmap(context, resOuter, scale)