com.github.czyzby.autumn.mvc.component.sfx.dto.MusicVolumeChangeAction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gdx-autumn-mvc Show documentation
Show all versions of gdx-autumn-mvc Show documentation
MVC framework based on LibGDX using Autumn for components management and LML as view templates.
package com.github.czyzby.autumn.mvc.component.sfx.dto;
import com.badlogic.gdx.scenes.scene2d.ui.Slider;
import com.github.czyzby.autumn.mvc.component.sfx.MusicService;
import com.github.czyzby.lml.parser.action.ActorConsumer;
/** Changes music volume on invocation. Expects a slider.
*
* @author MJ */
public class MusicVolumeChangeAction implements ActorConsumer {
private final MusicService musicService;
public MusicVolumeChangeAction(final MusicService musicService) {
this.musicService = musicService;
}
@Override
public Void consume(final Slider slider) {
musicService.setMusicVolume(slider.getValue());
return null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy