Formatting
This commit is contained in:
parent
f20c4e73a0
commit
43bddeccd3
6
LICENSE
6
LICENSE
|
@ -755,9 +755,3 @@
|
|||
JetBrains s.r.o. and Kotlin Programming Language contributors
|
||||
Kotlin Compiler, Test Data+Libraries, and Tools repository contain third-party code, to which different licenses may apply
|
||||
See: https://github.com/JetBrains/kotlin/blob/master/license/README.md
|
||||
|
||||
- PropertyLoader - Property annotation and loader for fields
|
||||
[The Apache Software License, Version 2.0]
|
||||
https://git.dorkbox.com/dorkbox/PropertyLoader
|
||||
Copyright 2023
|
||||
Dorkbox LLC
|
||||
|
|
|
@ -104,7 +104,7 @@ dependencies {
|
|||
api("com.dorkbox:TweenEngine:8.3.1")
|
||||
api("com.dorkbox:SwingActiveRender:1.3")
|
||||
api("com.dorkbox:Utilities:1.39")
|
||||
api("com.dorkbox:PropertyLoader:1.1")
|
||||
api("com.dorkbox:PropertyLoader:1.2")
|
||||
}
|
||||
|
||||
publishToSonatype {
|
||||
|
|
|
@ -22,7 +22,8 @@ internal class AppAccessor : TweenAccessor<AppNotify> {
|
|||
const val X_POS = 0
|
||||
const val Y_POS = 1
|
||||
const val X_Y_POS = 2
|
||||
const val PROGRESS = 3
|
||||
const val SHAKE = 3
|
||||
const val PROGRESS = 4
|
||||
}
|
||||
|
||||
override fun getValues(target: AppNotify, tweenType: Int, returnValues: FloatArray): Int {
|
||||
|
@ -43,6 +44,12 @@ internal class AppAccessor : TweenAccessor<AppNotify> {
|
|||
return 2
|
||||
}
|
||||
|
||||
SHAKE -> {
|
||||
returnValues[0] = target.x.toFloat()
|
||||
returnValues[1] = target.y.toFloat()
|
||||
return 2
|
||||
}
|
||||
|
||||
PROGRESS -> {
|
||||
returnValues[0] = target.progress.toFloat()
|
||||
return 1
|
||||
|
@ -68,6 +75,11 @@ internal class AppAccessor : TweenAccessor<AppNotify> {
|
|||
return
|
||||
}
|
||||
|
||||
SHAKE -> {
|
||||
target.setLocationInternal(newValues[0].toInt(), newValues[1].toInt())
|
||||
return
|
||||
}
|
||||
|
||||
PROGRESS -> {
|
||||
target.progress = newValues[0].toInt()
|
||||
return
|
||||
|
|
|
@ -259,7 +259,7 @@ internal class AppNotify(override val notification: Notify): Canvas(), NotifyTyp
|
|||
override fun doShake(count: Int, targetX: Float, targetY: Float) {
|
||||
if (shakeTween != null) {
|
||||
shakeTween!!.valueRelative(targetX, targetY)
|
||||
.repeatAutoReverse(count, 0f)
|
||||
.repeatAutoReverse(count, 0f)
|
||||
} else {
|
||||
val tween = tweenEngine
|
||||
.to(this, AppAccessor.X_Y_POS, tweenAccessor, 0.05f)
|
||||
|
|
|
@ -22,7 +22,8 @@ internal class DesktopAccessor : TweenAccessor<DesktopNotify> {
|
|||
const val X_POS = 0
|
||||
const val Y_POS = 1
|
||||
const val X_Y_POS = 2
|
||||
const val PROGRESS = 3
|
||||
const val SHAKE = 3
|
||||
const val PROGRESS = 4
|
||||
}
|
||||
|
||||
override fun getValues(target: DesktopNotify, tweenType: Int, returnValues: FloatArray): Int {
|
||||
|
@ -43,6 +44,12 @@ internal class DesktopAccessor : TweenAccessor<DesktopNotify> {
|
|||
return 2
|
||||
}
|
||||
|
||||
SHAKE -> {
|
||||
returnValues[0] = target.x.toFloat()
|
||||
returnValues[1] = target.y.toFloat()
|
||||
return 2
|
||||
}
|
||||
|
||||
PROGRESS -> {
|
||||
returnValues[0] = target.progress.toFloat()
|
||||
return 1
|
||||
|
@ -68,6 +75,11 @@ internal class DesktopAccessor : TweenAccessor<DesktopNotify> {
|
|||
return
|
||||
}
|
||||
|
||||
SHAKE -> {
|
||||
target.setLocationInternal(newValues[0].toInt(), newValues[1].toInt())
|
||||
return
|
||||
}
|
||||
|
||||
PROGRESS -> {
|
||||
target.progress = newValues[0].toInt()
|
||||
return
|
||||
|
|
|
@ -50,11 +50,11 @@ object NotifyTest {
|
|||
|
||||
image!!
|
||||
|
||||
bottomRightInFrame(3, frame)
|
||||
topLeftInFrame(2, frame)
|
||||
// bottomRightInFrame(3, frame)
|
||||
// topLeftInFrame(2, frame)
|
||||
|
||||
react()
|
||||
// topRightMonitor(4)
|
||||
// react()
|
||||
topRightMonitor(4)
|
||||
// topAndBottomRightMonitor(1)
|
||||
// bottomLeftScaled(image)
|
||||
// bottomLeftStacking(3, image)
|
||||
|
@ -94,12 +94,12 @@ object NotifyTest {
|
|||
// .setScreen(0)
|
||||
.theme(Theme.defaultDark)
|
||||
// .shake(1300, 4)
|
||||
.shake(18300, 10)
|
||||
// .shake(18300, 10)
|
||||
// .hideCloseButton()
|
||||
.onClickAction { System.err.println("Notification $i clicked on!") }
|
||||
if (i == 0) {
|
||||
// if (i == 0) {
|
||||
notify.hideAfter(2100)
|
||||
}
|
||||
// }
|
||||
notify.show()
|
||||
try {
|
||||
Thread.sleep(1000)
|
||||
|
@ -229,7 +229,7 @@ object NotifyTest {
|
|||
// .setScreen(0)
|
||||
.theme(Theme.defaultDark)
|
||||
// .shake(1300, 4)
|
||||
// .shake(1300, 10)
|
||||
.shake(13200, 10)
|
||||
.attach(frame)
|
||||
// .hideCloseButton()
|
||||
.onClickAction { System.err.println("Notification $i clicked on!") }
|
||||
|
|
Loading…
Reference in New Issue
Block a user