mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-13 05:25:14 +01:00
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:
parent
460c580bdb
commit
d22afdb97f
@ -810,7 +810,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback, Choreographer.Fram
|
|||||||
|
|
||||||
sliderBinding.apply {
|
sliderBinding.apply {
|
||||||
slider.valueTo = 100f
|
slider.valueTo = 100f
|
||||||
slider.value = preferences.getInt("controlOpacity", 100).toFloat()
|
slider.value = preferences.getInt("controlOpacity", 50).toFloat()
|
||||||
slider.addOnChangeListener(
|
slider.addOnChangeListener(
|
||||||
Slider.OnChangeListener { slider: Slider, progress: Float, _: Boolean ->
|
Slider.OnChangeListener { slider: Slider, progress: Float, _: Boolean ->
|
||||||
textValue.text = (progress.toInt()).toString()
|
textValue.text = (progress.toInt()).toString()
|
||||||
@ -831,7 +831,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback, Choreographer.Fram
|
|||||||
setControlOpacity(sliderBinding.slider.value.toInt())
|
setControlOpacity(sliderBinding.slider.value.toInt())
|
||||||
}
|
}
|
||||||
.setNeutralButton(R.string.slider_default) { _: DialogInterface?, _: Int ->
|
.setNeutralButton(R.string.slider_default) { _: DialogInterface?, _: Int ->
|
||||||
setControlOpacity(100)
|
setControlOpacity(50)
|
||||||
}
|
}
|
||||||
.show()
|
.show()
|
||||||
}
|
}
|
||||||
@ -863,7 +863,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback, Choreographer.Fram
|
|||||||
private fun resetInputOverlay() {
|
private fun resetInputOverlay() {
|
||||||
preferences.edit()
|
preferences.edit()
|
||||||
.putInt("controlScale", 50)
|
.putInt("controlScale", 50)
|
||||||
.putInt("controlOpacity", 100)
|
.putInt("controlOpacity", 50)
|
||||||
.apply()
|
.apply()
|
||||||
|
|
||||||
val editor = preferences.edit()
|
val editor = preferences.edit()
|
||||||
|
@ -939,7 +939,7 @@ class InputOverlay(context: Context?, attrs: AttributeSet?) : SurfaceView(contex
|
|||||||
scale *= (preferences.getInt("controlScale", 50) + 50).toFloat()
|
scale *= (preferences.getInt("controlScale", 50) + 50).toFloat()
|
||||||
scale /= 100f
|
scale /= 100f
|
||||||
|
|
||||||
val opacity: Int = preferences.getInt("controlOpacity", 100) * 255 / 100
|
val opacity: Int = preferences.getInt("controlOpacity", 50) * 255 / 100
|
||||||
|
|
||||||
// Initialize the InputOverlayDrawableButton.
|
// Initialize the InputOverlayDrawableButton.
|
||||||
val defaultStateBitmap = getBitmap(context, defaultResId, scale)
|
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 *= (preferences.getInt("controlScale", 50) + 50).toFloat()
|
||||||
scale /= 100f
|
scale /= 100f
|
||||||
|
|
||||||
val opacity: Int = preferences.getInt("controlOpacity", 100) * 255 / 100
|
val opacity: Int = preferences.getInt("controlOpacity", 50) * 255 / 100
|
||||||
|
|
||||||
// Initialize the InputOverlayDrawableDpad.
|
// Initialize the InputOverlayDrawableDpad.
|
||||||
val defaultStateBitmap = getBitmap(context, defaultResId, scale)
|
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 *= (preferences.getInt("controlScale", 50) + 50).toFloat()
|
||||||
scale /= 100f
|
scale /= 100f
|
||||||
|
|
||||||
val opacity: Int = preferences.getInt("controlOpacity", 100) * 255 / 100
|
val opacity: Int = preferences.getInt("controlOpacity", 50) * 255 / 100
|
||||||
|
|
||||||
// Initialize the InputOverlayDrawableJoystick.
|
// Initialize the InputOverlayDrawableJoystick.
|
||||||
val bitmapOuter = getBitmap(context, resOuter, scale)
|
val bitmapOuter = getBitmap(context, resOuter, scale)
|
||||||
|
Loading…
Reference in New Issue
Block a user