Warning: mysqli_real_connect(): Headers and client library minor version mismatch. Headers:50625 Library:50543 in /sites/rockbox.org/flyspray/adodb/drivers/adodb-mysqli.inc.php on line 108 FS#8953 : Make every button reachable with just one button in the calculator



FS#8953 - Make every button reachable with just one button in the calculator

Attached to Project: Rockbox
Opened by Alexander Levin (fml2) - Friday, 02 May 2008, 18:25 GMT
Last edited by Nils Wallménius (nls) - Wednesday, 07 May 2008, 21:19 GMT
Task Type Patches
Category Plugins
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


The patch adds the possibilty to move the cursor with shift in the other dimension. For example, if you move the cursor up and it wraps (jumps to the last row), the column is also changed (one to the left). Thus you can reach every calculator button by just keeping pressing up or down or left or right.

As of now, the button combination is only defined for Sansa e200/c200 (scroll wheel back and fwd) and only for moving up/down since that's what the wheel does in menus and lists.

Also introduced constants for the number od button rows and columns. And renamed 'global' variables for the cursor positions. m and n are too short to be a global name IMHO.
This task depends upon

Closed by  Nils Wallménius (nls)
Wednesday, 07 May 2008, 21:19 GMT
Reason for closing:  Accepted
Additional comments about closing:  Committed. I added in ipod support too.
thanks :)
Comment by Marianne Arnold (pixelma) - Friday, 02 May 2008, 20:44 GMT
The c200 has no scroll wheel - hence you would break the build for it if you don't devide the "Sansa button definitions" into two now and only enable this for scroll wheel targets. Then Ipods could have it too and maybe the c200 could use "volume up/down" instead (probably gigabeat too then?). I'm not sure I understand your description completely but I guess it's navigating the calculator "button grid" the same as it is done in minesweeper for scroll wheel targets? If so - I like the additional functionality for the targets that can have it.
Comment by Alexander Levin (fml2) - Friday, 02 May 2008, 21:14 GMT
Oi! Sorry, didn't know about the differences between e200 and c200. The idea is that after wrapping, the cursor ('current button') goes to another row/column.

For example: you are in (row,col)=(4,2) -> down2 -> (5,2) -> down2 -> (1,3) -> down2 (2,3) -> ... -> (5,5) -> down2 -> (1,1)

Note how the column changes when wrapping from (5,2) to (1,3).

'Down2' is a new button (action) which is added by this patch. I.e. the old 'down' action is retained (which does not change column when row wraps).

Same applies to up/left/right.

The first impulse for this patch came when I noticed that the arrow keys 'up' and 'down' don't work in e200 sim. They are mapped to wheel back/fwd. So I wanted to map them. The first idea was to make it move the cursor just up/down. But then left/right movements were not possible with the wheel. This 'double' wrapping should help in that respect.

I've written all this to help aothers to understand how and why this patch appeared.
Comment by Alexander Levin (fml2) - Friday, 02 May 2008, 21:33 GMT
Updated the patch so that the new buttons are only defined for Sansa e200.