main.c 817 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #include "u8g2.h"
  2. #include <stdio.h>
  3. u8g2_t u8g2;
  4. int main(void)
  5. {
  6. u8g2_SetupBuffer_SDL_128x64_4(&u8g2, &u8g2_cb_r0);
  7. u8x8_InitDisplay(u8g2_GetU8x8(&u8g2));
  8. u8x8_SetPowerSave(u8g2_GetU8x8(&u8g2), 0);
  9. //u8g2_SetFont(&u8g2, u8g2_font_helvB08_tr);
  10. u8g2_SetFont(&u8g2, u8g2_font_6x10_tr);
  11. u8g2_SetFontDirection(&u8g2, 0);
  12. u8g2_SetFontRefHeightAll(&u8g2);
  13. u8g2_UserInterfaceMessage(&u8g2, "title1", "title2", "title3", " Yes \n No ");
  14. /*
  15. do
  16. {
  17. k = u8g_sdl_get_key();
  18. } while( k < 0 );
  19. if ( k == 273 ) y -= 7;
  20. if ( k == 274 ) y += 7;
  21. if ( k == 276 ) x -= 7;
  22. if ( k == 275 ) x += 7;
  23. if ( k == 'e' ) y -= 1;
  24. if ( k == 'x' ) y += 1;
  25. if ( k == 's' ) x -= 1;
  26. if ( k == 'd' ) x += 1;
  27. if ( k == 'q' ) break;
  28. */
  29. return 0;
  30. }