shortcut to reload skin

This commit is contained in:
yugecin
2017-01-21 15:18:04 +01:00
parent 6c461fa645
commit a489ee24d6
2 changed files with 12 additions and 3 deletions

View File

@@ -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.