mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 08:51:10 +02:00
CTestMenu: add sample code for footer buttons, disable debug spam
This commit is contained in:
@@ -32,7 +32,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <driver/pictureviewer/pictureviewer.h>
|
#include <driver/pictureviewer/pictureviewer.h>
|
||||||
|
|
||||||
#define DEBUG_CC
|
//#define DEBUG_CC
|
||||||
|
|
||||||
/// Basic component class.
|
/// Basic component class.
|
||||||
/*!
|
/*!
|
||||||
|
@@ -480,10 +480,11 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey)
|
|||||||
int hh = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
|
int hh = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
|
||||||
if (footer == NULL){
|
if (footer == NULL){
|
||||||
footer = new CComponentsFooter (100, 50, 500, hh, CComponentsHeader::CC_BTN_HELP | CComponentsHeader::CC_BTN_EXIT | CComponentsHeader::CC_BTN_MENU, true);
|
footer = new CComponentsFooter (100, 50, 500, hh, CComponentsHeader::CC_BTN_HELP | CComponentsHeader::CC_BTN_EXIT | CComponentsHeader::CC_BTN_MENU, true);
|
||||||
CComponentsButtonRed * btnred = new CComponentsButtonRed(10, 0, 200, hh, "Red");
|
int start = 5, btnw =90;
|
||||||
btnred->doPaintBg(false);
|
footer->addCCItem(new CComponentsButtonRed(start, 0, btnw, hh, "Button1"));
|
||||||
|
footer->addCCItem(new CComponentsButtonGreen(start+=btnw, 0, btnw, hh, "Button2"));
|
||||||
footer->addCCItem(btnred);
|
footer->addCCItem(new CComponentsButtonYellow(start+=btnw, 0, btnw, hh, "Button3"));
|
||||||
|
footer->addCCItem(new CComponentsButtonBlue(start+=btnw, 0, btnw, hh, "Button4"));
|
||||||
}
|
}
|
||||||
if (!footer->isPainted())
|
if (!footer->isPainted())
|
||||||
footer->paint();
|
footer->paint();
|
||||||
|
Reference in New Issue
Block a user