Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions src/main/kotlin/gg/essential/vigilance/gui/CategoryLabel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ class CategoryLabel(private val gui: SettingsGui, internal val category: Categor

fun select() {
gui.selectCategory(category)

isSelected = true
text.animate {
setColorAnimation(Animations.OUT_EXP, 0.5f, VigilancePalette.textActive.toConstraint())
}
}

fun deselect() {
Expand All @@ -67,4 +62,11 @@ class CategoryLabel(private val gui: SettingsGui, internal val category: Categor
setColorAnimation(Animations.OUT_EXP, 0.5f, VigilancePalette.text.toConstraint())
}
}

fun markSelected() {
isSelected = true
text.animate {
setColorAnimation(Animations.OUT_EXP, 0.5f, VigilancePalette.textActive.toConstraint())
}
}
Comment on lines +65 to +71
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For symmetry I think we should also make a markDeselected (or have this method accept a selected: Boolean) which the current deselect calls, and then slap a @Deprecated on select and deselect because we shouldn't be using them any more, they only exist for backwards compatibility, we should always be using gui.selectCategory (which will in turn only use the mark* method(s)).

}