use of org.lwjgl.glfw.GLFW.GLFW_KEY_H in project legui by SpinyOwl.
the class ShaderProgram method initializeGuiWithCallbacks.
private void initializeGuiWithCallbacks() {
GLFWKeyCallbackI escapeCallback = (w1, key, code, action, mods) -> running = !(key == GLFW_KEY_ESCAPE && action != GLFW_RELEASE);
// used to skip gui rendering
GLFWKeyCallbackI hideCallback = (w1, key, code, action, mods) -> {
if (key == GLFW_KEY_H && action == GLFW_RELEASE) {
hiding = !hiding;
}
};
GLFWWindowCloseCallbackI windowCloseCallback = w -> running = false;
CallbackKeeper keeper = initializer.getCallbackKeeper();
keeper.getChainKeyCallback().add(escapeCallback);
keeper.getChainKeyCallback().add(hideCallback);
keeper.getChainWindowCloseCallback().add(windowCloseCallback);
Renderer renderer = initializer.getRenderer();
renderer.initialize();
}
Aggregations