示例#1
0
文件: menu.c 项目: mronfim/PeerPong
void draw_option(Window* window, MenuItem item)
{
	if (item.selected)
		writeToScreen(window, item.text, item.x, item.y, item.fontSize, &(item.font), item.highlight);
	else
		writeToScreen(window, item.text, item.x, item.y, item.fontSize, &(item.font), item.color);
}
void LcdController::updatePlayingTime(QString time)
{
    if(LCDState == Playing)
    {
        writeToScreen(time, LCDPosition.BOTTOM, 0);
    }
}
void LcdController::setupPlayingTime(QString totalTime)
{
    if(LCDState == Playing)
    {
        writeToScreen(totalTime, LCDPosition.BOTTOM, 6);
    }

}
示例#4
0
文件: menu.c 项目: mronfim/PeerPong
void menu_draw(Window* window, Menu* menu)
{
	// draw title to screen
	writeToScreen(window, menu->title.text, menu->title.x, menu->title.y, menu->title.fontSize, &(menu->title.font), menu->title.color);

	// draw each option
	int i;
	for (i = 0; i < menu->num_options; i++)
		draw_option(window, menu->options[i]);
}
示例#5
0
void video_write(char c,int fd){
    switch(c){
        case '\n':
            video_enter(fd);
            break;
        case '\t':
            video_tab(fd);
            break;
        case '\b':
            video_backspace();
            break;
        default:
            writeToScreen(c,fd);
            break;
    }
}
void drawScreens(s_screen *Image, int x, int y)
{
	if(Image) copyscreen_o(Scaler, Image, x, y);
	writeToScreen(Scaler);
	video_copy_screen(Screen);
}
void LcdController::writePlaying()
{
    clearScreen();
    writeToScreen("Exhibit Name", LCDPosition.TOP, 0);
    writeToScreen("00:00/00:00", LCDPosition.BOTTOM, 0);
}
void LcdController::writeLoading()
{
    clearScreen();
    writeToScreen("Loading...", LCDPosition.TOP, 0);
}
void LcdController::writeEnterPin()
{
    clearScreen();
    writeToScreen("Enter pin...", LCDPosition.TOP, 0);
}