Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Game Library
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Onuralp SEZER
Game Library
Commits
c0c7a9a5
Commit
c0c7a9a5
authored
2 years ago
by
Joseph Walton-Rivers
Browse files
Options
Downloads
Patches
Plain Diff
minor style change for board code
parent
9a0410ff
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
demo/demo/hexboard/board.cpp
+3
-3
3 additions, 3 deletions
demo/demo/hexboard/board.cpp
with
3 additions
and
3 deletions
demo/demo/hexboard/board.cpp
+
3
−
3
View file @
c0c7a9a5
...
@@ -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
mouseN
DC
=
fggl
::
input
::
mouse_axis
(
input
.
mouse
);
const
auto
mouseN
dc
=
fggl
::
input
::
mouse_axis
(
input
.
mouse
);
const
auto
screenPos
=
ndc_to_screen
(
mouseN
DC
,
m_screen
);
const
auto
screenPos
=
ndc_to_screen
(
mouseN
dc
,
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
(
mouseN
DC
*
(
m_screen
*
0.5
F
)
);
m_camera
->
moveBy
(
mouseN
dc
*
(
m_screen
*
0.5
F
)
);
}
}
if
(
input
.
mouse
.
down
(
fggl
::
input
::
MouseButton
::
RIGHT
)
)
{
if
(
input
.
mouse
.
down
(
fggl
::
input
::
MouseButton
::
RIGHT
)
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment