1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-26 19:50:35 +02:00

Merge branch 'master' of projects.qi-hardware.com:gmenu2x

This commit is contained in:
Maarten ter Huurne 2011-05-11 01:37:57 +02:00
commit 8592038f95
2 changed files with 14 additions and 2 deletions

View File

@ -90,6 +90,12 @@ void MenuSettingRGBA::manageInput(bevent_t *event) {
case CLEAR: case CLEAR:
dec(); dec();
break; break;
case ALTLEFT:
update_value(-10);
break;
case ALTRIGHT:
update_value(10);
break;
case LEFT: case LEFT:
leftComponent(); leftComponent();
break; break;
@ -101,14 +107,19 @@ void MenuSettingRGBA::manageInput(bevent_t *event) {
} }
} }
void MenuSettingRGBA::update_value(int value)
{
setSelPart(constrain(getSelPart() + value, 0, 255));
}
void MenuSettingRGBA::dec() void MenuSettingRGBA::dec()
{ {
setSelPart(constrain(getSelPart()-1,0,255)); update_value(-1);
} }
void MenuSettingRGBA::inc() void MenuSettingRGBA::inc()
{ {
setSelPart(constrain(getSelPart()+1,0,255)); update_value(+1);
} }
void MenuSettingRGBA::leftComponent() void MenuSettingRGBA::leftComponent()

View File

@ -34,6 +34,7 @@ private:
RGBAColor originalValue; RGBAColor originalValue;
RGBAColor *_value; RGBAColor *_value;
void update_value(int value);
void dec(); void dec();
void inc(); void inc();
void leftComponent(); void leftComponent();