UI - Use actions in sequencer toolbar

This commit is contained in:
Emmanuel BENOîT 2017-11-24 12:05:40 +01:00
parent d16e583458
commit 6afb1d9374
2 changed files with 5 additions and 4 deletions

View file

@ -77,7 +77,7 @@ void T_UIAction::tbButton( ) const noexcept
if ( shortcut ) {
char kbs[ 20 ];
shortcut->toString( kbs , 20 );
sb << ' ' << kbs;
sb << " (" << kbs << ')';
}
sb << '\0';

View file

@ -293,9 +293,10 @@ void T_SyncViewImpl_::displayToolbar( ) noexcept
using namespace ImGui;
auto& sync( Common::Sync( ) );
if ( ToolbarButton( sync.playing( ) ? ICON_FA_STOP : ICON_FA_PLAY , BtSize ,
sync.playing( ) ? "Stop" : "Play" ) ) {
sync.playing( ) = !sync.playing( ) && !sync.finished( );
if ( sync.playing( ) ) {
UI::Main( ).actionButton( "Stop" );
} else {
UI::Main( ).actionButton( "Play" );
}
SameLine( );