mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2025-04-21 12:27:27 +03:00
On the skin menu, the ALTLEFT/ALTRIGHT buttons will now respectively decrease/increase the ARGB values by 10.
This commit is contained in:
@@ -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()
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user