Reformat
This commit is contained in:
parent
7ce7fe4889
commit
25278cb496
1 changed files with 10 additions and 6 deletions
|
|
@ -24,7 +24,9 @@ namespace gui {
|
||||||
|
|
||||||
glfwMakeContextCurrent(wwindow.get());
|
glfwMakeContextCurrent(wwindow.get());
|
||||||
glfwSetFramebufferSizeCallback(wwindow.get(),
|
glfwSetFramebufferSizeCallback(wwindow.get(),
|
||||||
framebufferCallback != nullptr ? framebufferCallback : internalFramebufferCallback);
|
framebufferCallback != nullptr
|
||||||
|
? framebufferCallback
|
||||||
|
: internalFramebufferCallback);
|
||||||
|
|
||||||
glfwSwapInterval(1); // VSync on
|
glfwSwapInterval(1); // VSync on
|
||||||
glfwSetKeyCallback(wwindow.get(), key_callback);
|
glfwSetKeyCallback(wwindow.get(), key_callback);
|
||||||
|
|
@ -50,7 +52,9 @@ namespace gui {
|
||||||
void Window::key_callback(GLFWwindow *window, const int key, const int scancode, const int action, const int mods) {
|
void Window::key_callback(GLFWwindow *window, const int key, const int scancode, const int action, const int mods) {
|
||||||
auto *modules = static_cast<modulesType *>(glfwGetWindowUserPointer(window));
|
auto *modules = static_cast<modulesType *>(glfwGetWindowUserPointer(window));
|
||||||
std::ranges::for_each(*modules,
|
std::ranges::for_each(*modules,
|
||||||
[=](modulesType::reference item) { item.second->key_callback(key, scancode, action, mods); });
|
[=](modulesType::reference item) {
|
||||||
|
item.second->key_callback(key, scancode, action, mods);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void Window::cursor_position_callback(GLFWwindow *window, const double xpos, const double ypos) {
|
void Window::cursor_position_callback(GLFWwindow *window, const double xpos, const double ypos) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue