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


Java GLFW.GLFW_MOUSE_BUTTON_RIGHT属性代码示例

本文整理汇总了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();
    }
}
 
开发者ID:SmashMaster,项目名称:KraftigAudio,代码行数:21,代码来源:WireDragState.java

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

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

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

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


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