48 lines
1.2 KiB
Java
48 lines
1.2 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*
|
|
* Could not load the following classes:
|
|
* org.jspecify.annotations.Nullable
|
|
*/
|
|
package net.minecraft.client.gui.components.events;
|
|
|
|
import net.minecraft.client.gui.components.events.ContainerEventHandler;
|
|
import net.minecraft.client.gui.components.events.GuiEventListener;
|
|
import org.jspecify.annotations.Nullable;
|
|
|
|
public abstract class AbstractContainerEventHandler
|
|
implements ContainerEventHandler {
|
|
private @Nullable GuiEventListener focused;
|
|
private boolean isDragging;
|
|
|
|
@Override
|
|
public final boolean isDragging() {
|
|
return this.isDragging;
|
|
}
|
|
|
|
@Override
|
|
public final void setDragging(boolean dragging) {
|
|
this.isDragging = dragging;
|
|
}
|
|
|
|
@Override
|
|
public @Nullable GuiEventListener getFocused() {
|
|
return this.focused;
|
|
}
|
|
|
|
@Override
|
|
public void setFocused(@Nullable GuiEventListener focused) {
|
|
if (this.focused == focused) {
|
|
return;
|
|
}
|
|
if (this.focused != null) {
|
|
this.focused.setFocused(false);
|
|
}
|
|
if (focused != null) {
|
|
focused.setFocused(true);
|
|
}
|
|
this.focused = focused;
|
|
}
|
|
}
|
|
|