mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
Milestone in SourceCallbacks and Keyboard callback trigger
Updated SourceCallback class to accept cloning, reversing, and visitors for saving./loading. New mechanism in Source to listen to key triggers for launching SourceCallbacks. Saving and loading in SessionVisitor and SessionCreator.
This commit is contained in:
@@ -76,6 +76,7 @@ using namespace std;
|
||||
#include "Selection.h"
|
||||
#include "FrameBuffer.h"
|
||||
#include "MediaPlayer.h"
|
||||
#include "SourceCallback.h"
|
||||
#include "CloneSource.h"
|
||||
#include "RenderSource.h"
|
||||
#include "MediaSource.h"
|
||||
@@ -389,6 +390,17 @@ void UserInterface::handleKeyboard()
|
||||
// Space bar to toggle play / pause
|
||||
sourcecontrol.Play();
|
||||
|
||||
// keys for source callbacks
|
||||
else
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
for( auto sit = Mixer::manager().session()->begin();
|
||||
sit != Mixer::manager().session()->end(); ++sit) {
|
||||
(*sit)->updateCallbacks(g.IO.KeysDown);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// normal keys in workspace // make sure no entry / window box is active
|
||||
if ( !ImGui::IsAnyWindowFocused() )
|
||||
{
|
||||
@@ -1251,7 +1263,7 @@ void UserInterface::RenderMetrics(bool *p_open, int* p_corner, int *p_mode)
|
||||
float v = s->alpha();
|
||||
ImGui::SetNextItemWidth(rightalign);
|
||||
if ( ImGui::DragFloat("Alpha", &v, 0.01f, 0.f, 1.f) )
|
||||
s->call(new SetAlpha(v));
|
||||
s->call(new GotoAlpha(v));
|
||||
if ( ImGui::IsItemDeactivatedAfterEdit() ) {
|
||||
info << "Alpha " << std::fixed << std::setprecision(3) << v;
|
||||
Action::manager().store(info.str());
|
||||
|
||||
Reference in New Issue
Block a user