示例#1
0
	void OGLApp::glfw_scroll(GLFWwindow* window, double xoffset, double yoffset)
	{
#ifdef USE_ANT
		TwEventMouseWheelGLFW(xoffset);
#endif
		app->v_scrollCallback(window, xoffset, yoffset);
	}
static void onMouseScroll(GLFWwindow* window, double xoffset, double yoffset)
{
	// AntTweakBar event
	if (TwEventMouseWheelGLFW(int(yoffset)))
		return;

	s_camera.zoom((float) yoffset);
}
示例#3
0
// Callback function called by GLFW on mouse wheel event
void GLFWCALL OnMouseWheel(int pos)
{
    if( !TwEventMouseWheelGLFW(pos) )   // Send event to AntTweakBar
    {
        // Event has not been handled by AntTweakBar
        // Do something if needed.
    }
}
示例#4
0
// Callback function called by GLFW on mouse wheel event
void GLFWCALL OnMouseWheel(int pos)
{
    if( !TwEventMouseWheelGLFW(pos) )   // Send event to AntTweakBar
    {
    	GUIactive = false;
    }
    else
    	GUIactive = true;
}
示例#5
0
void mouseWheel_Aux(GLFWwindow* pWindow, double x, double y)
{
#ifdef USE_ANTTWEAKBAR
    int ant = TwEventMouseWheelGLFW(static_cast<int>(x));
    if (ant != 0)
        return;
#endif
    mouseWheel(pWindow, x, y);
}
void mouseWheel_Aux(GLFWwindow* pWindow, double x, double y)
{
#ifdef USE_ANTTWEAKBAR
    static int scrollpos = 0;
    scrollpos += static_cast<int>(y);
    int ant = TwEventMouseWheelGLFW(scrollpos);
    if (ant != 0)
        return;
#endif
    mouseWheel(pWindow, x, y);
}
示例#7
0
void myTwEventMouseWheelGLFW(GLFWwindow* window, double xoffset, double yoffset)
{
	TwEventMouseWheelGLFW((int)yoffset); // Is this correct??
}
	void DebugUIMouseWheel(int pos)
	{
		TwEventMouseWheelGLFW(pos);
	}
示例#9
0
文件: GUI.cpp 项目: Mahoimi/NbodySim
void TwEventMouseWheelGLFW3(GLFWwindow* window, double xoffset, double yoffset){TwEventMouseWheelGLFW(yoffset);}
bool Sample::mouse_wheel(int wheel)
{
  return !!TwEventMouseWheelGLFW(wheel); 
}
示例#11
0
void scrollCallback(GLFWwindow *window, double x, double y) {
    int tweak = TwEventMouseWheelGLFW((int) y);
}