Пример #1
0
void CWebTV::hide()
{
	frameBuffer->paintBackgroundBoxRel(x, y, width + 5, height + info_height + 5);
			
        clearItem2DetailsLine();
	frameBuffer->blit();
}
Пример #2
0
void CBEChannelWidget::hide()
{
	frameBuffer->paintBackgroundBoxRel(x, y, width, height + ButtonHeight + 2 + info_height);
	
	clearItem2DetailsLine();
	
	frameBuffer->blit();
}
void CBEChannelSelectWidget::hide()
{
	frameBuffer->paintBackgroundBoxRel(cFrameBox.iX, cFrameBox.iY, cFrameBox.iWidth, cFrameBox.iHeight);
	
	clearItem2DetailsLine();
	
	frameBuffer->blit();
}
Пример #4
0
void CListBox::hide()
{
	int ypos = y - TitleHeight;
	frameBuffer->paintBackgroundBoxRel(x, ypos, width, height + ButtonHeight + InfoHeight + TitleHeight);
	
	clearItem2DetailsLine();
	
	frameBuffer->blit();
}
Пример #5
0
void CUpnpBrowserGui::paintItemPos(std::vector<UPnPEntry> *entry, unsigned int pos, unsigned int selected)
{
	int ypos = m_y + m_title_height + m_theight + pos*m_fheight;
	uint8_t    color;
	fb_pixel_t bgcolor;

	if (pos == selected)
	{
		color = COL_MENUCONTENTSELECTED;
		bgcolor = COL_MENUCONTENTSELECTED_PLUS_0;

		if ((*entry)[pos].isdir)
			clearItem2DetailsLine(); // clear it
		else
			paintItem2DetailsLine(pos);

		paintDetails(entry, pos);
	}
	else
	{
		color   = COL_MENUCONTENT;
		bgcolor = COL_MENUCONTENT_PLUS_0;
	}
	
	// item box
	m_frameBuffer->paintBoxRel(m_x, ypos, m_width - SCROLLBAR_WIDTH, m_fheight, bgcolor);

	if (pos >= entry->size())
		return;

	int preferred = (*entry)[pos].preferred;
	std::string info;
	std::string fileicon;
	
	if ((*entry)[pos].isdir)
	{
		info = "<DIR>";
		fileicon = NEUTRINO_ICON_FOLDER;
	}
	else
	{
		//FIXME: revise this
		if (preferred != -1)
		{
			info = (*entry)[pos].resources[preferred].duration;
			
			// icon
			std::string protocol, prot, network, mime, additional;
			protocol = (*entry)[pos].resources[preferred].protocol;
			splitProtocol(protocol, prot, network, mime, additional);
					
			if (mime.substr(0, 6)  == "audio/")
			{
				fileicon = NEUTRINO_ICON_MP3;
			}
			else if (mime.substr(0, 6) == "image/")
			{
				fileicon = NEUTRINO_ICON_PICTURE;
			}
			else if (mime.substr(0, 6) == "video/")
			{
				fileicon = NEUTRINO_ICON_MOVIE;
			}
		}
		else
		{
			info = "(none)";
			fileicon = NEUTRINO_ICON_FILE;
		}
	}

	std::string name = (*entry)[pos].title;
	char tmp_time[] = "00:00:00.0";
	int w = g_Font[SNeutrinoSettings::FONT_TYPE_FILEBROWSER_ITEM]->getRenderWidth(tmp_time);

	m_frameBuffer->paintIcon(fileicon, m_x + 5 , ypos + (m_fheight - 16) / 2);
	g_Font[SNeutrinoSettings::FONT_TYPE_FILEBROWSER_ITEM]->RenderString(m_x + m_width - 15 - w, ypos + m_fheight, w, info, color, m_fheight);

	g_Font[SNeutrinoSettings::FONT_TYPE_FILEBROWSER_ITEM]->RenderString(m_x + 30, ypos + m_fheight, m_width - 50 - w, name, color, m_fheight, true); // UTF-8
}