Add hand cursor to progress gauge panel
This commit is contained in:
parent
c52995541b
commit
dbc793a592
@ -6,6 +6,7 @@ import mezz.jei.api.recipe.RecipeType
|
|||||||
import net.minecraft.ChatFormatting
|
import net.minecraft.ChatFormatting
|
||||||
import net.minecraft.client.gui.screens.Screen
|
import net.minecraft.client.gui.screens.Screen
|
||||||
import net.minecraft.network.chat.Component
|
import net.minecraft.network.chat.Component
|
||||||
|
import ru.dbotthepony.mc.otm.client.CursorType
|
||||||
import ru.dbotthepony.mc.otm.client.render.MGUIGraphics
|
import ru.dbotthepony.mc.otm.client.render.MGUIGraphics
|
||||||
import ru.dbotthepony.mc.otm.client.render.UVWindingOrder
|
import ru.dbotthepony.mc.otm.client.render.UVWindingOrder
|
||||||
import ru.dbotthepony.mc.otm.client.render.WidgetLocation
|
import ru.dbotthepony.mc.otm.client.render.WidgetLocation
|
||||||
@ -94,6 +95,9 @@ open class ProgressGaugePanel<out S : Screen>(
|
|||||||
return recipeTypeSupplier != null && value == InputConstants.MOUSE_BUTTON_LEFT
|
return recipeTypeSupplier != null && value == InputConstants.MOUSE_BUTTON_LEFT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override val cursorType: CursorType
|
||||||
|
get() = if (recipeTypeSupplier != null) CursorType.HAND else CursorType.ARROW
|
||||||
|
|
||||||
override fun onClick(mouseButton: Int) {
|
override fun onClick(mouseButton: Int) {
|
||||||
val recipeTypeSupplier = recipeTypeSupplier ?: return
|
val recipeTypeSupplier = recipeTypeSupplier ?: return
|
||||||
JEIPlugin.RUNTIME.recipesGui.showTypes(recipeTypeSupplier.get())
|
JEIPlugin.RUNTIME.recipesGui.showTypes(recipeTypeSupplier.get())
|
||||||
|
Loading…
Reference in New Issue
Block a user