Make a few overridden methods of ButtonImpl.kt final and rename the mixins .json files
This commit is contained in:
parent
596eb27fff
commit
3c7d145ca8
|
@ -61,7 +61,7 @@ subprojects {
|
|||
officialMojangMappings().crane("dev.architectury:crane:${rootProject.architectury.minecraft}+build.+")
|
||||
}
|
||||
silentMojangMappingsLicense()
|
||||
mixinConfig("snowygui-mixins.json")
|
||||
mixinConfig("snowygui-${project.name}.mixins.json")
|
||||
refmapName = "snowygui-${project.name}-refmap.json"
|
||||
}
|
||||
apply(plugin = "com.github.johnrengelman.shadow")
|
||||
|
|
|
@ -72,7 +72,7 @@ sealed class ButtonImpl: ColoredElement(0.0, 0.0, 73, 8, opacity = 0.60F) {
|
|||
}
|
||||
private fun lightUp() { opacity += ButtonInfo.lightningFactor }
|
||||
private fun lightDown() { opacity -= ButtonInfo.lightningFactor }
|
||||
override fun mouseClicked(d: Double, e: Double, i: Int): Boolean {
|
||||
final override fun mouseClicked(d: Double, e: Double, i: Int): Boolean {
|
||||
wasWithinBounds = isWithinBounds(d, e).also {
|
||||
if (it) {
|
||||
if (info.kind == Type.TOGGLE) {
|
||||
|
@ -83,13 +83,13 @@ sealed class ButtonImpl: ColoredElement(0.0, 0.0, 73, 8, opacity = 0.60F) {
|
|||
return false
|
||||
}
|
||||
|
||||
override fun mouseReleased(d: Double, e: Double, i: Int): Boolean {
|
||||
final override fun mouseReleased(d: Double, e: Double, i: Int): Boolean {
|
||||
if (wasWithinBounds && (info.kind == Type.CLICK)) {
|
||||
execAction()
|
||||
lightDown()
|
||||
}; return false
|
||||
}
|
||||
override fun render(poseStack: PoseStack?) {
|
||||
final override fun render(poseStack: PoseStack?) {
|
||||
prepareDraw()
|
||||
defaultRectFunc()
|
||||
endDraw()
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
]
|
||||
},
|
||||
"mixins": [
|
||||
"snowygui-mixins.json",
|
||||
"snowygui-mixins-fabric.json"
|
||||
"snowygui-common.mixins.json",
|
||||
"snowygui-fabric.mixins.json"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.11.0",
|
||||
|
|
Loading…
Reference in New Issue