Skip to content

Commit

Permalink
Fix changing camera dimensions
Browse files Browse the repository at this point in the history
  • Loading branch information
veger committed Oct 29, 2024
1 parent e112cb0 commit 72e817a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/gui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,7 @@ end
function GUI.onTextChanged(event)
---@type playerSettings
local playerSettings = storage.playerSettings[event.player_index]
local player = game.players[event.player_index]
local selectedTracker = playerSettings.trackers[playerSettings.guiPersist.selectedTracker]

if event.element.name == "camera-name" then
Expand Down Expand Up @@ -549,12 +550,12 @@ function GUI.onTextChanged(event)
playerSettings.cameras[playerSettings.guiPersist.selectedCamera]
)
elseif event.element.name == "camera-resolution-x" then
Camera.setWidth(playerSettings, playerSettings.cameras[playerSettings.guiPersist.selectedCamera],
Camera.setWidth(playerSettings, player, playerSettings.cameras[playerSettings.guiPersist.selectedCamera],
event.element.text)
GUI.updateCameraInfo(playerSettings.gui.cameraInfo,
playerSettings.cameras[playerSettings.guiPersist.selectedCamera])
elseif event.element.name == "camera-resolution-y" then
Camera.setHeight(playerSettings, playerSettings.cameras[playerSettings.guiPersist.selectedCamera],
Camera.setHeight(playerSettings, player, playerSettings.cameras[playerSettings.guiPersist.selectedCamera],
event.element.text)
GUI.updateCameraInfo(playerSettings.gui.cameraInfo,
playerSettings.cameras[playerSettings.guiPersist.selectedCamera])
Expand Down

0 comments on commit 72e817a

Please sign in to comment.