Skip to content

Commit

Permalink
Add input.getAnalogValue (#1967)
Browse files Browse the repository at this point in the history
* Update input.lua

* remove check

* Update lua/starfall/libs_sh/input.lua

Co-authored-by: thegrb93 <[email protected]>

---------

Co-authored-by: thegrb93 <[email protected]>
  • Loading branch information
ZH-Hristov and thegrb93 authored Jan 12, 2025
1 parent 3161315 commit 6a6efc1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lua/starfall/libs_sh/input.lua
Original file line number Diff line number Diff line change
Expand Up @@ -396,5 +396,12 @@ function input_library.isGameUIVisible()
return gui.IsGameUIVisible()
end

--- Returns the digital value of an analog stick on the current (set up via convars) controller.
-- @name input_library.getAnalogValue
-- @class function
-- @client
-- @param number axis The analog axis to poll. See https://wiki.facepunch.com/gmod/Enums/ANALOG
-- @return number The digital value.
input_library.getAnalogValue = input.GetAnalogValue

end

0 comments on commit 6a6efc1

Please sign in to comment.