- if(new_position != old_position)
- {
- Units::totext(string, new_position,
- mwindow->edl->session->sample_rate,
- mwindow->edl->session->time_format,
- mwindow->edl->session->frame_rate,
- mwindow->edl->session->frames_per_foot);
- playback_value->update(string);
- old_position = new_position;
- }
- return 0;
+ this->mwindow = mwindow;
+ this->zoombar = zoombar;
+ set_precision(0.01);
+ enable_show_value(0);
+}
+
+int TitleAlphaBar::handle_event()
+{
+ float v = get_value();
+ mwindow->session->title_bar_alpha = v;
+ zoombar->title_alpha_text->update(v);
+ mwindow->gui->draw_trackmovement();
+ mwindow->gui->flush();
+ return 1;
+}
+
+TitleAlphaText::TitleAlphaText(MWindow *mwindow, ZoomBar *zoombar, int x, int y)
+ : BC_TextBox(x, y, 48, 1, mwindow->session->title_bar_alpha, 0, MEDIUMFONT, 2)
+{
+ this->mwindow = mwindow;
+ this->zoombar = zoombar;
+ set_tooltip(_("Title Alpha"));
+}
+
+int TitleAlphaText::handle_event()
+{
+ float v = atof(get_text());
+ mwindow->session->title_bar_alpha = v;
+ zoombar->title_alpha_bar->update(v);
+ mwindow->gui->draw_trackmovement();
+ mwindow->gui->flush();
+ return 1;