mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 21:06:09 +00:00
feat(agent): DeeDee, a floating pet that opens the agent's chat; chat-head flings for the pet and HUD (#2536)
* feat(agent): DeeDee, a pet that floats over any app and opens the agent's chat * feat(agent): DeeDee docks and opens its chat like a chat head; throws pick their side by velocity, for the pet and the HUD * fix(hud): the strip tucks into its fps tab with a shorter pull, and a throw toward an edge counts * fix(hud): the HUD shows in desktop sessions again * feat(agent): DeeDee rests tucked past the screen edge like a chat head * fix(agent): DeeDee opens its own chat in every window, themed, and a fling across no longer tucks the HUD away * fix(agent): the chat grows from wherever DeeDee is as it hops to its corner * fix(agent): DeeDee hides with the PC keyboard, falls back if it cannot float, can be opened by accessibility, and settles when a drag is cancelled * fix(agent): B and Back close DeeDee's in-window chat before the window acts on them * fix(agent): Back closes only the chat open in that window
This commit is contained in:
1 parent
b52ce7e4c5
commit
39a4a1b60c
14 files changed
+1455
-36
No files matched your search
@@ -0,0 +1,27 @@
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertFalse
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Test
|
||||
|
||||
class EdgeFlingTest {
|
||||
private val density = 2f
|
||||
|
||||
@Test fun aQuickFlickGoesTheWayItWasThrownFromAnywhere() {
|
||||
assertFalse(EdgeFling.toRight(centerX = 1800f, span = 1920f, vx = -1500f, density = density))
|
||||
assertTrue(EdgeFling.toRight(centerX = 100f, span = 1920f, vx = 1500f, density = density))
|
||||
}
|
||||
|
||||
@Test fun aSlowReleaseGoesWhereItWouldCoast() {
|
||||
assertTrue(EdgeFling.toRight(centerX = 1000f, span = 1920f, vx = 0f, density = density))
|
||||
assertFalse(EdgeFling.toRight(centerX = 900f, span = 1920f, vx = 0f, density = density))
|
||||
assertFalse(EdgeFling.toRight(centerX = 1100f, span = 1920f, vx = -1100f, density = density))
|
||||
}
|
||||
|
||||
@Test fun theHeightCarriesOnWithTheThrowAndStaysOnScreen() {
|
||||
assertEquals(436f, EdgeFling.restY(400f, 200f, 0f, 1000f), 0.01f)
|
||||
assertEquals(1000f, EdgeFling.restY(900f, 5000f, 0f, 1000f), 0.01f)
|
||||
assertEquals(24f, EdgeFling.restY(100f, -5000f, 24f, 1000f), 0.01f)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user