Skip to content

Commit

Permalink
feat: Scaling function for 1440p as normal one i cant fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Lythium4848 committed Aug 16, 2023
1 parent 0ed2d0a commit e03f631
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lua/pixelui/core/cl_scaling.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
--]]

local scrH = ScrH()
local scrH = ScrH
local max = math.max
function PIXEL.Scale(value)
return value * (scrH / 1080)
return max(value * (scrH() / 1080), 1)
end
function PIXEL.Scale1440(value)
return max(value * (scrH() / 1440), 1)
end

local constants = {}
Expand Down

0 comments on commit e03f631

Please sign in to comment.