Skip to content
Snippets Groups Projects
Commit c0c7a9a5 authored by Joseph Walton-Rivers's avatar Joseph Walton-Rivers
Browse files

minor style change for board code

parent 9a0410ff
No related branches found
No related tags found
No related merge requests found
...@@ -70,8 +70,8 @@ namespace demo::hexboard { ...@@ -70,8 +70,8 @@ namespace demo::hexboard {
// check if a button was pressed // check if a button was pressed
auto& input = this->input(); auto& input = this->input();
{ {
const auto mouseNDC = fggl::input::mouse_axis(input.mouse); const auto mouseNdc = fggl::input::mouse_axis(input.mouse);
const auto screenPos = ndc_to_screen(mouseNDC, m_screen); const auto screenPos = ndc_to_screen(mouseNdc, m_screen);
// calculate what the user clicked on // calculate what the user clicked on
auto worldPx = m_camera->unproject(screenPos); auto worldPx = m_camera->unproject(screenPos);
...@@ -79,7 +79,7 @@ namespace demo::hexboard { ...@@ -79,7 +79,7 @@ namespace demo::hexboard {
if (input.mouse.pressed(fggl::input::MouseButton::LEFT)) { if (input.mouse.pressed(fggl::input::MouseButton::LEFT)) {
m_selections->selected = m_selections->hover; m_selections->selected = m_selections->hover;
m_camera->moveBy( mouseNDC * (m_screen * 0.5F) ); m_camera->moveBy(mouseNdc * (m_screen * 0.5F) );
} }
if ( input.mouse.down(fggl::input::MouseButton::RIGHT) ) { if ( input.mouse.down(fggl::input::MouseButton::RIGHT) ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment