本文整理汇总了Java中itdelatrisu.opsu.ui.UI.changeVolume方法的典型用法代码示例。如果您正苦于以下问题:Java UI.changeVolume方法的具体用法?Java UI.changeVolume怎么用?Java UI.changeVolume使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类itdelatrisu.opsu.ui.UI
的用法示例。
在下文中一共展示了UI.changeVolume方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: mouseWheelMoved
import itdelatrisu.opsu.ui.UI; //导入方法依赖的package包/类
@Override
public boolean mouseWheelMoved(int delta) {
if (isKeyDown(Input.KEY_LALT) || isKeyDown(Input.KEY_RALT)) {
UI.changeVolume((delta < 0) ? -1 : 1);
return true;
}
return false;
}
示例2: mouseWheelMoved
import itdelatrisu.opsu.ui.UI; //导入方法依赖的package包/类
@Override
public boolean mouseWheelMoved(int newValue) {
if (super.mouseWheelMoved(newValue)) {
return true;
}
if (OPTION_DISABLE_MOUSE_WHEEL.state) {
return true;
}
UI.changeVolume((newValue < 0) ? -1 : 1);
return true;
}
示例3: keyPressed
import itdelatrisu.opsu.ui.UI; //导入方法依赖的package包/类
@Override
public void keyPressed(int key, char c) {
if (UI.globalKeyPressed(key))
return;
switch (key) {
case Input.KEY_ESCAPE:
case Input.KEY_Q:
((ButtonMenu) game.getState(Opsu.STATE_BUTTONMENU)).setMenuState(MenuState.EXIT);
game.enterState(Opsu.STATE_BUTTONMENU);
break;
case Input.KEY_P:
SoundController.playSound(SoundEffect.MENUHIT);
if (logoState == LogoState.DEFAULT || logoState == LogoState.CLOSING)
openLogoMenu();
else
enterSongMenu();
break;
case Input.KEY_D:
SoundController.playSound(SoundEffect.MENUHIT);
game.enterState(Opsu.STATE_DOWNLOADSMENU, new EasedFadeOutTransition(), new FadeInTransition());
break;
case Input.KEY_O:
SoundController.playSound(SoundEffect.MENUHIT);
if ((logoState == LogoState.DEFAULT || logoState == LogoState.CLOSING) &&
!(input.isKeyDown(Input.KEY_RCONTROL) || input.isKeyDown(Input.KEY_LCONTROL)))
openLogoMenu();
else {
showOptionsOverlay = true;
optionsOverlayProgress.setTime(0);
optionsOverlay.activate();
input.consumeEvent(); // don't let options overlay consume this keypress
}
break;
case Input.KEY_F:
Options.toggleFPSCounter();
break;
case Input.KEY_Z:
previousTrack();
UI.getNotificationManager().sendBarNotification("<< Prev");
break;
case Input.KEY_X:
if (MusicController.isPlaying()) {
lastMeasureProgress = 0f;
MusicController.setPosition(0);
} else if (!MusicController.isTrackLoading())
MusicController.resume();
UI.getNotificationManager().sendBarNotification("Play");
break;
case Input.KEY_C:
if (MusicController.isPlaying()) {
MusicController.pause();
UI.getNotificationManager().sendBarNotification("Pause");
} else if (!MusicController.isTrackLoading()) {
MusicController.resume();
UI.getNotificationManager().sendBarNotification("Unpause");
}
break;
case Input.KEY_V:
nextTrack(true);
UI.getNotificationManager().sendBarNotification(">> Next");
break;
case Input.KEY_R:
nextTrack(true);
break;
case Input.KEY_UP:
UI.changeVolume(1);
break;
case Input.KEY_DOWN:
UI.changeVolume(-1);
break;
}
}
示例4: mouseWheelMoved
import itdelatrisu.opsu.ui.UI; //导入方法依赖的package包/类
/**
* Processes a mouse wheel movement.
* @param newValue the amount that the mouse wheel moved
*/
public void mouseWheelMoved(int newValue) {
UI.changeVolume((newValue < 0) ? -1 : 1);
}