コード例 #1
0
ファイル: TwAdvanced1.cpp プロジェクト: davidcox/AntTweakBar
// Callback function called by GLFW on char event
void GLFWCALL OnChar(int glfwChar, int glfwAction)
{
    if( !TwEventCharGLFW(glfwChar, glfwAction) )    // Send event to AntTweakBar
    {
        // Event has not been handled by AntTweakBar
        // Do something if needed.
    }
}
コード例 #2
0
ファイル: ShaderToyViewer.cpp プロジェクト: 2php/nvFX
  //------------------------------------------------------------------------------
  void MyWindow::keyboardchar(unsigned char key, int mods, int x, int y)
  {
      WindowInertiaCamera::keyboardchar(key, mods, x, y);
#ifdef USEANTTWEAKBAR
    //int res = TwEventKeyboardGLUT(key, x,y);
    TwEventMousePosGLFW(x,y);
    int res = TwEventCharGLFW(key, BUTTON_PRESS|mods);
    if(res) {
		postRedisplay();
        return;
	}
#endif
  }
コード例 #3
0
ファイル: GLFW_App.cpp プロジェクト: mojovski/KinskiGL
    void GLFW_App::s_charFunc(GLFWwindow* window, unsigned int key)
    {
        GLFW_App* app = static_cast<GLFW_App*>(glfwGetWindowUserPointer(window));
        if(app->displayTweakBar())
            TwEventCharGLFW(key, GLFW_PRESS);
        
        if(key == GLFW_KEY_SPACE){return;}
        
        uint32_t buttonMod, keyMod;
        s_getModifiers(window, buttonMod, keyMod);
        
//        KeyEvent e(0, key, keyMod);
//        app->keyPress(e);
    }
コード例 #4
0
	//////////////////////////////////////////////////////////////////////////
	//	Input Events
	void DebugUIKeyPress(int key, int state)
	{
		switch(key)
		{
		case GLFW_KEY_ENTER:
			key = TW_KEY_RETURN;
			break;
		case GLFW_KEY_BACKSPACE:
			key = TW_KEY_BACKSPACE;
			break;
		}
		TwEventKeyGLFW(key, state);
		TwEventCharGLFW(key, state);
		TW_KEY_RETURN;
	}
コード例 #5
0
ファイル: oglApp.cpp プロジェクト: byhj/byhj-Render
	void OGLApp::glfw_char(GLFWwindow *window, unsigned int x)
	{
		TwEventCharGLFW(x, GLFW_PRESS);
	}
コード例 #6
0
ファイル: TwEventGLFW.c プロジェクト: mojovski/KinskiGL
TW_API int TW_CDECL_CALL TwEventCharGLFWcdecl(int glfwChar, int glfwAction)
{
    return TwEventCharGLFW(glfwChar, glfwAction);
}
コード例 #7
0
ファイル: overlay.cpp プロジェクト: dsmo7206/genesis
void myTwEventCharGLFW(GLFWwindow* window, unsigned int character)
{
	TwEventCharGLFW((int)character, GLFW_PRESS);//GLFW_KEY_DOWN); // Is this correct??
}
コード例 #8
0
static void onCharCallback(GLFWwindow* window, unsigned int codepoint)
{
	// AntTweakBar event
	if (TwEventCharGLFW(codepoint, GLFW_PRESS))
		return;
}
コード例 #9
0
ファイル: GUI.cpp プロジェクト: Mahoimi/NbodySim
void TwEventCharGLFW3(GLFWwindow* window, int codepoint){TwEventCharGLFW(codepoint, GLFW_PRESS);}
void charInput(GLFWwindow* window, static unsigned int scanChar){
	if (TwEventCharGLFW(scanChar, GLFW_PRESS))
		return;
}
コード例 #11
0
ファイル: GameEngineC.cpp プロジェクト: Cethric/GameEngineC
void charCallback(GLFWwindow *window, unsigned int code_point) {
    int tweak = TwEventCharGLFW(code_point, GLFW_PRESS);
}