- APatchGUI *patch = akey_fade_patch->patch;
- int ret = AFadePatch::handle_event();
- AFadePatch *fade = patch->fade;
- if( fade )
- fade->update(get_value());
- return ret;
+ this->akey_fade_patch = akey_fade_patch;
+}
+
+int AKeyFadeText::handle_event()
+{
+ float v = atof(get_text());
+ akey_fade_patch->update(v);
+ return get_keypress() != RETURN ? 1 :
+ akey_fade_patch->akey_fade_ok->handle_event();
+}
+
+AKeyFadeSlider::AKeyFadeSlider(AKeyFadePatch *akey_fade_patch, int x, int y, int w, float v)
+ : AFadePatch(akey_fade_patch->patch, x, y, w, v)
+{
+ this->akey_fade_patch = akey_fade_patch;
+}
+
+int AKeyFadeSlider::handle_event()
+{
+ float v = get_value();
+ akey_fade_patch->update(v);
+ return 1;