mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 00:41:09 +02:00
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:
@@ -98,15 +98,16 @@ CColorChooser::CColorChooser(const neutrino_locale_t Name, unsigned char *R, uns
|
||||
}
|
||||
|
||||
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 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;
|
||||
|
||||
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);
|
||||
return (((tAlpha << 24) & 0xFF000000) | color);
|
||||
}
|
||||
|
||||
int CColorChooser::exec(CMenuTarget* parent, const std::string &)
|
||||
|
@@ -67,6 +67,7 @@ class CColorChooser : public CMenuTarget
|
||||
|
||||
void hide();
|
||||
int exec(CMenuTarget* parent, const std::string & actionKey);
|
||||
fb_pixel_t getColor(void);
|
||||
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user