Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#11008 - Clickable background and mouse wheel events for UI Simulator

Attached to Project: Rockbox
Opened by Fred Bauer (freddyb) - Friday, 12 February 2010, 21:38 GMT+2
Last edited by Frank Gevaerts (fg) - Tuesday, 16 February 2010, 18:35 GMT+2
Task Type Patches
Category Simulator
Status Closed
Assigned To No-one
Player Type All players
Severity Low
Priority Normal
Reported Version Release 3.4
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

This patch turns the simulator background into a clickable area. i.e. you click on the play button to press play. It also maps mouse scrollwheel events to rockbox scrollwheel events. This facilitates testing because you don't have to move your hand between the mouse and keyboard. There are currently maps for Fuze, iPod, and e200. I would add the others if there is interest.
   uisim-clickable.diff (5.1 KiB)
 uisimulator/sdl/button.c     |   54 +++++++++++++++++++++++++++++++++++++++++++
 uisimulator/sdl/button-sdl.h |    6 ++++
 uisimulator/sdl/uisdl.c      |   43 +++++++++++++++++++++++++++++++++-
 3 files changed, 102 insertions(+), 1 deletion(-)

This task depends upon

Closed by  Frank Gevaerts (fg)
Tuesday, 16 February 2010, 18:35 GMT+2
Reason for closing:  Accepted
Additional comments about closing:  Committed as r24696
Comment by Frank Gevaerts (fg) - Friday, 12 February 2010, 21:52 GMT+2
Two comments after quickly looking at the patch
- Touchscreen targets can have real buttons too
- I'd go for a rectangle for each button instead of this circular area with fixed radius, or at least for a configurable radius per button
Comment by Fred Bauer (freddyb) - Friday, 12 February 2010, 22:47 GMT+2
Small change to make coordinates relative to top left corner of lcd display for mouse clicks when using --debug-wps.
   uisim-clickable-v2.diff (5.9 KiB)
 uisimulator/sdl/button.c     |   54 +++++++++++++++++++++++++++++++++++++++++++
 uisimulator/sdl/button-sdl.h |    6 ++++
 uisimulator/sdl/uisdl.c      |   54 +++++++++++++++++++++++++++++++++++++++++--
 3 files changed, 112 insertions(+), 2 deletions(-)

Comment by Frank Gevaerts (fg) - Saturday, 13 February 2010, 14:43 GMT+2
v2 doesn't actually compile for non-remote targets now
Comment by Fred Bauer (freddyb) - Saturday, 13 February 2010, 16:00 GMT+2
Added touchscreen support and a button map for Cowon D2.
Current targets: Sansa Fuze and E200, iPod Video, Cowon D2, iAudio X5
Disabled mouse wheel for non-scroll wheel targets.
Added conditionals for remotes.

Reduced button radius a bit.
Frank, I'm leaning towards using radius per button approach because rectangles won't fit as well for the main left right up down buttons on many players.
   uisim-clickable-v3.diff (8 KiB)
 uisimulator/sdl/button.c     |   78 ++++++++++++++++++++++++++++++++++++++++
 uisimulator/sdl/button-sdl.h |    6 +++
 uisimulator/sdl/uisdl.c      |   82 +++++++++++++++++++++++++++++++++++--------
 3 files changed, 151 insertions(+), 15 deletions(-)

Comment by Fred Bauer (freddyb) - Saturday, 13 February 2010, 19:45 GMT+2
Changed button struct to include radius values per button.

Added --mapping flag which outputs a template for a struct line when clicking on the background to facilitate creating new button maps.
-Drag the mouse before releasing to get a radius value.

   uisim-clickable-v4.diff (9.6 KiB)
 uisimulator/sdl/button.c     |   80 +++++++++++++++++++++++++++++++++
 uisimulator/sdl/button-sdl.h |    6 ++
 uisimulator/sdl/uisdl.c      |  102 ++++++++++++++++++++++++++++++++++++-------
 3 files changed, 173 insertions(+), 15 deletions(-)

Comment by Fred Bauer (freddyb) - Sunday, 14 February 2010, 00:11 GMT+2
More targets.
   uisim-clickable-v6.diff (14.7 KiB)
 uisimulator/sdl/button.c     |  213 +++++++++++++++++++++++++++++++++++++++++++
 uisimulator/sdl/button-sdl.h |    6 +
 uisimulator/sdl/uisdl.c      |  102 +++++++++++++++++---
 3 files changed, 306 insertions(+), 15 deletions(-)

Comment by Fred Bauer (freddyb) - Sunday, 14 February 2010, 06:53 GMT+2
More targets. I believe this covers all the stable ports and the unstable ports except for Samsung models.

Archos FM Recorder, Archos OndioFM, Archos OndioSP, Archos Player, Archos Recorder, Archos RecorderV2
Cowon D2
Gigabeat F/X, Gigabeat S
iAudio 7, iAudio M3, iAudio M5, iAudio X5
Ipod 1g2g, Ipod 3g, Ipod 4g, Ipod Color, Ipod Mini, Ipod Mini2g, Ipod Nano, Ipod Nano2g, Ipod Video
Iriver H100, Iriver H120, Iriver H300
Mrobe 100, Mrobe 500
Sansa C200, Sansa C200v2, Sansa Clip, Sansa E200, Sansa E200v2
   uisim-clickable-v7.diff (19.8 KiB)
 uisimulator/sdl/button.c     |  345 +++++++++++++++++++++++++++++++++++++++++++
 uisimulator/sdl/button-sdl.h |    6 
 uisimulator/sdl/uisdl.c      |  102 ++++++++++--
 3 files changed, 438 insertions(+), 15 deletions(-)

Comment by Fred Bauer (freddyb) - Sunday, 14 February 2010, 16:36 GMT+2
More Targets: This now includes everything stable and unstable.
   uisim-clickable-v9.diff (20.7 KiB)
 uisimulator/sdl/button.c     |  370 +++++++++++++++++++++++++++++++++++++++++++
 uisimulator/sdl/button-sdl.h |    6 
 uisimulator/sdl/uisdl.c      |  102 ++++++++++-
 3 files changed, 463 insertions(+), 15 deletions(-)

Comment by Fred Bauer (freddyb) - Monday, 15 February 2010, 00:41 GMT+2
More targets. Now includes everything that compiles.
Added a few lines to docs/UISIMULATOR.
Added --debugbuttons flag that prints the description of the button pressed
Added a #WARNING if no button map is defined.
   uisim-clickable-v10.diff (24.6 KiB)
 uisimulator/sdl/button.c     |  448 +++++++++++++++++++++++++++++++++++++++++++
 uisimulator/sdl/button-sdl.h |    6 
 uisimulator/sdl/uisdl.c      |  108 ++++++++--
 docs/UISIMULATOR             |    7 
 4 files changed, 554 insertions(+), 15 deletions(-)

Comment by Fred Bauer (freddyb) - Monday, 15 February 2010, 02:35 GMT+2
Took the #WARNING back out.
   uisim-clickable-v11.diff (24.6 KiB)
 uisimulator/sdl/button.c     |  449 +++++++++++++++++++++++++++++++++++++++++++
 uisimulator/sdl/button-sdl.h |    6 
 uisimulator/sdl/uisdl.c      |  108 ++++++++--
 docs/UISIMULATOR             |    7 
 4 files changed, 555 insertions(+), 15 deletions(-)

Loading...