diff options
author | Frank Gevaerts <frank@gevaerts.be> | 2012-06-13 23:07:49 +0200 |
---|---|---|
committer | Frank Gevaerts <frank@gevaerts.be> | 2012-06-19 22:02:59 +0200 |
commit | 715111122837440d3a1463d0d6932c469418dcbb (patch) | |
tree | deb2c8485c4f0aed36659b26f80313b8a8fbb507 /apps/gui/bitmap/list-skinned.c | |
parent | 1a665aab1e1e32e7355bc390fe4b09ff26d59082 (diff) | |
download | rockbox-715111122837440d3a1463d0d6932c469418dcbb.tar.gz rockbox-715111122837440d3a1463d0d6932c469418dcbb.zip |
Make touchscreen handling work with skinned lists.
Change-Id: I7df93319c8f16f05e840d74b022aab4803bb8f80
Diffstat (limited to 'apps/gui/bitmap/list-skinned.c')
-rw-r--r-- | apps/gui/bitmap/list-skinned.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/gui/bitmap/list-skinned.c b/apps/gui/bitmap/list-skinned.c index 81ef6fc18f..d0803b5dc8 100644 --- a/apps/gui/bitmap/list-skinned.c +++ b/apps/gui/bitmap/list-skinned.c | |||
@@ -167,6 +167,20 @@ void skinlist_get_scrollbar(int* nb_item, int* first_shown, int* last_shown) | |||
167 | } | 167 | } |
168 | } | 168 | } |
169 | 169 | ||
170 | bool skinlist_get_item(struct screen *display, struct gui_synclist *list, int x, int y, int *item) | ||
171 | { | ||
172 | const int screen = display->screen_type; | ||
173 | if (!skinlist_is_configured(screen, list)) | ||
174 | return false; | ||
175 | |||
176 | int row = y / listcfg[screen]->height; | ||
177 | int column = x / listcfg[screen]->width; | ||
178 | struct viewport *parent = (list->parent[screen]); | ||
179 | int cols = (parent->width / listcfg[screen]->width); | ||
180 | *item = row * cols+ column; | ||
181 | return true; | ||
182 | } | ||
183 | |||
170 | bool skinlist_draw(struct screen *display, struct gui_synclist *list) | 184 | bool skinlist_draw(struct screen *display, struct gui_synclist *list) |
171 | { | 185 | { |
172 | int cur_line, display_lines; | 186 | int cur_line, display_lines; |