本文整理匯總了Java中org.lwjgl.glfw.GLFW.GLFW_RELEASE屬性的典型用法代碼示例。如果您正苦於以下問題:Java GLFW.GLFW_RELEASE屬性的具體用法?Java GLFW.GLFW_RELEASE怎麽用?Java GLFW.GLFW_RELEASE使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.lwjgl.glfw.GLFW
的用法示例。
在下文中一共展示了GLFW.GLFW_RELEASE屬性的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: invoke
@Override
public void invoke(long window, int keycode, int scancode, int action, int mods) {
// If the key was pressed
if(action == GLFW.GLFW_PRESS) {
keyPressed(keycode);
// If the key was released
} else if (action == GLFW.GLFW_RELEASE){
keyReleased(keycode);
}
}
示例2: drag
@Override
NoteDrag drag()
{
DSPUtil.midiOn(midiOut, note.midi);
return new NoteDrag()
{
@Override
public void update()
{
Vec2 mouse = camera.toWorld(getMouse());
mouse.x += offset.x;
long length = note.end - note.start;
note.start = seq.snapToGrid(mouse.x);
note.end = note.start + length;
int oldMidi = note.midi;
note.midi = DSPUtil.clampMidi(Util.floor(mouse.y));
if (oldMidi != note.midi)
{
DSPUtil.midiOff(midiOut, oldMidi);
DSPUtil.midiOn(midiOut, note.midi);
}
}
@Override
public void onMouseButton(int button, int action, int mods)
{
if (action == GLFW.GLFW_RELEASE && button == GLFW.GLFW_MOUSE_BUTTON_LEFT)
{
Main.instance().setDefaultState();
DSPUtil.midiOff(midiOut, note.midi);
}
}
};
}
示例3: invoke
@Override
public void invoke(long window, int key, int scancode, int action, int mods) {
if(window != this.windowID) return; //only care about the window this callback is assigned to
if(key < 0 || key > 65535) {
return;
}
this.keys.set(key, (action != GLFW.GLFW_RELEASE));
if(action == GLFW.GLFW_RELEASE && this.ignore.get(key)) this.ignore.clear(key);
}
示例4: invoke
@Override
public void invoke(long windowID, int button, int action, int mods) {
if (this.windowID != windowID)
return;
this.button.set(button, (action != GLFW.GLFW_RELEASE));
if (action == GLFW.GLFW_RELEASE && this.ignore.get(button))
this.ignore.clear(button);
}
示例5: onMouseButton
@Override
public default void onMouseButton(int button, int action, int mods)
{
if (action == GLFW.GLFW_RELEASE && button == GLFW.GLFW_MOUSE_BUTTON_LEFT)
Main.instance().setDefaultState();
}