1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-26 04:01:53 +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:
dec();
break;
case ALTLEFT:
update_value(-10);
break;
case ALTRIGHT:
update_value(10);
break;
case LEFT:
leftComponent();
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()
{
setSelPart(constrain(getSelPart()-1,0,255));
update_value(-1);
}
void MenuSettingRGBA::inc()
{
setSelPart(constrain(getSelPart()+1,0,255));
update_value(+1);
}
void MenuSettingRGBA::leftComponent()

View File

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