Skip to content

Commit

Permalink
docs(engine): add mouse showcase to input sample docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tomas7770 committed Nov 11, 2023
1 parent c4d4d9f commit a4a4f31
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions engine/samples/input/page.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,7 @@ Modifier keys work with axis too.

If, for any reason, you want to read an input that is not defined in the Bindings asset, you cannot use the Input plugin for it.
Instead, you will have to call the @ref cubos::core::io::Window::pressed "Window::pressed" function.

@snippet input/main.cpp Showcase Mouse Buttons

Reading mouse buttons is also supported, just bind them to an action, and then call @ref cubos::engine::Input::pressed "Input::pressed" as usual. To check which strings map to which buttons, you check the `mouseButtonToString` function implementation on [this file](https://github.com/GameDevTecnico/cubos/blob/main/core/src/cubos/core/io/window.cpp).

0 comments on commit a4a4f31

Please sign in to comment.