Skip to content

Commit

Permalink
change: use ElementaVersion.V2 where possible
Browse files Browse the repository at this point in the history
This silences a depcrecation notice and does not seem to introduce any issues.
  • Loading branch information
calcastor committed Jun 15, 2023
1 parent b57cbf8 commit a6be358
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
import club.sk1er.patcher.mixins.accessors.GuiMainMenuAccessor;
import club.sk1er.patcher.screen.disconnect.SmartDisconnectScreen;
import club.sk1er.patcher.screen.quit.ConfirmQuitScreen;
import gg.essential.api.EssentialAPI;
import gg.essential.api.config.EssentialConfig;
import gg.essential.elementa.ElementaVersion;
import gg.essential.elementa.components.UIImage;
import gg.essential.elementa.components.Window;
Expand Down Expand Up @@ -46,7 +44,7 @@ public class PatcherMenuEditor {
25, // tab
72 // return
};
private final Window window = (Window) new Window(ElementaVersion.V1).addChild(ComponentsKt.constrain(UIImage.ofResourceCached("/patcher.png"), uiConstraints -> {
private final Window window = (Window) new Window(ElementaVersion.V2).addChild(ComponentsKt.constrain(UIImage.ofResourceCached("/patcher.png"), uiConstraints -> {
uiConstraints.setX(UtilitiesKt.pixels(0, true));
uiConstraints.setWidth(UtilitiesKt.pixels(200));
uiConstraints.setHeight(UtilitiesKt.pixels(200));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ object ScreenshotPreview {
}

fun newCapture(image: BufferedImage) {
this.currentWindow = Window(ElementaVersion.V1)
this.currentWindow = Window(ElementaVersion.V2)
this.instantiateComponents(image)
}

Expand Down

0 comments on commit a6be358

Please sign in to comment.