Opened 8 years ago
#1293 new enhancement/feature request
Expose current layout as variable to enable_expression
Reported by: | dcpingflood | Owned by: | Singesang |
---|---|---|---|
Priority: | trivial | Milestone: | version 1.0 |
Component: | osd/core | Version: | git master |
Severity: | normal | Keywords: | layout name, daylayout, nightlayout |
Cc: |
Description
Hi all,
I want to suggest to expose the current layout name and some way to check if current is night or day layout in variables accessible in enable_expression.
This way we could have OSD for day and night.
I think is enough to expose the following variables:
layout.name : string holding current layout name layout.nightlayout : boolean (or int 0|1) holding status if current layout is night (true/1) or day (false/0).
This way if we want to show an OSD item only if the current layout is the night layout, then we could do something like this:
<osd type="button" src="daybutton.png" command="command()" x="10" y="10" enable_expression="layout.nightlayout==0"/>
<osd type="button" src="nightbutton.png" command="command()" x="10" y="10" enable_expression="layout.nightlayout==1"/>
Best regards