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

Conditionalise "Use another button style" #2800

Open
2 tasks done
PhilVale opened this issue Mar 14, 2024 · 4 comments · May be fixed by #3183
Open
2 tasks done

Conditionalise "Use another button style" #2800

PhilVale opened this issue Mar 14, 2024 · 4 comments · May be fixed by #3183
Labels
area/internal Related to an internal action or function of Companion. Enhancement New feature or request
Milestone

Comments

@PhilVale
Copy link

Is this a feature relevant to companion itself, and not a module?

  • I believe this to be a feature for companion, not a module

Is there an existing issue for this?

  • I have searched the existing issues

Describe the feature

Is it possible to enhance the "Use another button style" by putting a check mon a boolean condition.

Usecases

Use case:

I have a number of buttons that currently have 3 feedbacks on them and set the style of the button depending upon a set of conditions. If the style of one of these conditions changes then all of the buttons have to be altered. It would be a lot easier to say - if then . That way only one button needs to changed and the change in style automatically ripples through.

@dnmeid dnmeid added Enhancement New feature or request area/internal Related to an internal action or function of Companion. labels Mar 14, 2024
@PhilVale
Copy link
Author

PhilVale commented Apr 8, 2024

Would be grateful of any feedback - Ie is this likely to be undertaken or not?

@Julusian Julusian added this to the v3.3 milestone Apr 8, 2024
@Julusian Julusian modified the milestones: v3.3, v3.4 May 16, 2024
@semenovnick
Copy link

You can use "From expression" in target like this:

(a>b)?`x/y/z`:concat($(this:page), '/', $(this:row), '/', $(this:column))

Where when true - use another button stule
else
use this button style

@Julusian
Copy link
Member

@semenovnick that is a great idea, I didn't thin of suggesting that as a workaround.
You could probably simplify it and do

(a>b)?`x/y/z`:''

avoiding the extra noise of returning 'this button'. If it doesn't return a valid 'location', then it wont do anything

@Julusian Julusian modified the milestones: v3.4, v3.5 Aug 28, 2024
@forchinmaser
Copy link

forchinmaser commented Nov 19, 2024

+1

My use case:
I have 8 computers that I need to send alternating keypresses (F1 and esc). I created 8 buttons with two feedback actions: "use another button style" and "change style based on button step" (step = 2). The release cycles 1 and 2, which alternates command and the style. In addition to configuring the press actions for each step, I must reconfigure the second feedback action for each of the 8 buttons

If I was able to use another button style with check button step I would create "style template" off-page. I could copy/paste my 8 buttons without additional feedback configuration, while also allowing me to edit "style template" buttons for future changes.

@Julusian Julusian moved this to Todo in Companion Plan Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/internal Related to an internal action or function of Companion. Enhancement New feature or request
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

5 participants