View Single Post
Capt'n Corrupt's Avatar
Posts: 3,524 | Thanked: 2,958 times | Joined on Oct 2007 @ Delta Quadrant
#28
Here it is!

The picture had to be scaled to 800x480 in order for it to be consistent with the previous coordinates. After upscaling, I carefully considered the positions of the rectangles and created a new set of rectangles as per our discussion. They should increase usability for finger users!

Thank you for giving me the opportunity to contribute.

Let me know if there are any problems with the file!


Code:
/** TouchMap[] ***********************************************/
/** This map translates on-screen rectangles into keys.     **/
/*************************************************************/
struct
{
  byte KeyCode;
  int X,Y,W,H;
} TouchMap[] =
{

  { KBD_RIGHT,  380,35, 41,53 },
  { KBD_LEFT,   380,146,41,53 },
  { KBD_UP,     340,88, 40,58 },
  { KBD_DOWN,   416,88, 40,58 },

  { KBD_F5,     270,0,  64,117 },
  { KBD_F4,     270,117,64,82  },
  { KBD_F3,     270,199,64,82  },
  { KBD_F2,     270,281,64,82  },
  { KBD_F1,     270,363,64,117 },

  { KBD_CLEAR,  461,0,44,117 },
  { KBD_POWER,  505,0,43,117 },
  { KBD_DIV,    548,0,45,117 },
  { KBD_MUL,    593,0,44,117 },
  { KBD_MINUS,  637,0,43,117 },
  { KBD_PLUS,   680,0,45,117 },
  { KBD_ENTER,  725,0,60,117 },

  { KBD_CUSTOM, 461,117,44,82 },
  { KBD_TAN,    505,117,43,82 },
  { KBD_RPARENT,548,117,45,82 },
  { KBD_9,      593,117,44,82 },
  { KBD_6,      637,117,43,82 },
  { KBD_3,      680,117,45,82 },
  { KBD_SIGN,   725,117,60,82 },

  { KBD_MORE,   371,199,45,82 },
  { KBD_DEL,    416,199,45,82 },
  { KBD_PRGM,   461,199,44,82 },
  { KBD_COS,    505,199,43,82 },
  { KBD_LPARENT,548,199,45,82 },
  { KBD_8,      593,199,44,82 },
  { KBD_5,      637,199,43,82 },
  { KBD_2,      680,199,45,82 },
  { KBD_DOT,    725,199,60,82 },

  { KBD_EXIT,   371,281,45,82 },
  { KBD_XVAR,   416,281,45,82 },
  { KBD_STAT,   461,281,44,82 },
  { KBD_SIN,    505,281,43,82 },
  { KBD_EE,     548,281,45,82 },
  { KBD_7,      593,281,44,82 },
  { KBD_4,      637,281,43,82 },
  { KBD_1,      680,281,45,82 },
  { KBD_0,      725,281,60,82 },

  { KBD_2ND,    371,363,45,117 },
  { KBD_ALPHA,  416,363,45,117 },
  { KBD_GRAPH,  461,363,44,117 },
  { KBD_LOG,    505,363,43,117 },
  { KBD_LN,     548,363,45,117 },
  { KBD_SQR,    593,363,44,117 },
  { KBD_COMMA,  637,363,43,117 },
  { KBD_STO,    680,363,45,117 },
  { KBD_ON,     725,363,60,117 },

  { 0,0,0,0,0 }
};


YARR!
}:^)~
Captn { CORRUPT }
 

The Following User Says Thank You to Capt'n Corrupt For This Useful Post: