Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added TrackRecordArmDisplay action. #5

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions reaper_csurf_integrator/control_surface_Reaper_actions.h
Original file line number Diff line number Diff line change
Expand Up @@ -1013,6 +1013,29 @@ class TrackRecordArm : public Action
}
};

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class TrackRecordArmDisplay : public Action
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
{
public:
virtual const char *GetName() override { return "TrackRecordArmDisplay"; }

virtual void RequestUpdate(ActionContext *context) override
{
if (MediaTrack *track = context->GetTrack())
{
double state = GetMediaTrackInfo_Value(track, "I_RECARM");

if (state > 0.5)
context->UpdateWidgetValue("REC");
else
context->UpdateWidgetValue("");
}
else
context->ClearWidget();
}
};

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class TrackMute : public Action
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down
1 change: 1 addition & 0 deletions reaper_csurf_integrator/control_surface_integrator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1205,6 +1205,7 @@ void CSurfIntegrator::InitActionsDictionary()
actions_.Insert("TrackUniqueSelect", new TrackUniqueSelect());
actions_.Insert("TrackRangeSelect", new TrackRangeSelect());
actions_.Insert("TrackRecordArm", new TrackRecordArm());
actions_.Insert("TrackRecordArmDisplay", new TrackRecordArmDisplay());
actions_.Insert("TrackMute", new TrackMute());
actions_.Insert("TrackSolo", new TrackSolo());
actions_.Insert("ClearAllSolo", new ClearAllSolo());
Expand Down