Coding_guy_

Untitled

Jun 2nd, 2021
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 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. /* Main function, called first */
  7. int main(void)
  8. {
  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.  
  13. while((key = os_GetCSC()) != sk_Enter) {
  14. if(chars[key]) {
  15. buffer[i++] = chars[key];
  16. }
  17. }
  18. buffer[i] = 0;
  19.  
  20.  
  21. uint24_t x;
  22. x = 3;
  23.  
  24. gfx_Begin();
  25.  
  26.  
  27. gfx_FillRectangle(0,0,360,240);
  28. gfx_SetColor(255);
  29. gfx_FillRectangle(10,210,300,11);
  30. gfx_SetColor(0);
  31. gfx_PrintStringXY(buffer, 23,211);
  32. gfx_PrintStringXY(">", 15,212);
  33.  
  34.  
  35.  
  36. while (!kb_IsDown(kb_KeyClear)){
  37.  
  38. kb_Scan();
  39. if kb_IsDown(kb_Key2nd){
  40. if (buffer == "cat"){
  41. gfx_SetColor(255);
  42. }
  43. }
  44. gfx_FillRectangle(x, 1, 50, 50);
  45. }
  46. gfx_End();
  47. return 0;
  48. }
  49.  
Advertisement
Add Comment
Please, Sign In to add comment