Skip to content

Commit

Permalink
Merge pull request #84 from asdflj/master
Browse files Browse the repository at this point in the history
remove keep mouse pos
  • Loading branch information
GlodBlock authored Feb 15, 2023
2 parents f3052c3 + bfcf339 commit e292a4d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import com.glodblock.github.common.item.ItemWirelessUltraTerminal;
import com.glodblock.github.inventory.gui.GuiType;
import com.glodblock.github.util.ModAndClassUtil;
import com.glodblock.github.util.Util;

public abstract class FCBaseMEGui extends AEBaseMEGui {

Expand All @@ -36,13 +35,11 @@ public FCBaseMEGui(final InventoryPlayer inventoryPlayer, Container container) {
@Override
public void onGuiClosed() {
super.onGuiClosed();
Util.MouseHandler.saveMousePos();
}

protected void initGuiDone() {
if (drawSwitchGuiBtn) {
drawSwitchGuiBtns();
Util.MouseHandler.loadMousePos();
}
}

Expand Down
20 changes: 0 additions & 20 deletions src/main/java/com/glodblock/github/util/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

import org.apache.commons.lang3.tuple.ImmutablePair;
import org.apache.commons.lang3.tuple.MutablePair;
import org.lwjgl.input.Mouse;

import appeng.api.AEApi;
import appeng.api.config.Actionable;
Expand Down Expand Up @@ -53,25 +52,6 @@

public final class Util {

public static class MouseHandler {

private static int mouse_x = 0;
private static int mouse_y = 0;

public static void saveMousePos() {
mouse_x = Mouse.getX();
mouse_y = Mouse.getY();
}

public static void loadMousePos() {
if (mouse_x != 0 && mouse_y != 0) {
Mouse.setCursorPosition(mouse_x, mouse_y);
mouse_y = 0;
mouse_x = 0;
}
}
}

public static int drainItemPower(AEBaseContainer c, InventoryPlayer ip, int slot, int ticks, double pm,
IFluidPortableCell wt) {
final ItemStack currentItem = slot < 0 ? ip.getCurrentItem() : ip.getStackInSlot(slot);
Expand Down

0 comments on commit e292a4d

Please sign in to comment.