local addonname, shared = ... ---@cast shared CykaShared ---@cast addonname string ---@class CameraSettings ---@field Init fun() shared.CameraSettings = { Init = function() end, } function shared.CameraSettings.Init() if not shared.config.camera.enabled then print("Cyka - Camera settings disabled") return end local function SetCameraSpeed(speed) if not speed then return end print("Camera speed set to " .. tostring(speed)) SetCVar("cameraYawMoveSpeed", speed) SetCVar("cameraPitchMoveSpeed", speed) C_Timer.After(1, function() SetCVar("cameraYawMoveSpeed", speed) SetCVar("cameraPitchMoveSpeed", speed) end) InterfaceOptionsControlsPanelInteractOnLeftClick:SetValue(0) InterfaceOptionsControlsPanelStickyTargeting:SetValue(1) InterfaceOptionsCombatPanelTargetOfTarget:SetValue(1) InterfaceOptionsDisplayPanelShowTutorials:SetValue(0) InterfaceOptionsDisplayPanelAJAlerts:SetValue(1) InterfaceOptionsSocialPanelProfanityFilter:SetValue(0) InterfaceOptionsSocialPanelSpamFilter:SetValue(0) InterfaceOptionsNamesPanelMyName:SetValue(1) InterfaceOptionsCameraPanelStyleDropDown:SetValue(0) InterfaceOptionsMousePanelClickToMove:SetValue(1) InterfaceOptionsMousePanelClickMoveStyleDropDown:SetValue(0) end local frame = CreateFrame("Frame") frame:RegisterEvent("PLAYER_LOGIN") frame:RegisterEvent("PLAYER_ENTERING_WORLD") frame:SetScript("OnEvent", function(self, event, ...) C_Timer.After(5, function() SetCameraSpeed(shared.config.camera.speed) end) end) SlashCmdList["CAMERASETTINGS"] = function(speed) if speed then shared.config.camera.speed = speed end SetCameraSpeed(shared.config.camera.speed) end SLASH_CAMERASETTINGS1 = "/cs" print("Cyka - Camera settings loaded") end