Skip to content

Commit

Permalink
Add render.getViewSetup (#1854)
Browse files Browse the repository at this point in the history
* Add render.getViewSetup

* Add this too

* oops

* Update render.lua

* Update render.lua

---------

Co-authored-by: thegrb93 <[email protected]>
  • Loading branch information
marchc1 and thegrb93 authored Sep 26, 2024
1 parent 05d9cc4 commit 38379b6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lua/starfall/libs_cl/render.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2287,6 +2287,13 @@ function render_library.getScreenInfo(e)
return instance.Sanitize(screen.ScreenInfo)
end

--- Returns information about the current view setup.
-- @param boolean? curview If true, returns the current calculated view setup, otherwise returns original player view setup
-- @return table A table describing the current view setup. See https://wiki.facepunch.com/gmod/Structures/ViewSetup for more information.
function render_library.getViewSetup(curview)
return SF.StructWrapper(instance, render.GetViewSetup(curview), "ViewSetup")
end

--- Returns the entity currently being rendered to
-- @return Entity Entity of the screen or hud being rendered
function render_library.getScreenEntity()
Expand Down

0 comments on commit 38379b6

Please sign in to comment.