mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-26 17:14:18 +01:00
Update dependencies and gradle
* Enable OSC if controller id is 0 * Fix night colors
This commit is contained in:
parent
9f6a5df5e0
commit
71ca46fe1a
@ -214,11 +214,11 @@ class EmulationActivity : AppCompatActivity(), SurfaceHolder.Callback, View.OnTo
|
|||||||
game_view.setOnTouchListener(this)
|
game_view.setOnTouchListener(this)
|
||||||
|
|
||||||
// Hide on screen controls when first controller is not set
|
// Hide on screen controls when first controller is not set
|
||||||
on_screen_controller_view.isGone = !InputManager.controllers[0]!!.type.firstController || !settings.onScreenControl
|
on_screen_controller_view.isGone = InputManager.controllers[0]!!.type == ControllerType.None || !settings.onScreenControl
|
||||||
on_screen_controller_view.setOnButtonStateChangedListener(::onButtonStateChanged)
|
on_screen_controller_view.setOnButtonStateChangedListener(::onButtonStateChanged)
|
||||||
on_screen_controller_view.setOnStickStateChangedListener(::onStickStateChanged)
|
on_screen_controller_view.setOnStickStateChangedListener(::onStickStateChanged)
|
||||||
|
|
||||||
on_screen_controller_toggle.isGone = on_screen_controller_toggle.isGone
|
on_screen_controller_toggle.isGone = on_screen_controller_view.isGone
|
||||||
on_screen_controller_toggle.setOnClickListener {
|
on_screen_controller_toggle.setOnClickListener {
|
||||||
on_screen_controller_view.isInvisible = !on_screen_controller_view.isInvisible
|
on_screen_controller_view.isInvisible = !on_screen_controller_view.isInvisible
|
||||||
}
|
}
|
||||||
|
@ -11,8 +11,8 @@ import android.view.ViewGroup
|
|||||||
import androidx.core.view.isGone
|
import androidx.core.view.isGone
|
||||||
import emu.skyline.R
|
import emu.skyline.R
|
||||||
import emu.skyline.adapter.GenericLayoutFactory
|
import emu.skyline.adapter.GenericLayoutFactory
|
||||||
import emu.skyline.adapter.GenericViewHolder
|
|
||||||
import emu.skyline.adapter.GenericListItem
|
import emu.skyline.adapter.GenericListItem
|
||||||
|
import emu.skyline.adapter.GenericViewHolder
|
||||||
import kotlinx.android.synthetic.main.controller_checkbox_item.*
|
import kotlinx.android.synthetic.main.controller_checkbox_item.*
|
||||||
|
|
||||||
private object ControllerCheckBoxLayoutFactory : GenericLayoutFactory {
|
private object ControllerCheckBoxLayoutFactory : GenericLayoutFactory {
|
||||||
@ -33,4 +33,8 @@ class ControllerCheckBoxViewItem(var title : String, var summary : String, var c
|
|||||||
onCheckedChange.invoke(this, position)
|
onCheckedChange.invoke(this, position)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun areItemsTheSame(other : GenericListItem) = other is ControllerCheckBoxViewItem
|
||||||
|
|
||||||
|
override fun areContentsTheSame(other : GenericListItem) = other is ControllerCheckBoxViewItem && title == other.title && summary == other.summary && checked == other.checked
|
||||||
}
|
}
|
||||||
|
@ -38,4 +38,8 @@ open class ControllerViewItem(var content : String = "", var subContent : String
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun update() = adapter?.notifyItemChanged(position)
|
fun update() = adapter?.notifyItemChanged(position)
|
||||||
|
|
||||||
|
override fun areItemsTheSame(other : GenericListItem) = other is ControllerViewItem
|
||||||
|
|
||||||
|
override fun areContentsTheSame(other : GenericListItem) = other is ControllerViewItem && content == other.content && subContent == other.subContent
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ class ControllerActivity : AppCompatActivity() {
|
|||||||
if (controller.type == ControllerType.None)
|
if (controller.type == ControllerType.None)
|
||||||
return
|
return
|
||||||
|
|
||||||
if (id == 0 && controller.type.firstController) {
|
if (id == 0) {
|
||||||
items.add(HeaderViewItem(getString(R.string.osc)))
|
items.add(HeaderViewItem(getString(R.string.osc)))
|
||||||
|
|
||||||
val oscSummary = { checked : Boolean -> getString(if (checked) R.string.osc_shown else R.string.osc_not_shown) }
|
val oscSummary = { checked : Boolean -> getString(if (checked) R.string.osc_shown else R.string.osc_not_shown) }
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<color name="colorPrimary">#FF424242</color>
|
<color name="colorPrimary">#FF424242</color>
|
||||||
<color name="colorPrimaryDark">@android:color/black</color>
|
<color name="colorPrimaryDark">#FF121212</color>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
<string name="joystick">Joystick</string>
|
<string name="joystick">Joystick</string>
|
||||||
<string name="confirm">Confirm</string>
|
<string name="confirm">Confirm</string>
|
||||||
<string name="cancel">Cancel</string>
|
<string name="cancel">Cancel</string>
|
||||||
<string name="osc_recenter_sticks">Recenter sticks on touch</string>
|
<string name="osc_recenter_sticks">Recenter Sticks On Touch</string>
|
||||||
<string name="controller">Controller</string>
|
<string name="controller">Controller</string>
|
||||||
<string name="config_controller">Configure Controller</string>
|
<string name="config_controller">Configure Controller</string>
|
||||||
<string name="controller_type">Controller Type</string>
|
<string name="controller_type">Controller Type</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user