public int getY () { return Gdx.graphics.getHeight() - 1 - (int)(Mouse.getY() * Display.getPixelScaleFactor()); }
public int getY () { return Gdx.graphics.getHeight() - 1 - (int)(Mouse.getY() * Display.getPixelScaleFactor()); }
@Override public Vector2i getPosition() { return new Vector2i(Mouse.getX() / this.uiScale, (Display.getHeight() - Mouse.getY()) / this.uiScale); }
/** * Send the input listener a special mouse-motion event with zero deltas in * order to initialize the listener's cursor position. */ private void sendFirstMouseEvent() { assert listener != null; assert Mouse.isCreated(); int x = Mouse.getX(); int y = Mouse.getY(); int xDelta = 0; int yDelta = 0; int wheelDelta = 0; MouseMotionEvent evt = new MouseMotionEvent(x, y, xDelta, yDelta, curWheel, wheelDelta); evt.setTime(Mouse.getEventNanoseconds()); listener.onMouseMotionEvent(evt); }
int yDelta = Mouse.getEventDY(); int x = Mouse.getX(); int y = Mouse.getY();
/** * Get the absolute y position of the mouse cursor within the container * * @return The absolute y position of the mouse cursor */ public int getAbsoluteMouseY() { return height - Mouse.getY() - 1; }
protected int getMouseY() { return height - Mouse.getY() * height / mc.displayHeight - 1; } }
public float getPreciseMouseY() { return this.height - (float) Mouse.getY() * this.height / (float) this.mc.displayHeight - 1.0F; }
int sh = res.getScaledHeight(); x = Mouse.getX() * sw / mc.displayWidth; y = sh - Mouse.getY() * sh / mc.displayHeight - 1;
public int getY() { int j = scaledresolution.getScaledHeight(); return j - Mouse.getY() * j / displayHeight - 1; } }
protected int getMouseY() { return (int) ((this.height - Mouse.getY() * this.height / this.mc.displayHeight - 1 - topOffset()) / PAGE_SCALE); }
public int getY () { return Gdx.graphics.getHeight() - 1 - (int)(Mouse.getY() * Display.getPixelScaleFactor()); }
private static Vec3d getMouseVector(float z) { return projectionHelper.unproject(Mouse.getX(), Mouse.getY(), z); }
@Override protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException { super.mouseClicked(mouseX, mouseY, mouseButton); if (!buttonRotate.isMouseOver() && panel.contains(mouseX - guiLeft, mouseY - guiTop)) { clickButton = mouseButton; panelClicked = true; clickX = Mouse.getX(); clickY = Mouse.getY(); } }
@Override protected void onPressed() { getContainer().removeSlots(); Minecraft.getMinecraft().displayGuiScreen(new GuiResearchStationSelection(GuiResearchStation.this, Mouse.getX(), Mouse.getY())); } };
@Override protected boolean onGuiCloseRequested() { getContainer().addSlots(); int x = Mouse.getX(); int y = Mouse.getY(); Minecraft.getMinecraft().displayGuiScreen(parent); Mouse.setCursorPosition(x, y); return false; }
@Override protected void onPressed() { getContainer().removeSlots(); int x = Mouse.getX(); int y = Mouse.getY(); Minecraft.getMinecraft().displayGuiScreen(new GuiMailboxNameSelect(GuiMailboxInventory.this, true)); Mouse.setCursorPosition(x, y); } };
@Override protected void onPressed() { getContainer().removeSlots(); int x = Mouse.getX(); int y = Mouse.getY(); Minecraft.getMinecraft().displayGuiScreen(new GuiMailboxNameSelect(GuiMailboxInventory.this, false)); Mouse.setCursorPosition(x, y); } };
@Override protected void onPressed() { getContainer().removeSlots(); int x = Mouse.getX(); int y = Mouse.getY(); Minecraft.getMinecraft().displayGuiScreen(new GuiMailboxInventorySideSetup(GuiMailboxInventory.this)); Mouse.setCursorPosition(x, y); } };
@Override protected boolean onGuiCloseRequested() { getContainer().addSlots(); getContainer().setGui(parent); int x = Mouse.getX(); int y = Mouse.getY(); Minecraft.getMinecraft().displayGuiScreen(parent); Mouse.setCursorPosition(x, y); return false; }