Application: adapt to Magnum changes.
This commit is contained in:
parent
f77fde3aff
commit
7540f9c152
4 changed files with 20 additions and 14 deletions
|
@ -191,23 +191,23 @@ Application::keyReleaseEvent(KeyEvent& event) {
|
|||
}
|
||||
|
||||
void
|
||||
Application::mousePressEvent(MouseEvent& event) {
|
||||
if(_imgui.handleMousePressEvent(event)) return;
|
||||
Application::pointerPressEvent(PointerEvent& event) {
|
||||
if(_imgui.handlePointerPressEvent(event)) return;
|
||||
}
|
||||
|
||||
void
|
||||
Application::mouseReleaseEvent(MouseEvent& event) {
|
||||
if(_imgui.handleMouseReleaseEvent(event)) return;
|
||||
Application::pointerReleaseEvent(PointerEvent& event) {
|
||||
if(_imgui.handlePointerReleaseEvent(event)) return;
|
||||
}
|
||||
|
||||
void
|
||||
Application::mouseMoveEvent(MouseMoveEvent& event) {
|
||||
if(_imgui.handleMouseMoveEvent(event)) return;
|
||||
Application::pointerMoveEvent(PointerMoveEvent& event) {
|
||||
if(_imgui.handlePointerMoveEvent(event)) return;
|
||||
}
|
||||
|
||||
void
|
||||
Application::mouseScrollEvent(MouseScrollEvent& event) {
|
||||
if(_imgui.handleMouseScrollEvent(event)) {
|
||||
Application::scrollEvent(ScrollEvent& event) {
|
||||
if(_imgui.handleScrollEvent(event)) {
|
||||
event.setAccepted();
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -74,10 +74,10 @@ class Application: public Platform::Sdl2Application, public efsw::FileWatchListe
|
|||
void keyPressEvent(KeyEvent& event) override;
|
||||
void keyReleaseEvent(KeyEvent& event) override;
|
||||
|
||||
void mousePressEvent(MouseEvent& event) override;
|
||||
void mouseReleaseEvent(MouseEvent& event) override;
|
||||
void mouseMoveEvent(MouseMoveEvent& event) override;
|
||||
void mouseScrollEvent(MouseScrollEvent& event) override;
|
||||
void pointerPressEvent(PointerEvent& event) override;
|
||||
void pointerReleaseEvent(PointerEvent& event) override;
|
||||
void pointerMoveEvent(PointerMoveEvent& event) override;
|
||||
void scrollEvent(ScrollEvent& event) override;
|
||||
void textInputEvent(TextInputEvent& event) override;
|
||||
|
||||
void anyEvent(SDL_Event& event) override;
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
|
||||
#include <cstring>
|
||||
|
||||
#include <Magnum/Math/Time.h>
|
||||
|
||||
#include <SDL_events.h>
|
||||
#include <SDL_messagebox.h>
|
||||
|
||||
|
@ -52,7 +54,8 @@ Application::initialiseConfiguration() {
|
|||
LOG_INFO("Reading configuration file.");
|
||||
|
||||
setSwapInterval(conf().swapInterval());
|
||||
setMinimalLoopPeriod(0);
|
||||
using namespace Math::Literals;
|
||||
setMinimalLoopPeriod(0_nsec);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
|
||||
#include <Corrade/Utility/Path.h>
|
||||
|
||||
#include <Magnum/Math/Time.h>
|
||||
|
||||
#include "../Configuration/Configuration.h"
|
||||
#include "../FontAwesome/IconsFontAwesome5.h"
|
||||
#include "../FontAwesome/IconsFontAwesome5Brands.h"
|
||||
|
@ -98,7 +100,8 @@ Application::drawMainMenu() {
|
|||
conf().setSwapInterval(i);
|
||||
setSwapInterval(i);
|
||||
if(i == 0) {
|
||||
setMinimalLoopPeriod(0);
|
||||
using namespace Math::Literals;
|
||||
setMinimalLoopPeriod(0_nsec);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue