diff options
| author | Franklin Wei <franklin@rockbox.org> | 2020-07-06 22:36:25 -0400 |
|---|---|---|
| committer | Franklin Wei <franklin@rockbox.org> | 2020-12-07 19:27:19 -0500 |
| commit | 0d188b7c6771c300fe0d63562c2bde7243a2de64 (patch) | |
| tree | 08a15c53a884c4df3d263a6b67828ce77b6151b1 | |
| parent | 6f99f40e0a11acbf60c95ca2fdcc53aa492e4354 (diff) | |
| download | puzzles-rockbox.zip puzzles-rockbox.tar.gz puzzles-rockbox.tar.bz2 puzzles-rockbox.tar.xz | |
Untangle: Implement game_get_cursor_location.rockbox
Diffstat (limited to '')
| -rw-r--r-- | untangle.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -1587,6 +1587,17 @@ static void game_get_cursor_location(const game_ui *ui, const game_params *params, int *x, int *y, int *w, int *h) { + if(ui->dragpoint >= 0 || ui->cursorpoint >= 0) { + int idx = (ui->dragpoint >= 0) ? ui->dragpoint : ui->cursorpoint; + + int cx, cy; + cx = ds->x[idx]; + cy = ds->y[idx]; + + *x = cx - CIRCLE_RADIUS; + *y = cy - CIRCLE_RADIUS; + *w = *h = 2 * CIRCLE_RADIUS + 1; + } } static int game_status(const game_state *state) |