Skip to content

Commit

Permalink
Gray out the sub/audio buttons when toggled off
Browse files Browse the repository at this point in the history
  • Loading branch information
cyl0 authored Feb 14, 2022
1 parent 333699c commit 85c9cae
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions mordenx.lua
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,11 @@ function prepare_elements()
element.layout.alpha[1] = 136
element.eventresponder = nil
end
-- gray out the element if it is toggled off
if (element.off) then
element.layout.alpha[1] = 136
end

end
end

Expand Down Expand Up @@ -1346,6 +1351,7 @@ function osc_init()
--cy_audio
ne = new_element('cy_audio', 'button')
ne.enabled = (#tracks_osc.audio > 0)
ne.off = (get_track('audio') == 0)
ne.visible = (osc_param.playresx >= 540)
ne.content = '\xEF\x8E\xB7'
ne.tooltip_style = osc_styles.Tooltip
Expand Down Expand Up @@ -1376,6 +1382,7 @@ function osc_init()
--cy_sub
ne = new_element('cy_sub', 'button')
ne.enabled = (#tracks_osc.sub > 0)
ne.off = (get_track('sub') == 0)
ne.visible = (osc_param.playresx >= 600)
ne.content = '\xEF\x8F\x93'
ne.tooltip_style = osc_styles.Tooltip
Expand Down

0 comments on commit 85c9cae

Please sign in to comment.