当前位置: 首页>>代码示例>>Java>>正文


Java GLFW.GLFW_RELEASE属性代码示例

本文整理汇总了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);
}
   }
 
开发者ID:camilne,项目名称:open-world,代码行数:10,代码来源:Input.java

示例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);
            }
        }
    };
}
 
开发者ID:SmashMaster,项目名称:KraftigAudio,代码行数:37,代码来源:MidiSeqScreen.java

示例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);
}
 
开发者ID:Guerra24,项目名称:NanoUI,代码行数:10,代码来源:KeyboardKeyCallback.java

示例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);
}
 
开发者ID:Guerra24,项目名称:NanoUI,代码行数:9,代码来源:MouseButtonCallback.java

示例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();
}
 
开发者ID:SmashMaster,项目名称:KraftigAudio,代码行数:6,代码来源:MidiSeqScreen.java


注:本文中的org.lwjgl.glfw.GLFW.GLFW_RELEASE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。