Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
deathkiller committed Jun 15, 2024
1 parent 6f32456 commit 5488a24
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Sources/Jazz2/UI/Menu/InGameMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ namespace Jazz2::UI::Menu
}

if (_owner->_touchButtonsTimer > 0.0f && _owner->_sections.size() >= 2) {
_owner->DrawElement(MenuLineArrow, -1, static_cast<float>(center.X), titleY - (ViewSize.Y >= 300 ? 30.0f : 12.0f), ShadowLayer, Alignment::Center, Colorf::White);
float arrowScale = (ViewSize.Y >= 300 ? 1.0f : 0.7f);
_owner->DrawElement(MenuLineArrow, -1, static_cast<float>(center.X), titleY - (ViewSize.Y >= 300 ? 30.0f : 12.0f), ShadowLayer, Alignment::Center, Colorf::White, arrowScale, arrowScale);
}

// Title
Expand Down
3 changes: 2 additions & 1 deletion Sources/Jazz2/UI/Menu/MainMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ namespace Jazz2::UI::Menu
float logoTextTranslate = (1.0f - _owner->_logoTransition) * 60.0f;

if (_owner->_touchButtonsTimer > 0.0f && _owner->_sections.size() >= 2) {
_owner->DrawElement(MenuLineArrow, -1, static_cast<float>(center.X), titleY - (ViewSize.Y >= 300 ? 30.0f : 12.0f), ShadowLayer, Alignment::Center, Colorf::White);
float arrowScale = (ViewSize.Y >= 300 ? 1.0f : 0.7f);
_owner->DrawElement(MenuLineArrow, -1, static_cast<float>(center.X), titleY - (ViewSize.Y >= 300 ? 30.0f : 12.0f), ShadowLayer, Alignment::Center, Colorf::White, arrowScale, arrowScale);
}

// Title
Expand Down
5 changes: 3 additions & 2 deletions Sources/nCine/Backends/GlfwInputManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ namespace nCine
touchEvent.type = TouchEventType::Move;
break;
default:
touchEvent.type = (touchEvent.count >= 0 ? TouchEventType::PointerUp : TouchEventType::Up);
touchEvent.type = (touchEvent.count >= 2 ? TouchEventType::PointerUp : TouchEventType::Up);
break;
}

Expand All @@ -438,9 +438,10 @@ namespace nCine
}

touchEvent.actionIndex = pointer.id;
inputManager->inputEventHandler_->OnTouchEvent(touchEvent);
}

inputManager->inputEventHandler_->OnTouchEvent(touchEvent);

return 1;
}
#endif
Expand Down

0 comments on commit 5488a24

Please sign in to comment.