Skip to content
This repository has been archived by the owner on Apr 22, 2021. It is now read-only.

Commit

Permalink
Merge pull request #9 from zeroeightysix/master
Browse files Browse the repository at this point in the history
New changes from 086
  • Loading branch information
5HT2 authored Aug 7, 2019
2 parents 80dd529 + 6631ea8 commit ee2176d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# KAMI
[![Build Status](https://travis-ci.com/zeroeightysix/KAMI.svg?branch=master)](https://travis-ci.com/zeroeightysix/KAMI)
[![Maintainability](https://api.codeclimate.com/v1/badges/81228111eb82b7ca391e/maintainability)](https://codeclimate.com/github/zeroeightysix/KAMI/maintainability)
[![Issues](https://img.shields.io/github/issues/zeroeightysix/kami.svg)](https://github.com/zeroeightysix/kami/issues)
[![Discord](https://img.shields.io/badge/chat-on%20discord-brightgreen.svg)](http://discord.gg/9hvwgeg)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import me.zeroeightsix.kami.gui.rgui.render.font.FontRenderer;
import me.zeroeightsix.kami.gui.rgui.util.ContainerHelper;
import me.zeroeightsix.kami.gui.rgui.util.Docking;
import me.zeroeightsix.kami.util.Bind;
import me.zeroeightsix.kami.util.ColourHolder;
import me.zeroeightsix.kami.util.Wrapper;
import org.lwjgl.opengl.GL11;
Expand Down Expand Up @@ -253,6 +254,7 @@ public void updateLocation(Component component, int oldX, int oldY) { }
component.addPoof(new Frame.FrameDragPoof<Frame, Frame.FrameDragPoof.DragInfo>() {
@Override
public void execute(Frame component, DragInfo info) {
if (Bind.isShiftDown() || Bind.isAltDown() || Bind.isCtrlDown()) return;
int x = info.getX();
int y = info.getY();
yLineComponent = null;
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/me/zeroeightsix/kami/util/Bind.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,15 @@ public boolean isDown(int eventKey) {
return !isEmpty() && (!BindCommand.modifiersEnabled.getValue() || (isShift() == isShiftDown()) && (isCtrl() == isCtrlDown()) && (isAlt() == isAltDown())) && eventKey == getKey();
}

private boolean isShiftDown() {
public static boolean isShiftDown() {
return Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT);
}
private boolean isCtrlDown() {

public static boolean isCtrlDown() {
return Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) || Keyboard.isKeyDown(Keyboard.KEY_RCONTROL);
}

private boolean isAltDown() {
public static boolean isAltDown() {
return Keyboard.isKeyDown(Keyboard.KEY_LMENU) || Keyboard.isKeyDown(Keyboard.KEY_RMENU);
}

Expand Down

0 comments on commit ee2176d

Please sign in to comment.