Skip to content

Commit e6ca07a

Browse files
committed
Preview color outline
1 parent d95b9b8 commit e6ca07a

File tree

1 file changed

+10
-1
lines changed
  • common/src/main/kotlin/com/lambda/gui/impl/clickgui/module/setting/settings

1 file changed

+10
-1
lines changed

common/src/main/kotlin/com/lambda/gui/impl/clickgui/module/setting/settings/ColorPicker.kt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class ColorPicker(
8080
}
8181

8282
init {
83-
rect {
83+
val preview = rect {
8484
val shrink = 3.0
8585

8686
onUpdate {
@@ -94,6 +94,15 @@ class ColorPicker(
9494
}
9595
}
9696

97+
outline {
98+
onUpdate {
99+
rect = preview.rect
100+
roundRadius = 100.0
101+
glowRadius = 5.0
102+
setColor(Color.BLACK.setAlpha(0.1 * showAnimation))
103+
}
104+
}
105+
97106
content.layout {
98107
val getU = { transform(mousePosition.x, positionX, positionX + width, 0.0, 1.0) }
99108
val getV = { transform(mousePosition.y, positionY, positionY + height, 0.0, 1.0) }

0 commit comments

Comments
 (0)