Changeset cccc091 in mainline for uspace/srv/hid/console/console.c


Ignore:
Timestamp:
2011-09-09T23:46:34Z (13 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
05fb96b
Parents:
c7f9037
Message:

improve button rendering and click detection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/console/console.c

    rc7f9037 rcccc091  
    6060#define CONSOLE_MARGIN  12
    6161
    62 #define STATE_START   110
     62#define STATE_START   100
    6363#define STATE_TOP     8
    6464#define STATE_SPACE   4
     
    368368static console_t *cons_find_icon(sysarg_t x, sysarg_t y)
    369369{
    370         sysarg_t status_start = STATE_START + (xres - 800) / 2;
     370        sysarg_t status_start =
     371            STATE_START + (xres - 800) / 2 + CONSOLE_MARGIN;
    371372       
    372373        if ((y < STATE_TOP) || (y >= STATE_TOP + STATE_HEIGHT))
     
    379380                return NULL;
    380381       
    381         if (((x - status_start) % (STATE_WIDTH + STATE_SPACE)) < STATE_SPACE)
     382        if (((x - status_start) % (STATE_WIDTH + STATE_SPACE)) >= STATE_WIDTH)
    382383                return NULL;
    383384       
Note: See TracChangeset for help on using the changeset viewer.