mirror of
https://gitlab.com/2009scape/rt4-client.git
synced 2025-12-09 16:45:46 -07:00
general cleanup
This commit is contained in:
parent
52d07d5795
commit
1cca6611ee
8 changed files with 46 additions and 65 deletions
|
|
@ -95,10 +95,8 @@ object Helpers {
|
|||
}
|
||||
|
||||
|
||||
|
||||
fun convertToColor(value: String): Color {
|
||||
val color = Color.decode(value) // Assumes value is in format "#RRGGBB" or "0xRRGGBB"
|
||||
return color
|
||||
private fun convertToColor(value: String): Color {
|
||||
return Color.decode(value)
|
||||
}
|
||||
|
||||
fun colorToHex(color: Color): String {
|
||||
|
|
@ -134,11 +132,7 @@ object Helpers {
|
|||
class FieldNotifier(private val plugin: Any) {
|
||||
private val observers = mutableListOf<FieldObserver>()
|
||||
|
||||
fun addObserver(observer: FieldObserver) {
|
||||
observers.add(observer)
|
||||
}
|
||||
|
||||
fun notifyFieldChange(field: Field, newValue: Any?) {
|
||||
private fun notifyFieldChange(field: Field, newValue: Any?) {
|
||||
for (observer in observers) {
|
||||
observer.onFieldChange(field, newValue)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue