Search in sources :

Example 6 with KeystrokesSettings

use of cc.hyperium.mods.keystrokes.config.KeystrokesSettings in project Hyperium by HyperiumClient.

the class GuiScreenEditKeys method mouseClickMove.

@Override
protected void mouseClickMove(int mouseX, int mouseY, int clickedMouseButton, long timeSinceLastClick) {
    if (currentlyDragging != null) {
        KeystrokesSettings settings = mod.getSettings();
        currentlyDragging.setxOffset(currentlyDragging.getxOffset() + (mouseX - lastMouseX) / settings.getScale());
        currentlyDragging.setyOffset(currentlyDragging.getyOffset() + (mouseY - lastMouseY) / settings.getScale());
        lastMouseX = mouseX;
        lastMouseY = mouseY;
        updated = true;
    }
}
Also used : KeystrokesSettings(cc.hyperium.mods.keystrokes.config.KeystrokesSettings)

Aggregations

KeystrokesSettings (cc.hyperium.mods.keystrokes.config.KeystrokesSettings)6 KeystrokesRenderer (cc.hyperium.mods.keystrokes.render.KeystrokesRenderer)1 GuiSliderFadeTime (cc.hyperium.mods.keystrokes.screen.impl.GuiSliderFadeTime)1 GuiSliderOpacity (cc.hyperium.mods.keystrokes.screen.impl.GuiSliderOpacity)1 GuiSliderScale (cc.hyperium.mods.keystrokes.screen.impl.GuiSliderScale)1 Sk1erMod (cc.hyperium.mods.sk1ercommon.Sk1erMod)1 IOException (java.io.IOException)1 GuiButton (net.minecraft.client.gui.GuiButton)1