gui/widget/colorchooser.cpp: add getColor() member

Origin commit data
------------------
Branch: ni/coolstream
Commit: 1f02a0d49e
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2013-07-10 (Wed, 10 Jul 2013)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
[CST] Focus
2013-07-10 19:32:04 +04:00
parent fbdde6d2ad
commit bbb94cb64f
2 changed files with 8 additions and 6 deletions

View File

@@ -98,15 +98,16 @@ CColorChooser::CColorChooser(const neutrino_locale_t Name, unsigned char *R, uns
} }
void CColorChooser::setColor() void CColorChooser::setColor()
{
frameBuffer->paintBoxRel(x+offset+162,y+hheight+2+5, mheight*4-4 ,mheight*4-4-10, getColor());
}
fb_pixel_t CColorChooser::getColor()
{ {
int color = convertSetupColor2RGB(*(value[VALUE_R]), *(value[VALUE_G]), *(value[VALUE_B])); int color = convertSetupColor2RGB(*(value[VALUE_R]), *(value[VALUE_G]), *(value[VALUE_B]));
int tAlpha = (value[VALUE_ALPHA]) ? (convertSetupAlpha2Alpha(*(value[VALUE_ALPHA]))) : 0; int tAlpha = (value[VALUE_ALPHA]) ? (convertSetupAlpha2Alpha(*(value[VALUE_ALPHA]))) : 0xFF;
if(!value[VALUE_ALPHA]) tAlpha = 0xFF; return (((tAlpha << 24) & 0xFF000000) | color);
fb_pixel_t col = ((tAlpha << 24) & 0xFF000000) | color;
//((tAlpha << 24) & 0xFF000000) | ((color << 16) & 0x00FF0000) | (color & 0x0000FF00) | ((color >> 16) & 0xFF);
frameBuffer->paintBoxRel(x+offset+162,y+hheight+2+5, mheight*4-4 ,mheight*4-4-10, col);
} }
int CColorChooser::exec(CMenuTarget* parent, const std::string &) int CColorChooser::exec(CMenuTarget* parent, const std::string &)

View File

@@ -67,6 +67,7 @@ class CColorChooser : public CMenuTarget
void hide(); void hide();
int exec(CMenuTarget* parent, const std::string & actionKey); int exec(CMenuTarget* parent, const std::string & actionKey);
fb_pixel_t getColor(void);
}; };