Remove a TODO comment and remove the usage of ApiStatus.Internal in ButtonImpl.kt

This commit is contained in:
Username404 2021-05-15 01:57:21 +02:00
parent b524693b2a
commit 81f4923185
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
2 changed files with 2 additions and 5 deletions

View File

@ -27,7 +27,7 @@ class ClickBox(
(x + width), y + height + 3, (x + width), y + height + 3,
color = color, width = 3, height = clickboxHeightOffset - 6, color = color, width = 3, height = clickboxHeightOffset - 6,
opacity = 0.75F opacity = 0.75F
) { // TODO Fix the progress bar when scrolling a lot ) {
override fun render(poseStack: PoseStack?) { override fun render(poseStack: PoseStack?) {
RenderSystem.disableTexture() RenderSystem.disableTexture()
RenderSystem.enableBlend() RenderSystem.enableBlend()

View File

@ -9,11 +9,8 @@ import fr.username404.snowygui.gui.FontUtil
import fr.username404.snowygui.gui.Renderable.Rendering.defaultRectFunc import fr.username404.snowygui.gui.Renderable.Rendering.defaultRectFunc
import fr.username404.snowygui.gui.elements.ClickBox import fr.username404.snowygui.gui.elements.ClickBox
import fr.username404.snowygui.gui.feature.ButtonInfo.Companion.Type import fr.username404.snowygui.gui.feature.ButtonInfo.Companion.Type
import org.jetbrains.annotations.ApiStatus
import kotlin.reflect.full.findAnnotation import kotlin.reflect.full.findAnnotation
@ApiStatus.Internal
abstract class ButtonImpl: ColoredElement(0.0, 0.0, 73, 8, opacity = 0.60F) { abstract class ButtonImpl: ColoredElement(0.0, 0.0, 73, 8, opacity = 0.60F) {
private val info = this::class.findAnnotation<ButtonInfo>() ?: throw Exception("Missing @Button annotaton") private val info = this::class.findAnnotation<ButtonInfo>() ?: throw Exception("Missing @Button annotaton")
override var color = info.parent.categoryColor override var color = info.parent.categoryColor