- VPatchGUI *patch = vkey_fade_patch->patch;
- int ret = VFadePatch::handle_event();
- VFadePatch *fade = patch->fade;
- if( fade )
- fade->update(get_value());
- return ret;
+ this->vkey_fade_patch = vkey_fade_patch;
+}
+
+int VKeyFadeText::handle_event()
+{
+ int64_t v = atoi(get_text());
+ vkey_fade_patch->update(v);
+ return get_keypress() != RETURN ? 1 :
+ vkey_fade_patch->vkey_fade_ok->handle_event();
+}
+
+VKeyFadeSlider::VKeyFadeSlider(VKeyFadePatch *vkey_fade_patch,
+ int x, int y, int w, int64_t v)
+ : VFadePatch(vkey_fade_patch->patch, x,y, w, v)
+{
+ this->vkey_fade_patch = vkey_fade_patch;
+}
+
+int VKeyFadeSlider::handle_event()
+{
+ int64_t v = get_value();
+ vkey_fade_patch->update(v);
+ return 1;