Coding_guy_

Untitled

Jun 2nd, 2021 (edited)
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. #include <tice.h>
  2. #include <stdlib.h>
  3. #include <keypadc.h>
  4. #include <stdint.h>
  5. #include <graphx.h>
  6. #include <string.h>
  7. /* Main function, called first */
  8. int main(void){
  9. const char *chars = "\0\0\0\0\0\0\0\0\0\0\"wrmh\0\0?[vqlg\0\0:zupkfc\0 ytojeb\0\0xsnida\0\0\0\0\0\0\0\0";
  10. uint8_t key, i = 0;
  11. char buffer[50];
  12. buffer[i] = 0;
  13.  
  14.  
  15. uint24_t people;
  16. people = 3;
  17.  
  18. gfx_Begin();
  19.  
  20. gfx_Rectangle(10,10,300,211);
  21. gfx_SetColor(255);
  22. gfx_SetColor(0);
  23. gfx_PrintStringXY(">", 15,212);
  24.  
  25. key = os_GetCSC();
  26. while (!(key == sk_Clear)){
  27. key = os_GetCSC();
  28. if(chars[key]) {
  29. buffer[i++] = chars[key];
  30. buffer[i] = 0;
  31. gfx_PrintStringXY(buffer, 23,211);
  32. }
  33.  
  34. if (key == sk_Enter){
  35. if (strcmp(buffer, "stat") == 0){
  36. gfx_ShiftUp(8);
  37. gfx_SetColor(255);
  38. gfx_FillRectangle(11,210,300,11);
  39. gfx_PrintStringXY(">", 15,212);
  40. memset(buffer, 0, sizeof(buffer));
  41.  
  42. i = 0;
  43. }
  44. }
  45. }
  46.  
  47. return 0;
  48. gfx_End();
  49. }
  50.  
Add Comment
Please, Sign In to add comment