Skip to content

Commit 46d4960

Browse files
committed
Fix warnings from magnum update
1 parent 4cdcec5 commit 46d4960

File tree

3 files changed

+32
-32
lines changed

3 files changed

+32
-32
lines changed

tools/NodeEditor/NodeEditorApp.cpp

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -267,89 +267,89 @@ void NodeEditorApp::keyReleaseEvent( KeyEvent& event )
267267
HandleKeyEvent( event.key(), false );
268268
}
269269

270-
void NodeEditorApp::HandleKeyEvent( KeyEvent::Key key, bool value )
270+
void NodeEditorApp::HandleKeyEvent( Key key, bool value )
271271
{
272272
switch( key )
273273
{
274-
case KeyEvent::Key::W:
274+
case Key::W:
275275
mKeyDown[Key_W] = value;
276276
break;
277-
case KeyEvent::Key::S:
277+
case Key::S:
278278
mKeyDown[Key_S] = value;
279279
break;
280-
case KeyEvent::Key::A:
280+
case Key::A:
281281
mKeyDown[Key_A] = value;
282282
break;
283-
case KeyEvent::Key::D:
283+
case Key::D:
284284
mKeyDown[Key_D] = value;
285285
break;
286-
case KeyEvent::Key::Q:
286+
case Key::Q:
287287
mKeyDown[Key_Q] = value;
288288
break;
289-
case KeyEvent::Key::E:
289+
case Key::E:
290290
mKeyDown[Key_E] = value;
291291
break;
292-
case KeyEvent::Key::Up:
292+
case Key::Up:
293293
mKeyDown[Key_Up] = value;
294294
break;
295-
case KeyEvent::Key::Down:
295+
case Key::Down:
296296
mKeyDown[Key_Down] = value;
297297
break;
298-
case KeyEvent::Key::Left:
298+
case Key::Left:
299299
mKeyDown[Key_Left] = value;
300300
break;
301-
case KeyEvent::Key::Right:
301+
case Key::Right:
302302
mKeyDown[Key_Right] = value;
303303
break;
304-
case KeyEvent::Key::PageDown:
304+
case Key::PageDown:
305305
mKeyDown[Key_PgDn] = value;
306306
break;
307-
case KeyEvent::Key::PageUp:
307+
case Key::PageUp:
308308
mKeyDown[Key_PgUp] = value;
309309
break;
310-
case KeyEvent::Key::LeftShift:
310+
case Key::LeftShift:
311311
mKeyDown[Key_LShift] = value;
312312
break;
313-
case KeyEvent::Key::RightShift:
313+
case Key::RightShift:
314314
mKeyDown[Key_RShift] = value;
315315
break;
316316
default:
317317
break;
318318
}
319319
}
320320

321-
void NodeEditorApp::mousePressEvent( MouseEvent& event )
321+
void NodeEditorApp::pointerPressEvent( PointerEvent& event )
322322
{
323-
if( mImGuiIntegrationContext.handleMousePressEvent( event ) )
323+
if( mImGuiIntegrationContext.handlePointerPressEvent( event ) )
324324
return;
325-
if( event.button() != MouseEvent::Button::Left )
325+
if( !event.isPrimary() || !(event.pointer() & Pointer::MouseLeft) )
326326
return;
327327

328328
event.setAccepted();
329329
}
330330

331-
void NodeEditorApp::mouseReleaseEvent( MouseEvent& event )
331+
void NodeEditorApp::pointerReleaseEvent( PointerEvent& event )
332332
{
333-
if( mImGuiIntegrationContext.handleMouseReleaseEvent( event ) )
333+
if( mImGuiIntegrationContext.handlePointerReleaseEvent( event ) )
334334
return;
335335

336336
event.setAccepted();
337337
}
338338

339-
void NodeEditorApp::mouseScrollEvent( MouseScrollEvent& event ) {
340-
if( mImGuiIntegrationContext.handleMouseScrollEvent( event ) )
339+
void NodeEditorApp::scrollEvent( ScrollEvent& event ) {
340+
if( mImGuiIntegrationContext.handleScrollEvent( event ) )
341341
{
342342
/* Prevent scrolling the page */
343343
event.setAccepted();
344344
return;
345345
}
346346
}
347347

348-
void NodeEditorApp::mouseMoveEvent( MouseMoveEvent& event )
348+
void NodeEditorApp::pointerMoveEvent( PointerMoveEvent& event )
349349
{
350-
if( mImGuiIntegrationContext.handleMouseMoveEvent( event ) )
350+
if( mImGuiIntegrationContext.handlePointerMoveEvent( event ) )
351351
return;
352-
if( !(event.buttons() & MouseMoveEvent::Button::Left) )
352+
if( !event.isPrimary() || !(event.pointers() & Pointer::MouseLeft) )
353353
return;
354354

355355
constexpr float mouseSensitivity = 0.22f;

tools/NodeEditor/NodeEditorApp.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ namespace Magnum
4949

5050
void keyPressEvent( KeyEvent& event ) override;
5151
void keyReleaseEvent( KeyEvent& event ) override;
52-
void mousePressEvent( MouseEvent& event ) override;
53-
void mouseReleaseEvent( MouseEvent& event ) override;
54-
void mouseMoveEvent( MouseMoveEvent& event ) override;
55-
void mouseScrollEvent( MouseScrollEvent& event ) override;
52+
void pointerPressEvent( PointerEvent& event ) override;
53+
void pointerReleaseEvent( PointerEvent& event ) override;
54+
void pointerMoveEvent( PointerMoveEvent& event ) override;
55+
void scrollEvent( ScrollEvent& event ) override;
5656
void textInputEvent( TextInputEvent& event ) override;
5757

5858
void UpdatePespectiveProjection();
59-
void HandleKeyEvent( KeyEvent::Key key, bool value );
59+
void HandleKeyEvent( Key key, bool value );
6060

6161
bool mIsDetachedNodeGraph;
6262
std::string mExecutablePath;
@@ -77,7 +77,7 @@ namespace Magnum
7777
ImGuiContext* mImGuiContext;
7878
FastNoiseNodeEditor mNodeEditor;
7979

80-
enum Key
80+
enum KeyMap
8181
{
8282
Key_W, Key_A, Key_S, Key_D, Key_Q, Key_E,
8383
Key_Left, Key_Right, Key_Up, Key_Down, Key_PgUp, Key_PgDn,

tools/NodeEditor/NoiseTexture.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ void NoiseTexture::Draw()
186186
ImGui::PushStyleColor( ImGuiCol_Button, 0 );
187187
ImGui::PushStyleColor( ImGuiCol_ButtonActive, 0 );
188188
ImGui::PushStyleColor( ImGuiCol_ButtonHovered, 0 );
189-
ImGuiIntegration::imageButton( mNoiseTexture, Vector2( mBuildData.size ), { {}, Vector2 { 1 } }, 0 );
189+
ImGuiIntegration::imageButton( "noise_texture", mNoiseTexture, Vector2( mBuildData.size ) );
190190
ImGui::PopStyleColor( 3 );
191191

192192
if( ImGui::IsItemHovered() )

0 commit comments

Comments
 (0)