本文整理匯總了Java中org.lwjgl.glfw.GLFW.GLFW_MOUSE_BUTTON_RIGHT屬性的典型用法代碼示例。如果您正苦於以下問題:Java GLFW.GLFW_MOUSE_BUTTON_RIGHT屬性的具體用法?Java GLFW.GLFW_MOUSE_BUTTON_RIGHT怎麽用?Java GLFW.GLFW_MOUSE_BUTTON_RIGHT使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.lwjgl.glfw.GLFW
的用法示例。
在下文中一共展示了GLFW.GLFW_MOUSE_BUTTON_RIGHT屬性的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onMouseButton
@Override
public void onMouseButton(int button, int action, int mods)
{
if (action != GLFW.GLFW_PRESS) return;
if (connectJack != null)
{
if (button == GLFW.GLFW_MOUSE_BUTTON_RIGHT || button == GLFW.GLFW_MOUSE_BUTTON_LEFT)
{
if (node.isLast()) node.getWire().connectOut((InputJack)connectJack);
else if (node.isFirst()) node.getWire().connectIn((OutputJack)connectJack);
Main.instance().setDefaultState();
}
}
else
{
if (button == GLFW.GLFW_MOUSE_BUTTON_RIGHT) Main.instance().setDefaultState();
else if (button == GLFW.GLFW_MOUSE_BUTTON_LEFT && !node.isCorner())
node = node.makeCorner();
}
}
示例2: onMouseButton
@Override
public void onMouseButton(FocusQuery query, int button, int action, int mods)
{
if (button == GLFW.GLFW_MOUSE_BUTTON_MIDDLE)
MidiSeqScreen.this.onMouseButton(query, button, action, mods);
if (action != GLFW.GLFW_PRESS) return;
if (button == GLFW.GLFW_MOUSE_BUTTON_LEFT) Main.instance().setState(drag());
else if (button == GLFW.GLFW_MOUSE_BUTTON_RIGHT) track.notes.remove(note);
}
示例3: onMouseButton
@Override
public void onMouseButton(FocusQuery query, int button, int action, int mods)
{
//Panel drag.
if (action == GLFW.GLFW_PRESS && button == GLFW.GLFW_MOUSE_BUTTON_RIGHT)
Main.instance().setState(new PanelDragState(this));
}
示例4: onMouseButton
@Override
public void onMouseButton(int button, int action, int mods)
{
if (action != GLFW.GLFW_PRESS || button != GLFW.GLFW_MOUSE_BUTTON_RIGHT) return;
panel.dragged = false;
Main.instance().setDefaultState();
}
示例5: onMouseButton
@Override
public void onMouseButton(FocusQuery query, int button, int action, int mods)
{
if (action == GLFW.GLFW_PRESS && button == GLFW.GLFW_MOUSE_BUTTON_RIGHT)
Main.instance().setState(new WireDragState(this));
}