shortcut to reload skin
This commit is contained in:
parent
6c461fa645
commit
a489ee24d6
|
@ -377,9 +377,7 @@ public class Options {
|
|||
@Override
|
||||
public void clickListItem(int index) {
|
||||
skinName = skinDirs[index];
|
||||
loadSkin();
|
||||
SoundController.init();
|
||||
EventBus.instance.post(new ResolutionChangedEvent(DisplayContainer.instance.width, DisplayContainer.instance.height));
|
||||
reloadSkin();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1872,6 +1870,12 @@ public class Options {
|
|||
return skinRootDir;
|
||||
}
|
||||
|
||||
public static void reloadSkin() {
|
||||
loadSkin();
|
||||
SoundController.init();
|
||||
EventBus.instance.post(new ResolutionChangedEvent(DisplayContainer.instance.width, DisplayContainer.instance.height));
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the skin given by the current skin directory.
|
||||
* If the directory is invalid, the default skin will be loaded.
|
||||
|
|
|
@ -19,6 +19,7 @@ package yugecin.opsudance.core.state;
|
|||
|
||||
import itdelatrisu.opsu.Options;
|
||||
import itdelatrisu.opsu.Utils;
|
||||
import itdelatrisu.opsu.states.Game;
|
||||
import org.newdawn.slick.Graphics;
|
||||
import org.newdawn.slick.Input;
|
||||
import yugecin.opsudance.core.DisplayContainer;
|
||||
|
@ -104,6 +105,10 @@ public abstract class BaseOpsuState implements OpsuState, EventListener<Resoluti
|
|||
Utils.takeScreenShot();
|
||||
return true;
|
||||
}
|
||||
Input input = displayContainer.input;
|
||||
if (key == Input.KEY_S && input.isKeyDown(Input.KEY_LMENU) && input.isKeyDown(Input.KEY_LSHIFT) &&input.isKeyDown(Input.KEY_LCONTROL) && !displayContainer.isInState(Game.class)) {
|
||||
Options.reloadSkin();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user