Skip to content
Snippets Groups Projects
Commit 83573fd4 authored by Drahomír Karchňák's avatar Drahomír Karchňák
Browse files

#341 Changed opacity of disabled sound mute button

parent 1867fddf
Branches
Tags
No related merge requests found
......@@ -17,7 +17,10 @@ import cz.nic.tablexia.util.ui.ClickListenerWithSound;
* Created by drahomir on 7/15/16.
*/
public class SoundMuteButton extends Group {
private static final float ICON_SIZE_SCALE = 0.6f;
private static final float DEFAULT_OPACITY = 1.0f;
private static final float DISABLED_OPACITY = 0.25f;
private static final float ICON_SIZE_SCALE = 0.6f;
private final ClickListenerWithSound clickListener = new ClickListenerWithSound() {
@Override
......@@ -76,11 +79,13 @@ public class SoundMuteButton extends Group {
private void setDisabled() {
removeListener(clickListener);
disabledOverlay.setVisible(true);
setColor(getColor().r, getColor().g, getColor().b, DISABLED_OPACITY);
}
private void setEnabled() {
addListener(clickListener);
disabledOverlay.setVisible(false);
setColor(getColor().r, getColor().g, getColor().b, DEFAULT_OPACITY);
}
@Handler
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment