HTTPS
https://git.nageyqma.icu/nageyqma/odin_next.git
SSH
git@git.nageyqma.icu:nageyqma/odin_next.git
HTTPS 链接可直接 git clone;推送代码请使用 SSH。
123456789101112131415161718192021222324252627282930
package com.odtheking.odin.clickgui
import com.odtheking.odin.features.impl.render.ClickGUIModule
import com.odtheking.odin.utils.Color
import com.odtheking.odin.utils.Color.Companion.brighter
import com.odtheking.odin.utils.Colors
import net.minecraft.util.ARGB
object GuiTheme {
const val ROW_WIDTH = 160
const val ROW_HEIGHT = 21
const val RADIUS = 5f
const val CAP = 5
const val PADDING = 6
const val PANEL_BLUR = 12f
fun textY(y: Int, height: Int): Int = y + (height - 8) / 2
val background: Color get() = Colors.gray26
val surface: Color get() = Colors.gray38
val accent: Color get() = ClickGUIModule.clickGUIColor
val shadow: Color = Color(0, 0, 0, 0.4f)
}
internal fun blend(from: Int, to: Int, progress: Float): Int = ARGB.srgbLerp(progress, from, to)
internal fun Color.hoverTint(hover: Float, factor: Float = 1.3f): Int =
if (hover <= 0f) rgba else blend(rgba, brighter(factor).rgba, hover)