Sequencer - Preparing for curve display
This commit is contained in:
parent
9eb719d0aa
commit
eab7b5f670
3 changed files with 38 additions and 0 deletions
6
sync.cc
6
sync.cc
|
@ -615,6 +615,12 @@ void T_SyncManager::removeCurve(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
T_SyncCurve const* T_SyncManager::getCurve(
|
||||||
|
T_String const& name ) const noexcept
|
||||||
|
{
|
||||||
|
return curves_.curves.get( name );
|
||||||
|
}
|
||||||
|
|
||||||
void T_SyncManager::curvesChanged_( )
|
void T_SyncManager::curvesChanged_( )
|
||||||
{
|
{
|
||||||
if ( modified_ ) {
|
if ( modified_ ) {
|
||||||
|
|
2
sync.hh
2
sync.hh
|
@ -346,6 +346,8 @@ struct T_SyncManager : public virtual A_MouseCtrl
|
||||||
void clearCurves( );
|
void clearCurves( );
|
||||||
void setCurve( T_SyncCurve curve );
|
void setCurve( T_SyncCurve curve );
|
||||||
void removeCurve( T_String const& curve ) noexcept;
|
void removeCurve( T_String const& curve ) noexcept;
|
||||||
|
T_SyncCurve const* getCurve(
|
||||||
|
T_String const& name ) const noexcept;
|
||||||
|
|
||||||
T_Array< T_SyncCurve > const& curves( ) const noexcept
|
T_Array< T_SyncCurve > const& curves( ) const noexcept
|
||||||
{ return curves_.curves.values( ); }
|
{ return curves_.curves.values( ); }
|
||||||
|
|
30
syncview.cc
30
syncview.cc
|
@ -166,6 +166,8 @@ struct T_SyncViewImpl_
|
||||||
void sequencerWidget( ) noexcept;
|
void sequencerWidget( ) noexcept;
|
||||||
void sequencerHeader( ImRect const& bb ) noexcept;
|
void sequencerHeader( ImRect const& bb ) noexcept;
|
||||||
void sequencerBody( ImRect const& bb ) noexcept;
|
void sequencerBody( ImRect const& bb ) noexcept;
|
||||||
|
void sequencerCurves( ) noexcept;
|
||||||
|
void sequencerCurve( T_SyncCurve const& curve ) noexcept;
|
||||||
|
|
||||||
void displayCurveSelectorWindow( ) noexcept;
|
void displayCurveSelectorWindow( ) noexcept;
|
||||||
void displayCurveSelector( ) noexcept;
|
void displayCurveSelector( ) noexcept;
|
||||||
|
@ -575,6 +577,14 @@ void T_SyncViewImpl_::sequencerBody(
|
||||||
bar ++;
|
bar ++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Display the curve / override controls
|
||||||
|
if ( sCurves.size( ) != 0 ) {
|
||||||
|
BeginGroup( );
|
||||||
|
// TODO: display overrides
|
||||||
|
sequencerCurves( );
|
||||||
|
EndGroup( );
|
||||||
|
}
|
||||||
|
|
||||||
if ( cursorPos >= 0 && cursorPos <= inner.GetWidth( ) ) {
|
if ( cursorPos >= 0 && cursorPos <= inner.GetWidth( ) ) {
|
||||||
auto* const dl( GetWindowDrawList( ) );
|
auto* const dl( GetWindowDrawList( ) );
|
||||||
dl->AddLine( inner.Min + ImVec2{ cursorPos , -1 } ,
|
dl->AddLine( inner.Min + ImVec2{ cursorPos , -1 } ,
|
||||||
|
@ -583,6 +593,26 @@ void T_SyncViewImpl_::sequencerBody(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void T_SyncViewImpl_::sequencerCurves( ) noexcept
|
||||||
|
{
|
||||||
|
auto& sync{ Globals::Sync( ) };
|
||||||
|
const auto nc{ sCurves.size( ) };
|
||||||
|
for ( auto i = 0u ; i < nc ; i ++ ) {
|
||||||
|
if ( sCurves.values( )[ i ] ) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
auto* const curve{ sync.getCurve( sCurves.keys( )[ i ] ) };
|
||||||
|
assert( curve );
|
||||||
|
sequencerCurve( *curve );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void T_SyncViewImpl_::sequencerCurve(
|
||||||
|
T_SyncCurve const& curve ) noexcept
|
||||||
|
{
|
||||||
|
#warning implement the fuck
|
||||||
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------*/
|
/*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
void T_SyncViewImpl_::displayCurveSelectorWindow( ) noexcept
|
void T_SyncViewImpl_::displayCurveSelectorWindow( ) noexcept
|
||||||
|
|
Loading…
Reference in a new issue