Store the Category enum class in the companion object of ButtonInfo

This commit is contained in:
Username404 2021-06-24 22:29:16 +02:00
parent 2d679bf0e3
commit dbc7f6b8bf
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 25 additions and 22 deletions

View File

@ -20,8 +20,7 @@ annotation class ButtonInfo(
TOGGLE,
CLICK
}
}
}; enum class Category(val translationKey: String, val categoryColor: Int, val shouldHide: Boolean = false) {
enum class Category(val translationKey: String, val categoryColor: Int, val shouldHide: Boolean = false) {
MISC("snowy.clickbox.misc", Colors.BLUE),
RISKY("snowy.clickbox.risky", Colors.RED, !riskyCheats),
MACROS("snowy.clickbox.macros", Colors.GREEN);
@ -44,4 +43,8 @@ annotation class ButtonInfo(
init {
ClickGui.components.add(box.apply { if (shouldHide) hidden = true })
}
}
}
}
typealias Category = ButtonInfo.Companion.Category