void testfilltriangles() { fillScreen(BLACK); uint16_t i; for (i=width()/2; i>10; i-=5) { fillTriangle(width()/2, height()/2-i, width()/2-i, height()/2+i, width()/2+i, height()/2+i, Color565(0, i, i)); drawTriangle(width()/2, height()/2-i, width()/2-i, height()/2+i, width()/2+i, height()/2+i, Color565(i, i, 0)); } }
void testRoundRect() { fillScreen(BLACK); uint16_t x; for (x=0; x < width(); x+=6) { drawRoundRect(width()/2 -x/2, height()/2 -x/2 , x, x, x/8, Color565(x, 0, 0)); } }
/* * graphicstest from adafruit */ void testFillRoundRect() { fillScreen(BLACK); uint16_t x; for (x=width(); x > 20 ; x-=6) { fillRoundRect(width()/2 -x/2, height()/2 -x/2 , x, x, x/8, Color565(0, x, 0)); } }
void testtriangles() { fillScreen(BLACK); uint16_t i; for (i=0; i<width()/2; i+=5) { drawTriangle(width()/2, height()/2-i, width()/2-i, height()/2+i, width()/2+i, height()/2+i, Color565(0, 0, i)); } }
void UpdateFileListBox(uint16_t current, uint16_t last) { uint16_t i = 0; uint16_t line = 0; uint8_t tempBuffer[13]; CenterTextTFT("Select a file", 10, Color565(255, 0, 0), Color565(0, 0, 0), 1); for (i = last - MAX_DISPLAY_ITEMS; i < last; i++) { getModFileNameNew(tempBuffer, i); if (i == current) { CenterTextTFT((char*) tempBuffer, (line * 10) + 30, Color565(255, 0, 0), Color565(0, 0, 255), 1); } else { CenterTextTFT((char*) tempBuffer, (line * 10) + 30, Color565(255, 255, 255), Color565(0, 0, 0), 1); } line++; } }
void ShowSplashScreen(void) { CenterTextTFT("S3M/MOD32 Mod",20,Color565(255,0,0),Color565(0,0,255),0); CenterTextTFT("Player v1.0.1",30,Color565(255,0,0),Color565(0,0,255),0); CenterTextTFT("(c) 2015 by",50,Color565(255,255,255),Color565(0,0,0),0); CenterTextTFT("Michael Williamson",60,Color565(255,255,255),Color565(0,0,0),0); CenterTextTFT("Based on designs by",70,Color565(255,255,255),Color565(0,0,0),0); CenterTextTFT("Ronen K and",80,Color565(255,255,255),Color565(0,0,0),0); CenterTextTFT("Serveur Perso",90,Color565(255,255,255),Color565(0,0,0),0); CenterTextTFT("Loading files...",120,Color565(255,255,255),Color565(0,0,0),0); }