diff options
Diffstat (limited to 'src/lightctx.c')
-rw-r--r-- | src/lightctx.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lightctx.c b/src/lightctx.c index cbd5c24..cfa140f 100644 --- a/src/lightctx.c +++ b/src/lightctx.c @@ -159,3 +159,14 @@ void attr_movey(struct lightctx *nl, signed int d, int fine) } } + + +int any_selected_fixture_has(struct lightctx *nl, int attr) +{ + int i; + for ( i=0; i<nl->n_sel; i++ ) { + struct fixture *fix = &nl->fixtures[nl->selection[i]]; + if ( fix->cls->attributes & attr ) return 1; + } + return 0; +} |