Skip to content

Kinectic scrolling#131

Merged
itdelatrisu merged 3 commits intoitdelatrisu:masterfrom
fluddokt:KinecticScrolling
Sep 16, 2015
Merged

Kinectic scrolling#131
itdelatrisu merged 3 commits intoitdelatrisu:masterfrom
fluddokt:KinecticScrolling

Conversation

@fluddokt
Copy link
Copy Markdown

for SongNodes, Scores, Download Results, Download Info.

fd added 2 commits September 14, 2015 19:19
for SongNodes, Scores, Download Results, Download Info
Conflicts:
	src/itdelatrisu/opsu/ScoreData.java
	src/itdelatrisu/opsu/downloads/DownloadNode.java
	src/itdelatrisu/opsu/states/DownloadsMenu.java
	src/itdelatrisu/opsu/states/SongMenu.java
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Why is the 't' character different here? ('t')

@itdelatrisu
Copy link
Copy Markdown
Owner

This looks fantastic! Thanks for doing this!

Some comments:

  • The class should be spelled "Kinetic", not "Kinectic". :P
  • When I scroll using my touchscreen (Windows 10 PC), if a previous kinetic scroll is in progress, then tapping the screen will reset the scrolling. Here's a video: https://youtu.be/mbobm_gmGVw
  • I think there's a bit too much empty space at the top/bottom of the list.
    screenshot_20150914_215405
    screenshot_20150914_215407

I also added a couple of comments in the diff.

@fluddokt
Copy link
Copy Markdown
Author

To the 2 diff comments. Yeah.... accident. I'm just going revert those lines. Since I thought I didn't need it and deleted it, and then added that later on.
Wonder why I keep thinking there is an extra c in kinetic... well I will change it.
I'm not really sure why that happens with the touchscreen.
Could you maybe add some println to pressed, released and dragged and paste a log?
I'll make it so that at least 4 is shown from the top and bottom then.

@itdelatrisu
Copy link
Copy Markdown
Owner

Here's some output from the events.

These are the isolated tap and drag events (same for mouse and touchscreen), and they work as expected -- nothing happens on tap, normal scroll on drag.

[[ Tap/Click ]]
Pressed (x=565, y=363)
Clicked (x=565, y=363)
Released (x=565, y=363)

[[ Drag ]]
Pressed (x=620, y=306)
Dragged (oldx=565, oldy=363, newx=616, newy=324)
Dragged (oldx=616, oldy=324, newx=612, newy=341)
Dragged (oldx=612, oldy=341, newx=607, newy=363)
Dragged (oldx=607, oldy=363, newx=603, newy=380)
Dragged (oldx=603, oldy=380, newx=600, newy=401)
Dragged (oldx=600, oldy=401, newx=598, newy=416)
Dragged (oldx=598, oldy=416, newx=595, newy=435)
Dragged (oldx=595, oldy=435, newx=595, newy=446)
Dragged (oldx=595, oldy=446, newx=594, newy=468)
Dragged (oldx=594, oldy=468, newx=594, newy=482)
Dragged (oldx=594, oldy=482, newx=594, newy=497)
Dragged (oldx=594, oldy=497, newx=595, newy=511)
Dragged (oldx=595, oldy=511, newx=597, newy=526)
Dragged (oldx=597, oldy=526, newx=599, newy=536)
Dragged (oldx=599, oldy=536, newx=601, newy=541)
Released (x=601, y=541)

This is for two consecutive mouse drags, which works as expected:

[[ Mouse Drag x2 ]]
Pressed (x=596, y=302)
Dragged (oldx=596, oldy=302, newx=596, newy=303)
Dragged (oldx=596, oldy=303, newx=594, newy=316)
Dragged (oldx=594, oldy=316, newx=594, newy=338)
Dragged (oldx=594, oldy=338, newx=593, newy=364)
Dragged (oldx=593, oldy=364, newx=593, newy=393)
Dragged (oldx=593, oldy=393, newx=593, newy=419)
Dragged (oldx=593, oldy=419, newx=593, newy=449)
Dragged (oldx=593, oldy=449, newx=593, newy=487)
Dragged (oldx=593, oldy=487, newx=593, newy=509)
Dragged (oldx=593, oldy=509, newx=593, newy=530)
Dragged (oldx=593, oldy=530, newx=593, newy=547)
Dragged (oldx=593, oldy=547, newx=593, newy=559)
Dragged (oldx=593, oldy=559, newx=593, newy=568)
Dragged (oldx=593, oldy=568, newx=593, newy=571)
Dragged (oldx=593, oldy=571, newx=593, newy=573)
Released (x=593, y=573)
Pressed (x=611, y=299)
Dragged (oldx=611, oldy=299, newx=611, newy=301)
Dragged (oldx=611, oldy=301, newx=611, newy=313)
Dragged (oldx=611, oldy=313, newx=611, newy=327)
Dragged (oldx=611, oldy=327, newx=608, newy=349)
Dragged (oldx=608, oldy=349, newx=604, newy=381)
Dragged (oldx=604, oldy=381, newx=598, newy=413)
Dragged (oldx=598, oldy=413, newx=598, newy=439)
Dragged (oldx=598, oldy=439, newx=598, newy=467)
Dragged (oldx=598, oldy=467, newx=598, newy=497)
Dragged (oldx=598, oldy=497, newx=603, newy=526)
Dragged (oldx=603, oldy=526, newx=607, newy=555)
Dragged (oldx=607, oldy=555, newx=611, newy=585)
Dragged (oldx=611, oldy=585, newx=618, newy=627)
Dragged (oldx=618, oldy=627, newx=619, newy=641)
Dragged (oldx=619, oldy=641, newx=619, newy=645)
Dragged (oldx=619, oldy=645, newx=619, newy=646)
Released (x=619, y=646)

And this last section, for consecutive touch drags, produces the bug -- first drag is normal, second drag resets the first.

[[ Touch Drag x2 ]]
Pressed (x=673, y=401)
Dragged (oldx=320, oldy=863, newx=673, newy=422)
Dragged (oldx=673, oldy=422, newx=671, newy=435)
Dragged (oldx=671, oldy=435, newx=669, newy=444)
Dragged (oldx=669, oldy=444, newx=668, newy=456)
Dragged (oldx=668, oldy=456, newx=666, newy=468)
Dragged (oldx=666, oldy=468, newx=665, newy=478)
Dragged (oldx=665, oldy=478, newx=664, newy=494)
Dragged (oldx=664, oldy=494, newx=663, newy=508)
Dragged (oldx=663, oldy=508, newx=662, newy=529)
Dragged (oldx=662, oldy=529, newx=662, newy=544)
Dragged (oldx=662, oldy=544, newx=662, newy=563)
Dragged (oldx=662, oldy=563, newx=662, newy=576)
Dragged (oldx=662, oldy=576, newx=663, newy=599)
Dragged (oldx=663, oldy=599, newx=663, newy=604)
Dragged (oldx=663, oldy=604, newx=666, newy=618)
Dragged (oldx=666, oldy=618, newx=666, newy=621)
Released (x=666, y=621)
Pressed (x=661, y=388)
Dragged (oldx=666, oldy=621, newx=659, newy=408)
Dragged (oldx=659, oldy=408, newx=658, newy=416)
Dragged (oldx=658, oldy=416, newx=658, newy=428)
Dragged (oldx=658, oldy=428, newx=658, newy=440)
Dragged (oldx=658, oldy=440, newx=658, newy=448)
Dragged (oldx=658, oldy=448, newx=659, newy=460)
Dragged (oldx=659, oldy=460, newx=659, newy=468)
Dragged (oldx=659, oldy=468, newx=659, newy=475)
Dragged (oldx=659, oldy=475, newx=659, newy=481)
Dragged (oldx=659, oldy=481, newx=659, newy=488)
Dragged (oldx=659, oldy=488, newx=660, newy=497)
Dragged (oldx=660, oldy=497, newx=661, newy=503)
Dragged (oldx=661, oldy=503, newx=662, newy=509)
Dragged (oldx=662, oldy=509, newx=663, newy=513)
Dragged (oldx=663, oldy=513, newx=664, newy=518)
Dragged (oldx=664, oldy=518, newx=665, newy=524)
Dragged (oldx=665, oldy=524, newx=666, newy=532)
Dragged (oldx=666, oldy=532, newx=667, newy=536)
Dragged (oldx=667, oldy=536, newx=668, newy=539)
Dragged (oldx=668, oldy=539, newx=668, newy=542)
Dragged (oldx=668, oldy=542, newx=668, newy=546)
Dragged (oldx=668, oldy=546, newx=668, newy=549)
Dragged (oldx=668, oldy=549, newx=668, newy=554)
Dragged (oldx=668, oldy=554, newx=669, newy=560)
Dragged (oldx=669, oldy=560, newx=669, newy=565)
Dragged (oldx=669, oldy=565, newx=669, newy=570)
Dragged (oldx=669, oldy=570, newx=669, newy=574)
Dragged (oldx=669, oldy=574, newx=669, newy=578)
Dragged (oldx=669, oldy=578, newx=670, newy=584)
Dragged (oldx=670, oldy=584, newx=671, newy=591)
Dragged (oldx=671, oldy=591, newx=671, newy=598)
Dragged (oldx=671, oldy=598, newx=671, newy=602)
Dragged (oldx=671, oldy=602, newx=671, newy=606)
Dragged (oldx=671, oldy=606, newx=671, newy=609)
Released (x=671, y=609)

I think the difference is in the Released -> Pressed -> (first) Dragged events in between the two drags. For mouse input, Pressed (x,y) == Dragged (oldx, oldy), but for touchscreen, Released (x,y) == Dragged (oldx, oldy). That would explain the completely wrong newy - oldy diff value in the first call to mouseDragged().

@fluddokt
Copy link
Copy Markdown
Author

Thanks, try this. I modified slicks input to set oldx, oldy when it gets mousePressed events.
I'm not sure how its actually being set for the mouse...

@itdelatrisu
Copy link
Copy Markdown
Owner

Awesome, it works fine now. I'll test a few more things and merge this. Thanks again!

itdelatrisu added a commit that referenced this pull request Sep 16, 2015
@itdelatrisu itdelatrisu merged commit e1becb3 into itdelatrisu:master Sep 16, 2015
itdelatrisu added a commit that referenced this pull request Sep 16, 2015
Also made some members private.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
itdelatrisu added a commit that referenced this pull request Sep 17, 2015
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants