Skip to content

Commit

Permalink
refactor: rename 'WindowResizedEvent' to 'ResolutionChangedEvent'
Browse files Browse the repository at this point in the history
  • Loading branch information
ccetl authored and Wide-Cat committed Aug 2, 2024
1 parent 23c87ce commit 6b9c11e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

package meteordevelopment.meteorclient.events.game;

public class WindowResizedEvent {
private static final WindowResizedEvent INSTANCE = new WindowResizedEvent();
public class ResolutionChangedEvent {
private static final ResolutionChangedEvent INSTANCE = new ResolutionChangedEvent();

public static WindowResizedEvent get() {
public static ResolutionChangedEvent get() {
return INSTANCE;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import meteordevelopment.meteorclient.events.game.GameLeftEvent;
import meteordevelopment.meteorclient.events.game.OpenScreenEvent;
import meteordevelopment.meteorclient.events.game.ResourcePacksReloadedEvent;
import meteordevelopment.meteorclient.events.game.WindowResizedEvent;
import meteordevelopment.meteorclient.events.game.ResolutionChangedEvent;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.gui.WidgetScreen;
import meteordevelopment.meteorclient.mixininterface.IMinecraftClient;
Expand Down Expand Up @@ -163,7 +163,7 @@ private String setTitle(String original) {

@Inject(method = "onResolutionChanged", at = @At("TAIL"))
private void onResolutionChanged(CallbackInfo info) {
MeteorClient.EVENT_BUS.post(WindowResizedEvent.get());
MeteorClient.EVENT_BUS.post(ResolutionChangedEvent.get());
}

@Inject(method = "getFramerateLimit", at = @At("HEAD"), cancellable = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import it.unimi.dsi.fastutil.ints.IntDoubleImmutablePair;
import meteordevelopment.meteorclient.MeteorClient;
import meteordevelopment.meteorclient.events.game.WindowResizedEvent;
import meteordevelopment.meteorclient.events.game.ResolutionChangedEvent;
import meteordevelopment.meteorclient.events.render.RenderAfterWorldEvent;
import meteordevelopment.meteorclient.gui.WidgetScreen;
import meteordevelopment.meteorclient.renderer.*;
Expand Down Expand Up @@ -107,7 +107,7 @@ public Blur() {
super(Categories.Render, "blur", "Blurs background when in GUI screens.");

// The listeners need to run even when the module is not enabled
MeteorClient.EVENT_BUS.subscribe(new ConsumerListener<>(WindowResizedEvent.class, event -> {
MeteorClient.EVENT_BUS.subscribe(new ConsumerListener<>(ResolutionChangedEvent.class, event -> {
// Resize all fbos
for (int i = 0; i < fbos.length; i++) {
if (fbos[i] != null) {
Expand Down

0 comments on commit 6b9c11e

Please sign in to comment.