mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-11 04:46:18 -04:00
feat: classic background.
This commit is contained in:
parent
ca3bc69a61
commit
cfe801f280
@ -139,7 +139,9 @@ public class DecoratorController {
|
||||
.orElse(null);
|
||||
}
|
||||
if (config().getBackgroundImageType() == EnumBackgroundImage.NETWORK) {
|
||||
|
||||
image = new Image(config().getBackgroundImageUrl(), true);
|
||||
} else if (config().getBackgroundImageType() == EnumBackgroundImage.CLASSIC) {
|
||||
image = newImage("/assets/img/background-classic.jpg");
|
||||
}
|
||||
if (image == null) {
|
||||
image = loadDefaultBackgroundImage();
|
||||
@ -147,7 +149,8 @@ public class DecoratorController {
|
||||
return new Background(new BackgroundImage(image, BackgroundRepeat.NO_REPEAT, BackgroundRepeat.NO_REPEAT, BackgroundPosition.DEFAULT, new BackgroundSize(800, 480, false, false, true, true)));
|
||||
},
|
||||
config().backgroundImageTypeProperty(),
|
||||
config().backgroundImageProperty()));
|
||||
config().backgroundImageProperty(),
|
||||
config().backgroundImageUrlProperty()));
|
||||
}
|
||||
|
||||
private Image defaultBackground = newImage("/assets/img/background.jpg");
|
||||
|
BIN
HMCL/src/main/resources/assets/img/background-classic.jpg
Normal file
BIN
HMCL/src/main/resources/assets/img/background-classic.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 82 KiB |
Loading…
x
Reference in New Issue
Block a user