1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-22 18:23:08 +02:00

On the skin menu, the ALTLEFT/ALTRIGHT buttons will now respectively decrease/increase the ARGB values by 10.

This commit is contained in:
Ayla 2011-04-14 19:35:50 +02:00
parent c22cc4d663
commit 38a83dd385
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();